metanorma-un 0.5.9 → 0.5.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2ace1a52aae154584b20d0cfd1ad6c406e8e03fe94d05f0856c1bee51a3f4e9
4
- data.tar.gz: 343c07319b3614aae5dc670b758a673e0e9e9e23dc85479456f728cdb6b53fdc
3
+ metadata.gz: 6000479dcb184f14cff08893a4c89cbf7f2f9f4d8ffdc5c907ed93385c429a46
4
+ data.tar.gz: fd7bb76064bbf07fa758aadea5655a0c5eb2b7b4dea7627f42da27f44d49baba
5
5
  SHA512:
6
- metadata.gz: 385e51a5b3b7370c9e87dad6da2c2af529933dced215d9f53ddc56729c35f08fbf4ad91836efad4cf078cb58d800c1018e12bba81040f2e6ff1ba320d64415b4
7
- data.tar.gz: 9a43c038e94d2974ab446513729b774a169b49220414e7d5db74fc18dc63902b57c08bcbd673d30c1b4cde878399a66233a04b5c90b7a2ae03c0157a6bf091ea
6
+ metadata.gz: 1fddc8abb9e9fe9c952bdc5bd727cba8bfbeba53e2a2c12ddb40ea5c8ddd0dfdac1bd37486bee884bcd017f383d07f2bb8bc603fc0824db71570692ff9fd0509
7
+ data.tar.gz: c6271a453a8eae392041812fc945a31484e60fb7e705e640512d2bc47b355b6da87fa11fee05301768ac52f87c8d4ec0b7979ccfe9a3f4acb8ec0ffa1e2a6215
@@ -729,12 +729,27 @@
729
729
  </define>
730
730
  <define name="index">
731
731
  <element name="index">
732
- <attribute name="primary"/>
732
+ <attribute name="to">
733
+ <data type="IDREF"/>
734
+ </attribute>
735
+ <element name="primary">
736
+ <oneOrMore>
737
+ <ref name="PureTextElement"/>
738
+ </oneOrMore>
739
+ </element>
733
740
  <optional>
734
- <attribute name="secondary"/>
741
+ <element name="secondary">
742
+ <oneOrMore>
743
+ <ref name="PureTextElement"/>
744
+ </oneOrMore>
745
+ </element>
735
746
  </optional>
736
747
  <optional>
737
- <attribute name="tertiary"/>
748
+ <element name="tertiary">
749
+ <oneOrMore>
750
+ <ref name="PureTextElement"/>
751
+ </oneOrMore>
752
+ </element>
738
753
  </optional>
739
754
  </element>
740
755
  </define>
@@ -55,6 +55,13 @@
55
55
  <param name="pattern">\i\c*|\c+#\c+</param>
56
56
  </data>
57
57
  </attribute>
58
+ <optional>
59
+ <attribute name="to">
60
+ <data type="string">
61
+ <param name="pattern">\i\c*|\c+#\c+</param>
62
+ </data>
63
+ </attribute>
64
+ </optional>
58
65
  <optional>
59
66
  <attribute name="type">
60
67
  <ref name="ReferenceFormat"/>
@@ -3,7 +3,7 @@ require "fileutils"
3
3
  module IsoDoc
4
4
  module UN
5
5
  module BaseConvert
6
- def middle_clause
6
+ def middle_clause(_docxml)
7
7
  "//clause[parent::sections]"
8
8
  end
9
9
 
@@ -1560,6 +1560,7 @@
1560
1560
 
1561
1561
  </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1562
1562
 
1563
+
1563
1564
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1564
1565
 
1565
1566
 
@@ -2595,7 +2596,9 @@
2595
2596
  </xsl:template><xsl:template match="*[local-name()='dl']">
2596
2597
  <fo:block-container>
2597
2598
 
2598
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2599
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2600
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2601
+ </xsl:if>
2599
2602
 
2600
2603
 
2601
2604
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -2610,6 +2613,7 @@
2610
2613
  <fo:block-container>
2611
2614
 
2612
2615
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2616
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2613
2617
 
2614
2618
 
2615
2619
  <xsl:variable name="parent" select="local-name(..)"/>
@@ -2793,12 +2797,32 @@
2793
2797
  </xsl:otherwise>
2794
2798
  </xsl:choose>
2795
2799
  </xsl:template><xsl:template name="getMaxLength_dt">
2796
- <xsl:for-each select="*[local-name()='dt']">
2797
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
2798
- <xsl:if test="position() = 1">
2799
- <xsl:value-of select="string-length(normalize-space(.))"/>
2800
- </xsl:if>
2801
- </xsl:for-each>
2800
+ <xsl:variable name="lengths">
2801
+ <xsl:for-each select="*[local-name()='dt']">
2802
+ <xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
2803
+ <xsl:variable name="attributes">
2804
+ <xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
2805
+ <xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
2806
+ </xsl:variable>
2807
+ <length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
2808
+ </xsl:for-each>
2809
+ </xsl:variable>
2810
+ <xsl:variable name="maxLength">
2811
+ <!-- <xsl:for-each select="*[local-name()='dt']">
2812
+ <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
2813
+ <xsl:if test="position() = 1">
2814
+ <xsl:value-of select="string-length(normalize-space(.))"/>
2815
+ </xsl:if>
2816
+ </xsl:for-each> -->
2817
+ <xsl:for-each select="xalan:nodeset($lengths)/length">
2818
+ <xsl:sort select="." data-type="number" order="descending"/>
2819
+ <xsl:if test="position() = 1">
2820
+ <xsl:value-of select="."/>
2821
+ </xsl:if>
2822
+ </xsl:for-each>
2823
+ </xsl:variable>
2824
+ <!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
2825
+ <xsl:value-of select="$maxLength"/>
2802
2826
  </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
2803
2827
  <xsl:param name="key_iso"/>
2804
2828
 
@@ -3608,6 +3632,8 @@
3608
3632
  <xsl:variable name="bookmark-title_">
3609
3633
  <xsl:call-template name="getLangVersion">
3610
3634
  <xsl:with-param name="lang" select="@lang"/>
3635
+ <xsl:with-param name="doctype" select="@doctype"/>
3636
+ <xsl:with-param name="title" select="@title-part"/>
3611
3637
  </xsl:call-template>
3612
3638
  </xsl:variable>
3613
3639
  <xsl:choose>
@@ -3625,13 +3651,34 @@
3625
3651
  </xsl:choose>
3626
3652
  </fo:bookmark-title>
3627
3653
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
3654
+
3655
+ <xsl:call-template name="insertFigureBookmarks">
3656
+ <xsl:with-param name="contents" select="contents"/>
3657
+ </xsl:call-template>
3658
+
3659
+ <xsl:call-template name="insertTableBookmarks">
3660
+ <xsl:with-param name="contents" select="contents"/>
3661
+ <xsl:with-param name="lang" select="@lang"/>
3662
+ </xsl:call-template>
3663
+
3628
3664
  </fo:bookmark>
3629
3665
 
3630
3666
  </xsl:for-each>
3631
3667
  </xsl:when>
3632
3668
  <xsl:otherwise>
3633
3669
  <xsl:for-each select="xalan:nodeset($contents)/doc">
3670
+
3634
3671
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
3672
+
3673
+ <xsl:call-template name="insertFigureBookmarks">
3674
+ <xsl:with-param name="contents" select="contents"/>
3675
+ </xsl:call-template>
3676
+
3677
+ <xsl:call-template name="insertTableBookmarks">
3678
+ <xsl:with-param name="contents" select="contents"/>
3679
+ <xsl:with-param name="lang" select="@lang"/>
3680
+ </xsl:call-template>
3681
+
3635
3682
  </xsl:for-each>
3636
3683
  </xsl:otherwise>
3637
3684
  </xsl:choose>
@@ -3650,8 +3697,44 @@
3650
3697
 
3651
3698
  </fo:bookmark-tree>
3652
3699
  </xsl:if>
3700
+ </xsl:template><xsl:template name="insertFigureBookmarks">
3701
+ <xsl:param name="contents"/>
3702
+ <xsl:if test="xalan:nodeset($contents)/figure">
3703
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
3704
+ <fo:bookmark-title>Figures</fo:bookmark-title>
3705
+ <xsl:for-each select="xalan:nodeset($contents)/figure">
3706
+ <fo:bookmark internal-destination="{@id}">
3707
+ <fo:bookmark-title>
3708
+ <xsl:value-of select="normalize-space(title)"/>
3709
+ </fo:bookmark-title>
3710
+ </fo:bookmark>
3711
+ </xsl:for-each>
3712
+ </fo:bookmark>
3713
+ </xsl:if>
3714
+ </xsl:template><xsl:template name="insertTableBookmarks">
3715
+ <xsl:param name="contents"/>
3716
+ <xsl:param name="lang"/>
3717
+ <xsl:if test="xalan:nodeset($contents)/table">
3718
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
3719
+ <fo:bookmark-title>
3720
+ <xsl:choose>
3721
+ <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
3722
+ <xsl:otherwise>Tables</xsl:otherwise>
3723
+ </xsl:choose>
3724
+ </fo:bookmark-title>
3725
+ <xsl:for-each select="xalan:nodeset($contents)/table">
3726
+ <fo:bookmark internal-destination="{@id}">
3727
+ <fo:bookmark-title>
3728
+ <xsl:value-of select="normalize-space(title)"/>
3729
+ </fo:bookmark-title>
3730
+ </fo:bookmark>
3731
+ </xsl:for-each>
3732
+ </fo:bookmark>
3733
+ </xsl:if>
3653
3734
  </xsl:template><xsl:template name="getLangVersion">
3654
3735
  <xsl:param name="lang"/>
3736
+ <xsl:param name="doctype" select="''"/>
3737
+ <xsl:param name="title" select="''"/>
3655
3738
  <xsl:choose>
3656
3739
  <xsl:when test="$lang = 'en'">
3657
3740
 
@@ -4139,7 +4222,8 @@
4139
4222
  <fo:block-container margin-left="0mm">
4140
4223
 
4141
4224
  <fo:block xsl:use-attribute-sets="quote-style">
4142
- <xsl:apply-templates select=".//*[local-name() = 'p']"/>
4225
+ <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
4226
+ <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4143
4227
  </fo:block>
4144
4228
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
4145
4229
  <fo:block xsl:use-attribute-sets="quote-source-style">
@@ -1560,6 +1560,7 @@
1560
1560
 
1561
1561
  </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1562
1562
 
1563
+
1563
1564
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1564
1565
 
1565
1566
 
@@ -2595,7 +2596,9 @@
2595
2596
  </xsl:template><xsl:template match="*[local-name()='dl']">
2596
2597
  <fo:block-container>
2597
2598
 
2598
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2599
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2600
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2601
+ </xsl:if>
2599
2602
 
2600
2603
 
2601
2604
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -2610,6 +2613,7 @@
2610
2613
  <fo:block-container>
2611
2614
 
2612
2615
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2616
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2613
2617
 
2614
2618
 
2615
2619
  <xsl:variable name="parent" select="local-name(..)"/>
@@ -2793,12 +2797,32 @@
2793
2797
  </xsl:otherwise>
2794
2798
  </xsl:choose>
2795
2799
  </xsl:template><xsl:template name="getMaxLength_dt">
2796
- <xsl:for-each select="*[local-name()='dt']">
2797
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
2798
- <xsl:if test="position() = 1">
2799
- <xsl:value-of select="string-length(normalize-space(.))"/>
2800
- </xsl:if>
2801
- </xsl:for-each>
2800
+ <xsl:variable name="lengths">
2801
+ <xsl:for-each select="*[local-name()='dt']">
2802
+ <xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
2803
+ <xsl:variable name="attributes">
2804
+ <xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
2805
+ <xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
2806
+ </xsl:variable>
2807
+ <length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
2808
+ </xsl:for-each>
2809
+ </xsl:variable>
2810
+ <xsl:variable name="maxLength">
2811
+ <!-- <xsl:for-each select="*[local-name()='dt']">
2812
+ <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
2813
+ <xsl:if test="position() = 1">
2814
+ <xsl:value-of select="string-length(normalize-space(.))"/>
2815
+ </xsl:if>
2816
+ </xsl:for-each> -->
2817
+ <xsl:for-each select="xalan:nodeset($lengths)/length">
2818
+ <xsl:sort select="." data-type="number" order="descending"/>
2819
+ <xsl:if test="position() = 1">
2820
+ <xsl:value-of select="."/>
2821
+ </xsl:if>
2822
+ </xsl:for-each>
2823
+ </xsl:variable>
2824
+ <!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
2825
+ <xsl:value-of select="$maxLength"/>
2802
2826
  </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
2803
2827
  <xsl:param name="key_iso"/>
2804
2828
 
@@ -3608,6 +3632,8 @@
3608
3632
  <xsl:variable name="bookmark-title_">
3609
3633
  <xsl:call-template name="getLangVersion">
3610
3634
  <xsl:with-param name="lang" select="@lang"/>
3635
+ <xsl:with-param name="doctype" select="@doctype"/>
3636
+ <xsl:with-param name="title" select="@title-part"/>
3611
3637
  </xsl:call-template>
3612
3638
  </xsl:variable>
3613
3639
  <xsl:choose>
@@ -3625,13 +3651,34 @@
3625
3651
  </xsl:choose>
3626
3652
  </fo:bookmark-title>
3627
3653
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
3654
+
3655
+ <xsl:call-template name="insertFigureBookmarks">
3656
+ <xsl:with-param name="contents" select="contents"/>
3657
+ </xsl:call-template>
3658
+
3659
+ <xsl:call-template name="insertTableBookmarks">
3660
+ <xsl:with-param name="contents" select="contents"/>
3661
+ <xsl:with-param name="lang" select="@lang"/>
3662
+ </xsl:call-template>
3663
+
3628
3664
  </fo:bookmark>
3629
3665
 
3630
3666
  </xsl:for-each>
3631
3667
  </xsl:when>
3632
3668
  <xsl:otherwise>
3633
3669
  <xsl:for-each select="xalan:nodeset($contents)/doc">
3670
+
3634
3671
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
3672
+
3673
+ <xsl:call-template name="insertFigureBookmarks">
3674
+ <xsl:with-param name="contents" select="contents"/>
3675
+ </xsl:call-template>
3676
+
3677
+ <xsl:call-template name="insertTableBookmarks">
3678
+ <xsl:with-param name="contents" select="contents"/>
3679
+ <xsl:with-param name="lang" select="@lang"/>
3680
+ </xsl:call-template>
3681
+
3635
3682
  </xsl:for-each>
3636
3683
  </xsl:otherwise>
3637
3684
  </xsl:choose>
@@ -3650,8 +3697,44 @@
3650
3697
 
3651
3698
  </fo:bookmark-tree>
3652
3699
  </xsl:if>
3700
+ </xsl:template><xsl:template name="insertFigureBookmarks">
3701
+ <xsl:param name="contents"/>
3702
+ <xsl:if test="xalan:nodeset($contents)/figure">
3703
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
3704
+ <fo:bookmark-title>Figures</fo:bookmark-title>
3705
+ <xsl:for-each select="xalan:nodeset($contents)/figure">
3706
+ <fo:bookmark internal-destination="{@id}">
3707
+ <fo:bookmark-title>
3708
+ <xsl:value-of select="normalize-space(title)"/>
3709
+ </fo:bookmark-title>
3710
+ </fo:bookmark>
3711
+ </xsl:for-each>
3712
+ </fo:bookmark>
3713
+ </xsl:if>
3714
+ </xsl:template><xsl:template name="insertTableBookmarks">
3715
+ <xsl:param name="contents"/>
3716
+ <xsl:param name="lang"/>
3717
+ <xsl:if test="xalan:nodeset($contents)/table">
3718
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
3719
+ <fo:bookmark-title>
3720
+ <xsl:choose>
3721
+ <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
3722
+ <xsl:otherwise>Tables</xsl:otherwise>
3723
+ </xsl:choose>
3724
+ </fo:bookmark-title>
3725
+ <xsl:for-each select="xalan:nodeset($contents)/table">
3726
+ <fo:bookmark internal-destination="{@id}">
3727
+ <fo:bookmark-title>
3728
+ <xsl:value-of select="normalize-space(title)"/>
3729
+ </fo:bookmark-title>
3730
+ </fo:bookmark>
3731
+ </xsl:for-each>
3732
+ </fo:bookmark>
3733
+ </xsl:if>
3653
3734
  </xsl:template><xsl:template name="getLangVersion">
3654
3735
  <xsl:param name="lang"/>
3736
+ <xsl:param name="doctype" select="''"/>
3737
+ <xsl:param name="title" select="''"/>
3655
3738
  <xsl:choose>
3656
3739
  <xsl:when test="$lang = 'en'">
3657
3740
 
@@ -4139,7 +4222,8 @@
4139
4222
  <fo:block-container margin-left="0mm">
4140
4223
 
4141
4224
  <fo:block xsl:use-attribute-sets="quote-style">
4142
- <xsl:apply-templates select=".//*[local-name() = 'p']"/>
4225
+ <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
4226
+ <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4143
4227
  </fo:block>
4144
4228
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
4145
4229
  <fo:block xsl:use-attribute-sets="quote-source-style">
@@ -1420,6 +1420,7 @@
1420
1420
 
1421
1421
  </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1422
1422
 
1423
+
1423
1424
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1424
1425
 
1425
1426
 
@@ -2460,7 +2461,9 @@
2460
2461
  </xsl:template><xsl:template match="*[local-name()='dl']">
2461
2462
  <fo:block-container>
2462
2463
 
2463
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2464
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2465
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2466
+ </xsl:if>
2464
2467
 
2465
2468
 
2466
2469
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -2475,6 +2478,7 @@
2475
2478
  <fo:block-container>
2476
2479
 
2477
2480
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2481
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2478
2482
 
2479
2483
 
2480
2484
  <xsl:variable name="parent" select="local-name(..)"/>
@@ -2658,12 +2662,32 @@
2658
2662
  </xsl:otherwise>
2659
2663
  </xsl:choose>
2660
2664
  </xsl:template><xsl:template name="getMaxLength_dt">
2661
- <xsl:for-each select="*[local-name()='dt']">
2662
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
2663
- <xsl:if test="position() = 1">
2664
- <xsl:value-of select="string-length(normalize-space(.))"/>
2665
- </xsl:if>
2666
- </xsl:for-each>
2665
+ <xsl:variable name="lengths">
2666
+ <xsl:for-each select="*[local-name()='dt']">
2667
+ <xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
2668
+ <xsl:variable name="attributes">
2669
+ <xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
2670
+ <xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
2671
+ </xsl:variable>
2672
+ <length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
2673
+ </xsl:for-each>
2674
+ </xsl:variable>
2675
+ <xsl:variable name="maxLength">
2676
+ <!-- <xsl:for-each select="*[local-name()='dt']">
2677
+ <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
2678
+ <xsl:if test="position() = 1">
2679
+ <xsl:value-of select="string-length(normalize-space(.))"/>
2680
+ </xsl:if>
2681
+ </xsl:for-each> -->
2682
+ <xsl:for-each select="xalan:nodeset($lengths)/length">
2683
+ <xsl:sort select="." data-type="number" order="descending"/>
2684
+ <xsl:if test="position() = 1">
2685
+ <xsl:value-of select="."/>
2686
+ </xsl:if>
2687
+ </xsl:for-each>
2688
+ </xsl:variable>
2689
+ <!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
2690
+ <xsl:value-of select="$maxLength"/>
2667
2691
  </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
2668
2692
  <xsl:param name="key_iso"/>
2669
2693
 
@@ -3482,6 +3506,8 @@
3482
3506
  <xsl:variable name="bookmark-title_">
3483
3507
  <xsl:call-template name="getLangVersion">
3484
3508
  <xsl:with-param name="lang" select="@lang"/>
3509
+ <xsl:with-param name="doctype" select="@doctype"/>
3510
+ <xsl:with-param name="title" select="@title-part"/>
3485
3511
  </xsl:call-template>
3486
3512
  </xsl:variable>
3487
3513
  <xsl:choose>
@@ -3499,13 +3525,34 @@
3499
3525
  </xsl:choose>
3500
3526
  </fo:bookmark-title>
3501
3527
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
3528
+
3529
+ <xsl:call-template name="insertFigureBookmarks">
3530
+ <xsl:with-param name="contents" select="contents"/>
3531
+ </xsl:call-template>
3532
+
3533
+ <xsl:call-template name="insertTableBookmarks">
3534
+ <xsl:with-param name="contents" select="contents"/>
3535
+ <xsl:with-param name="lang" select="@lang"/>
3536
+ </xsl:call-template>
3537
+
3502
3538
  </fo:bookmark>
3503
3539
 
3504
3540
  </xsl:for-each>
3505
3541
  </xsl:when>
3506
3542
  <xsl:otherwise>
3507
3543
  <xsl:for-each select="xalan:nodeset($contents)/doc">
3544
+
3508
3545
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
3546
+
3547
+ <xsl:call-template name="insertFigureBookmarks">
3548
+ <xsl:with-param name="contents" select="contents"/>
3549
+ </xsl:call-template>
3550
+
3551
+ <xsl:call-template name="insertTableBookmarks">
3552
+ <xsl:with-param name="contents" select="contents"/>
3553
+ <xsl:with-param name="lang" select="@lang"/>
3554
+ </xsl:call-template>
3555
+
3509
3556
  </xsl:for-each>
3510
3557
  </xsl:otherwise>
3511
3558
  </xsl:choose>
@@ -3524,8 +3571,44 @@
3524
3571
 
3525
3572
  </fo:bookmark-tree>
3526
3573
  </xsl:if>
3574
+ </xsl:template><xsl:template name="insertFigureBookmarks">
3575
+ <xsl:param name="contents"/>
3576
+ <xsl:if test="xalan:nodeset($contents)/figure">
3577
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
3578
+ <fo:bookmark-title>Figures</fo:bookmark-title>
3579
+ <xsl:for-each select="xalan:nodeset($contents)/figure">
3580
+ <fo:bookmark internal-destination="{@id}">
3581
+ <fo:bookmark-title>
3582
+ <xsl:value-of select="normalize-space(title)"/>
3583
+ </fo:bookmark-title>
3584
+ </fo:bookmark>
3585
+ </xsl:for-each>
3586
+ </fo:bookmark>
3587
+ </xsl:if>
3588
+ </xsl:template><xsl:template name="insertTableBookmarks">
3589
+ <xsl:param name="contents"/>
3590
+ <xsl:param name="lang"/>
3591
+ <xsl:if test="xalan:nodeset($contents)/table">
3592
+ <fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
3593
+ <fo:bookmark-title>
3594
+ <xsl:choose>
3595
+ <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
3596
+ <xsl:otherwise>Tables</xsl:otherwise>
3597
+ </xsl:choose>
3598
+ </fo:bookmark-title>
3599
+ <xsl:for-each select="xalan:nodeset($contents)/table">
3600
+ <fo:bookmark internal-destination="{@id}">
3601
+ <fo:bookmark-title>
3602
+ <xsl:value-of select="normalize-space(title)"/>
3603
+ </fo:bookmark-title>
3604
+ </fo:bookmark>
3605
+ </xsl:for-each>
3606
+ </fo:bookmark>
3607
+ </xsl:if>
3527
3608
  </xsl:template><xsl:template name="getLangVersion">
3528
3609
  <xsl:param name="lang"/>
3610
+ <xsl:param name="doctype" select="''"/>
3611
+ <xsl:param name="title" select="''"/>
3529
3612
  <xsl:choose>
3530
3613
  <xsl:when test="$lang = 'en'">
3531
3614
 
@@ -4013,7 +4096,8 @@
4013
4096
  <fo:block-container margin-left="0mm">
4014
4097
 
4015
4098
  <fo:block xsl:use-attribute-sets="quote-style">
4016
- <xsl:apply-templates select=".//*[local-name() = 'p']"/>
4099
+ <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
4100
+ <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4017
4101
  </fo:block>
4018
4102
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
4019
4103
  <fo:block xsl:use-attribute-sets="quote-source-style">
@@ -18,6 +18,17 @@ module Metanorma
18
18
  )
19
19
  end
20
20
 
21
+ def fonts_manifest
22
+ {
23
+ "Arial" => nil,
24
+ "Arial Black" => nil,
25
+ "Courier" => nil,
26
+ "Times New Roman" => nil,
27
+ "STIX Two Math" => nil,
28
+ "Source Han Sans" => nil,
29
+ }
30
+ end
31
+
21
32
  def version
22
33
  "Metanorma::UN #{Metanorma::UN::VERSION}"
23
34
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.5.9"
3
+ VERSION = "0.5.10"
4
4
  end
5
5
  end
@@ -30,8 +30,8 @@ Gem::Specification.new do |spec|
30
30
  spec.add_dependency "twitter_cldr"
31
31
  spec.add_dependency "iso-639"
32
32
 
33
- spec.add_dependency "metanorma-standoc", "~> 1.6.0"
34
- spec.add_dependency "isodoc", "~> 1.3.0"
33
+ spec.add_dependency "metanorma-standoc", "~> 1.7.0"
34
+ spec.add_dependency "isodoc", "~> 1.4.0"
35
35
 
36
36
  spec.add_development_dependency "byebug", "~> 9.1"
37
37
  spec.add_development_dependency "sassc", "2.4.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-un
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9
4
+ version: 0.5.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-14 00:00:00.000000000 Z
11
+ date: 2020-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roman-numerals
@@ -58,28 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.6.0
61
+ version: 1.7.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.6.0
68
+ version: 1.7.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: isodoc
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.3.0
75
+ version: 1.4.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.3.0
82
+ version: 1.4.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: byebug
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -283,7 +283,6 @@ files:
283
283
  - lib/metanorma-un.rb
284
284
  - lib/metanorma/un.rb
285
285
  - lib/metanorma/un/UN_emblem_blue.svg
286
- - lib/metanorma/un/fonts_manifest.yaml
287
286
  - lib/metanorma/un/input.rb
288
287
  - lib/metanorma/un/processor.rb
289
288
  - lib/metanorma/un/version.rb
@@ -1,6 +0,0 @@
1
- ---
2
- Arial:
3
- Arial Black:
4
- Courier:
5
- Times New Roman:
6
- Source Han Sans: