metanorma-un 0.5.7 → 0.5.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +7 -5
- data/lib/asciidoctor/un/basicdoc.rng +52 -3
- data/lib/asciidoctor/un/converter.rb +1 -1
- data/lib/asciidoctor/un/isodoc.rng +51 -3
- data/lib/isodoc/un/base_convert.rb +1 -1
- data/lib/isodoc/un/html/html_unece_intro.html +1 -1
- data/lib/isodoc/un/html/htmlstyle.css +3 -3
- data/lib/isodoc/un/html/htmlstyle.scss +2 -2
- data/lib/isodoc/un/html/unece.css +19 -20
- data/lib/isodoc/un/html/unece.scss +19 -20
- data/lib/isodoc/un/html/word_unece_intro.html +1 -1
- data/lib/isodoc/un/html/wordstyle.css +17 -17
- data/lib/isodoc/un/html/wordstyle.scss +17 -17
- data/lib/isodoc/un/html_convert.rb +5 -3
- data/lib/isodoc/un/un.plenary-attachment.xsl +253 -45
- data/lib/isodoc/un/un.plenary.xsl +253 -45
- data/lib/isodoc/un/un.recommendation.xsl +254 -46
- data/lib/isodoc/un/word_convert.rb +7 -3
- data/lib/isodoc/un/xref.rb +4 -2
- data/lib/metanorma/un/processor.rb +11 -8
- data/lib/metanorma/un/version.rb +1 -1
- data/metanorma-unece.gemspec +2 -2
- metadata +6 -6
@@ -37,7 +37,7 @@
|
|
37
37
|
|
38
38
|
<xsl:template match="/">
|
39
39
|
<xsl:call-template name="namespaceCheck"/>
|
40
|
-
<fo:root font-family="Times New Roman, STIX Two Math,
|
40
|
+
<fo:root font-family="Times New Roman, STIX Two Math, Source Han Sans" font-size="10pt" xml:lang="{$lang}">
|
41
41
|
<fo:layout-master-set>
|
42
42
|
<!-- Cover page -->
|
43
43
|
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
@@ -616,7 +616,7 @@
|
|
616
616
|
<xsl:when test="ancestor::*[un:annex]">
|
617
617
|
<xsl:choose>
|
618
618
|
<xsl:when test="$level = 1">
|
619
|
-
<xsl:number format="a)"/>
|
619
|
+
<xsl:number format="a)" lang="en"/>
|
620
620
|
</xsl:when>
|
621
621
|
<xsl:when test="$level = 2">
|
622
622
|
<xsl:number format="i)"/>
|
@@ -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
|
|
@@ -1567,6 +1568,7 @@
|
|
1567
1568
|
|
1568
1569
|
|
1569
1570
|
|
1571
|
+
|
1570
1572
|
</xsl:attribute-set><xsl:attribute-set name="quote-source-style">
|
1571
1573
|
|
1572
1574
|
|
@@ -1584,6 +1586,7 @@
|
|
1584
1586
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1585
1587
|
|
1586
1588
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1589
|
+
|
1587
1590
|
|
1588
1591
|
|
1589
1592
|
|
@@ -1695,7 +1698,7 @@
|
|
1695
1698
|
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
1696
1699
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
1697
1700
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1698
|
-
</xsl:template><xsl:template match="*[local-name()='table']">
|
1701
|
+
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1699
1702
|
|
1700
1703
|
<xsl:variable name="simple-table">
|
1701
1704
|
<xsl:call-template name="getSimpleTable"/>
|
@@ -1741,10 +1744,12 @@
|
|
1741
1744
|
|
1742
1745
|
|
1743
1746
|
<xsl:variable name="colwidths">
|
1744
|
-
<xsl:
|
1745
|
-
<xsl:
|
1746
|
-
|
1747
|
-
|
1747
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1748
|
+
<xsl:call-template name="calculate-column-widths">
|
1749
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1750
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
1751
|
+
</xsl:call-template>
|
1752
|
+
</xsl:if>
|
1748
1753
|
</xsl:variable>
|
1749
1754
|
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1750
1755
|
|
@@ -1786,7 +1791,12 @@
|
|
1786
1791
|
|
1787
1792
|
<xsl:variable name="table_attributes">
|
1788
1793
|
<attribute name="table-layout">fixed</attribute>
|
1789
|
-
<attribute name="width">
|
1794
|
+
<attribute name="width">
|
1795
|
+
<xsl:choose>
|
1796
|
+
<xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
|
1797
|
+
<xsl:otherwise>100%</xsl:otherwise>
|
1798
|
+
</xsl:choose>
|
1799
|
+
</attribute>
|
1790
1800
|
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1791
1801
|
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1792
1802
|
|
@@ -1817,16 +1827,25 @@
|
|
1817
1827
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1818
1828
|
</xsl:if>
|
1819
1829
|
|
1820
|
-
<xsl:
|
1821
|
-
<xsl:
|
1822
|
-
<xsl:
|
1823
|
-
<fo:table-column column-width="
|
1824
|
-
</xsl:
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
+
<xsl:choose>
|
1831
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1832
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1833
|
+
<fo:table-column column-width="{@width}"/>
|
1834
|
+
</xsl:for-each>
|
1835
|
+
</xsl:when>
|
1836
|
+
<xsl:otherwise>
|
1837
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1838
|
+
<xsl:choose>
|
1839
|
+
<xsl:when test=". = 1 or . = 0">
|
1840
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1841
|
+
</xsl:when>
|
1842
|
+
<xsl:otherwise>
|
1843
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1844
|
+
</xsl:otherwise>
|
1845
|
+
</xsl:choose>
|
1846
|
+
</xsl:for-each>
|
1847
|
+
</xsl:otherwise>
|
1848
|
+
</xsl:choose>
|
1830
1849
|
|
1831
1850
|
<xsl:choose>
|
1832
1851
|
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
@@ -1839,10 +1858,12 @@
|
|
1839
1858
|
|
1840
1859
|
</fo:table>
|
1841
1860
|
|
1861
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
1842
1862
|
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1843
1863
|
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1844
1864
|
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1845
1865
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1866
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
1846
1867
|
</xsl:call-template>
|
1847
1868
|
</xsl:for-each>
|
1848
1869
|
|
@@ -2096,12 +2117,22 @@
|
|
2096
2117
|
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
2097
2118
|
<xsl:param name="table_attributes"/>
|
2098
2119
|
<xsl:param name="colwidths"/>
|
2120
|
+
<xsl:param name="colgroup"/>
|
2099
2121
|
|
2100
2122
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2101
2123
|
|
2102
2124
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2103
2125
|
|
2104
|
-
<xsl:variable name="cols-count"
|
2126
|
+
<xsl:variable name="cols-count">
|
2127
|
+
<xsl:choose>
|
2128
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2129
|
+
<xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
|
2130
|
+
</xsl:when>
|
2131
|
+
<xsl:otherwise>
|
2132
|
+
<xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
|
2133
|
+
</xsl:otherwise>
|
2134
|
+
</xsl:choose>
|
2135
|
+
</xsl:variable>
|
2105
2136
|
|
2106
2137
|
<fo:table keep-with-previous="always">
|
2107
2138
|
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
@@ -2119,16 +2150,25 @@
|
|
2119
2150
|
</xsl:choose>
|
2120
2151
|
</xsl:for-each>
|
2121
2152
|
|
2122
|
-
<xsl:
|
2123
|
-
<xsl:
|
2124
|
-
<xsl:
|
2125
|
-
<fo:table-column column-width="
|
2126
|
-
</xsl:
|
2127
|
-
|
2128
|
-
|
2129
|
-
|
2130
|
-
|
2131
|
-
|
2153
|
+
<xsl:choose>
|
2154
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2155
|
+
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2156
|
+
<fo:table-column column-width="{@width}"/>
|
2157
|
+
</xsl:for-each>
|
2158
|
+
</xsl:when>
|
2159
|
+
<xsl:otherwise>
|
2160
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2161
|
+
<xsl:choose>
|
2162
|
+
<xsl:when test=". = 1 or . = 0">
|
2163
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2164
|
+
</xsl:when>
|
2165
|
+
<xsl:otherwise>
|
2166
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2167
|
+
</xsl:otherwise>
|
2168
|
+
</xsl:choose>
|
2169
|
+
</xsl:for-each>
|
2170
|
+
</xsl:otherwise>
|
2171
|
+
</xsl:choose>
|
2132
2172
|
|
2133
2173
|
<fo:table-body>
|
2134
2174
|
<fo:table-row>
|
@@ -2562,7 +2602,9 @@
|
|
2562
2602
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2563
2603
|
<fo:block-container>
|
2564
2604
|
|
2565
|
-
<xsl:
|
2605
|
+
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
2606
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2607
|
+
</xsl:if>
|
2566
2608
|
|
2567
2609
|
|
2568
2610
|
<xsl:if test="parent::*[local-name() = 'note']">
|
@@ -2577,6 +2619,7 @@
|
|
2577
2619
|
<fo:block-container>
|
2578
2620
|
|
2579
2621
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2622
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2580
2623
|
|
2581
2624
|
|
2582
2625
|
<xsl:variable name="parent" select="local-name(..)"/>
|
@@ -2760,12 +2803,32 @@
|
|
2760
2803
|
</xsl:otherwise>
|
2761
2804
|
</xsl:choose>
|
2762
2805
|
</xsl:template><xsl:template name="getMaxLength_dt">
|
2763
|
-
<xsl:
|
2764
|
-
<xsl:
|
2765
|
-
|
2766
|
-
<xsl:
|
2767
|
-
|
2768
|
-
|
2806
|
+
<xsl:variable name="lengths">
|
2807
|
+
<xsl:for-each select="*[local-name()='dt']">
|
2808
|
+
<xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
|
2809
|
+
<xsl:variable name="attributes">
|
2810
|
+
<xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
|
2811
|
+
<xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
|
2812
|
+
</xsl:variable>
|
2813
|
+
<length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
|
2814
|
+
</xsl:for-each>
|
2815
|
+
</xsl:variable>
|
2816
|
+
<xsl:variable name="maxLength">
|
2817
|
+
<!-- <xsl:for-each select="*[local-name()='dt']">
|
2818
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
2819
|
+
<xsl:if test="position() = 1">
|
2820
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
2821
|
+
</xsl:if>
|
2822
|
+
</xsl:for-each> -->
|
2823
|
+
<xsl:for-each select="xalan:nodeset($lengths)/length">
|
2824
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
2825
|
+
<xsl:if test="position() = 1">
|
2826
|
+
<xsl:value-of select="."/>
|
2827
|
+
</xsl:if>
|
2828
|
+
</xsl:for-each>
|
2829
|
+
</xsl:variable>
|
2830
|
+
<!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
|
2831
|
+
<xsl:value-of select="$maxLength"/>
|
2769
2832
|
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
2770
2833
|
<xsl:param name="key_iso"/>
|
2771
2834
|
|
@@ -2877,6 +2940,7 @@
|
|
2877
2940
|
</fo:inline>
|
2878
2941
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
2879
2942
|
<fo:inline font-weight="bold">
|
2943
|
+
|
2880
2944
|
<xsl:apply-templates/>
|
2881
2945
|
</fo:inline>
|
2882
2946
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
@@ -2903,6 +2967,7 @@
|
|
2903
2967
|
|
2904
2968
|
|
2905
2969
|
|
2970
|
+
|
2906
2971
|
|
2907
2972
|
</xsl:variable>
|
2908
2973
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -2916,6 +2981,10 @@
|
|
2916
2981
|
</xsl:if>
|
2917
2982
|
<xsl:apply-templates/>
|
2918
2983
|
</fo:inline>
|
2984
|
+
</xsl:template><xsl:template match="*[local-name()='underline']">
|
2985
|
+
<fo:inline text-decoration="underline">
|
2986
|
+
<xsl:apply-templates/>
|
2987
|
+
</fo:inline>
|
2919
2988
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2920
2989
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
2921
2990
|
<xsl:apply-templates/>
|
@@ -3281,6 +3350,7 @@
|
|
3281
3350
|
</xsl:choose>
|
3282
3351
|
</xsl:variable>
|
3283
3352
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3353
|
+
|
3284
3354
|
<xsl:choose>
|
3285
3355
|
<xsl:when test="$target = ''">
|
3286
3356
|
<xsl:apply-templates/>
|
@@ -3504,8 +3574,9 @@
|
|
3504
3574
|
</xsl:if> -->
|
3505
3575
|
</fo:inline>
|
3506
3576
|
</xsl:if>
|
3507
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3508
|
-
<fo:block-container id="{@id}">
|
3577
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3578
|
+
<fo:block-container id="{@id}">
|
3579
|
+
|
3509
3580
|
<fo:block>
|
3510
3581
|
<xsl:apply-templates/>
|
3511
3582
|
</fo:block>
|
@@ -3556,7 +3627,7 @@
|
|
3556
3627
|
<xsl:apply-templates mode="bookmarks"/>
|
3557
3628
|
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3558
3629
|
<xsl:apply-templates select="."/>
|
3559
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3630
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3560
3631
|
<xsl:apply-templates mode="bookmarks"/>
|
3561
3632
|
</xsl:template><xsl:template name="addBookmarks">
|
3562
3633
|
<xsl:param name="contents"/>
|
@@ -3572,6 +3643,8 @@
|
|
3572
3643
|
<xsl:variable name="bookmark-title_">
|
3573
3644
|
<xsl:call-template name="getLangVersion">
|
3574
3645
|
<xsl:with-param name="lang" select="@lang"/>
|
3646
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
3647
|
+
<xsl:with-param name="title" select="@title-part"/>
|
3575
3648
|
</xsl:call-template>
|
3576
3649
|
</xsl:variable>
|
3577
3650
|
<xsl:choose>
|
@@ -3589,13 +3662,34 @@
|
|
3589
3662
|
</xsl:choose>
|
3590
3663
|
</fo:bookmark-title>
|
3591
3664
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3665
|
+
|
3666
|
+
<xsl:call-template name="insertFigureBookmarks">
|
3667
|
+
<xsl:with-param name="contents" select="contents"/>
|
3668
|
+
</xsl:call-template>
|
3669
|
+
|
3670
|
+
<xsl:call-template name="insertTableBookmarks">
|
3671
|
+
<xsl:with-param name="contents" select="contents"/>
|
3672
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3673
|
+
</xsl:call-template>
|
3674
|
+
|
3592
3675
|
</fo:bookmark>
|
3593
3676
|
|
3594
3677
|
</xsl:for-each>
|
3595
3678
|
</xsl:when>
|
3596
3679
|
<xsl:otherwise>
|
3597
3680
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3681
|
+
|
3598
3682
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3683
|
+
|
3684
|
+
<xsl:call-template name="insertFigureBookmarks">
|
3685
|
+
<xsl:with-param name="contents" select="contents"/>
|
3686
|
+
</xsl:call-template>
|
3687
|
+
|
3688
|
+
<xsl:call-template name="insertTableBookmarks">
|
3689
|
+
<xsl:with-param name="contents" select="contents"/>
|
3690
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3691
|
+
</xsl:call-template>
|
3692
|
+
|
3599
3693
|
</xsl:for-each>
|
3600
3694
|
</xsl:otherwise>
|
3601
3695
|
</xsl:choose>
|
@@ -3614,8 +3708,44 @@
|
|
3614
3708
|
|
3615
3709
|
</fo:bookmark-tree>
|
3616
3710
|
</xsl:if>
|
3711
|
+
</xsl:template><xsl:template name="insertFigureBookmarks">
|
3712
|
+
<xsl:param name="contents"/>
|
3713
|
+
<xsl:if test="xalan:nodeset($contents)/figure">
|
3714
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
|
3715
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
3716
|
+
<xsl:for-each select="xalan:nodeset($contents)/figure">
|
3717
|
+
<fo:bookmark internal-destination="{@id}">
|
3718
|
+
<fo:bookmark-title>
|
3719
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3720
|
+
</fo:bookmark-title>
|
3721
|
+
</fo:bookmark>
|
3722
|
+
</xsl:for-each>
|
3723
|
+
</fo:bookmark>
|
3724
|
+
</xsl:if>
|
3725
|
+
</xsl:template><xsl:template name="insertTableBookmarks">
|
3726
|
+
<xsl:param name="contents"/>
|
3727
|
+
<xsl:param name="lang"/>
|
3728
|
+
<xsl:if test="xalan:nodeset($contents)/table">
|
3729
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
|
3730
|
+
<fo:bookmark-title>
|
3731
|
+
<xsl:choose>
|
3732
|
+
<xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
|
3733
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
3734
|
+
</xsl:choose>
|
3735
|
+
</fo:bookmark-title>
|
3736
|
+
<xsl:for-each select="xalan:nodeset($contents)/table">
|
3737
|
+
<fo:bookmark internal-destination="{@id}">
|
3738
|
+
<fo:bookmark-title>
|
3739
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3740
|
+
</fo:bookmark-title>
|
3741
|
+
</fo:bookmark>
|
3742
|
+
</xsl:for-each>
|
3743
|
+
</fo:bookmark>
|
3744
|
+
</xsl:if>
|
3617
3745
|
</xsl:template><xsl:template name="getLangVersion">
|
3618
3746
|
<xsl:param name="lang"/>
|
3747
|
+
<xsl:param name="doctype" select="''"/>
|
3748
|
+
<xsl:param name="title" select="''"/>
|
3619
3749
|
<xsl:choose>
|
3620
3750
|
<xsl:when test="$lang = 'en'">
|
3621
3751
|
|
@@ -3651,6 +3781,12 @@
|
|
3651
3781
|
<!-- <xsl:text> </xsl:text> -->
|
3652
3782
|
</xsl:template><xsl:template name="getSection">
|
3653
3783
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3784
|
+
<!--
|
3785
|
+
<xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
|
3786
|
+
<xsl:value-of select="."/>
|
3787
|
+
</xsl:for-each>
|
3788
|
+
-->
|
3789
|
+
|
3654
3790
|
</xsl:template><xsl:template name="getName">
|
3655
3791
|
<xsl:choose>
|
3656
3792
|
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
@@ -3703,6 +3839,10 @@
|
|
3703
3839
|
<xsl:copy>
|
3704
3840
|
<xsl:apply-templates mode="contents_item"/>
|
3705
3841
|
</xsl:copy>
|
3842
|
+
</xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
|
3843
|
+
<xsl:copy>
|
3844
|
+
<xsl:apply-templates mode="contents_item"/>
|
3845
|
+
</xsl:copy>
|
3706
3846
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3707
3847
|
<xsl:text> </xsl:text>
|
3708
3848
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -3728,6 +3868,7 @@
|
|
3728
3868
|
|
3729
3869
|
|
3730
3870
|
|
3871
|
+
|
3731
3872
|
|
3732
3873
|
|
3733
3874
|
|
@@ -4103,7 +4244,8 @@
|
|
4103
4244
|
<fo:block-container margin-left="0mm">
|
4104
4245
|
|
4105
4246
|
<fo:block xsl:use-attribute-sets="quote-style">
|
4106
|
-
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
4247
|
+
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
4248
|
+
<xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
4107
4249
|
</fo:block>
|
4108
4250
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4109
4251
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -4256,6 +4398,7 @@
|
|
4256
4398
|
|
4257
4399
|
|
4258
4400
|
|
4401
|
+
|
4259
4402
|
|
4260
4403
|
|
4261
4404
|
|
@@ -4272,7 +4415,7 @@
|
|
4272
4415
|
|
4273
4416
|
|
4274
4417
|
|
4275
|
-
</xsl:template><xsl:template match="
|
4418
|
+
</xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
4276
4419
|
<fo:block break-after="page"/>
|
4277
4420
|
<fo:block>
|
4278
4421
|
<xsl:call-template name="setId"/>
|
@@ -4280,7 +4423,8 @@
|
|
4280
4423
|
</fo:block>
|
4281
4424
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
4282
4425
|
<fo:block>
|
4283
|
-
<xsl:call-template name="setId"/>
|
4426
|
+
<xsl:call-template name="setId"/>
|
4427
|
+
|
4284
4428
|
|
4285
4429
|
<xsl:apply-templates/>
|
4286
4430
|
</fo:block>
|
@@ -4288,7 +4432,7 @@
|
|
4288
4432
|
<fo:block id="{@id}">
|
4289
4433
|
<xsl:apply-templates/>
|
4290
4434
|
</fo:block>
|
4291
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
4435
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
4292
4436
|
|
4293
4437
|
<fo:block id="{@id}">
|
4294
4438
|
<xsl:apply-templates/>
|
@@ -4350,7 +4494,8 @@
|
|
4350
4494
|
<fo:table-column column-width="107mm"/>
|
4351
4495
|
<fo:table-column column-width="15mm"/>
|
4352
4496
|
<fo:table-body>
|
4353
|
-
<fo:table-row
|
4497
|
+
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
|
4498
|
+
|
4354
4499
|
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
4355
4500
|
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
4356
4501
|
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
@@ -4368,6 +4513,10 @@
|
|
4368
4513
|
<fo:block><xsl:apply-templates/></fo:block>
|
4369
4514
|
</fo:table-cell>
|
4370
4515
|
</xsl:template><xsl:template name="processBibitem">
|
4516
|
+
|
4517
|
+
|
4518
|
+
<!-- end BIPM bibitem processing-->
|
4519
|
+
|
4371
4520
|
|
4372
4521
|
|
4373
4522
|
|
@@ -4426,6 +4575,8 @@
|
|
4426
4575
|
<xsl:value-of select="translate(.,'. ','')"/>
|
4427
4576
|
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4428
4577
|
<xsl:value-of select="substring(.,1,1)"/>
|
4578
|
+
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4579
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4429
4580
|
</xsl:template><xsl:template name="convertDate">
|
4430
4581
|
<xsl:param name="date"/>
|
4431
4582
|
<xsl:param name="format" select="'short'"/>
|
@@ -4450,6 +4601,57 @@
|
|
4450
4601
|
</xsl:variable>
|
4451
4602
|
<xsl:variable name="result">
|
4452
4603
|
<xsl:choose>
|
4604
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
4605
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4606
|
+
<xsl:text> </xsl:text>
|
4607
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
4608
|
+
</xsl:when>
|
4609
|
+
<xsl:when test="$format = 'ddMM'">
|
4610
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4611
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
4612
|
+
</xsl:when>
|
4613
|
+
<xsl:when test="$format = 'short' or $day = ''">
|
4614
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
4615
|
+
</xsl:when>
|
4616
|
+
<xsl:otherwise>
|
4617
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
|
4618
|
+
</xsl:otherwise>
|
4619
|
+
</xsl:choose>
|
4620
|
+
</xsl:variable>
|
4621
|
+
<xsl:value-of select="$result"/>
|
4622
|
+
</xsl:template><xsl:template name="convertDateLocalized">
|
4623
|
+
<xsl:param name="date"/>
|
4624
|
+
<xsl:param name="format" select="'short'"/>
|
4625
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
4626
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
4627
|
+
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
4628
|
+
<xsl:variable name="monthStr">
|
4629
|
+
<xsl:choose>
|
4630
|
+
<xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
|
4631
|
+
<xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
|
4632
|
+
<xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
|
4633
|
+
<xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
|
4634
|
+
<xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
|
4635
|
+
<xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
|
4636
|
+
<xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
|
4637
|
+
<xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
|
4638
|
+
<xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
|
4639
|
+
<xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
|
4640
|
+
<xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
|
4641
|
+
<xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
|
4642
|
+
</xsl:choose>
|
4643
|
+
</xsl:variable>
|
4644
|
+
<xsl:variable name="result">
|
4645
|
+
<xsl:choose>
|
4646
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
4647
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4648
|
+
<xsl:text> </xsl:text>
|
4649
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
4650
|
+
</xsl:when>
|
4651
|
+
<xsl:when test="$format = 'ddMM'">
|
4652
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4653
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
4654
|
+
</xsl:when>
|
4453
4655
|
<xsl:when test="$format = 'short' or $day = ''">
|
4454
4656
|
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
4455
4657
|
</xsl:when>
|
@@ -4644,6 +4846,7 @@
|
|
4644
4846
|
|
4645
4847
|
|
4646
4848
|
|
4849
|
+
|
4647
4850
|
</xsl:variable>
|
4648
4851
|
<xsl:if test="$documentNS != $XSLNS">
|
4649
4852
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -4703,6 +4906,11 @@
|
|
4703
4906
|
<xsl:call-template name="getLang"/>
|
4704
4907
|
</xsl:variable>
|
4705
4908
|
|
4706
|
-
<xsl:
|
4909
|
+
<xsl:choose>
|
4910
|
+
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
4911
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4912
|
+
</xsl:when>
|
4913
|
+
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
4914
|
+
</xsl:choose>
|
4707
4915
|
|
4708
4916
|
</xsl:template></xsl:stylesheet>
|