metanorma-un 0.5.4 → 0.5.5

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: f88f7b21e9d8de071434daa7df4a9982bec263f465c574c3c97b73971d433c37
4
- data.tar.gz: 38b237c01381f9343a62e7cbff698915372c24ebda3d5b970c762a3db8db9ebc
3
+ metadata.gz: a89fbe7a8aacf50f53139a549d660b7d0706321463965c5050bb6c2c1d4acdac
4
+ data.tar.gz: f43a231cf294d7f45becca41ce489d6534811cc9f414a0163aeffcb3aa199415
5
5
  SHA512:
6
- metadata.gz: 9079386c7b5b8df9a4bb61d8675f8c78a83e48235588516dbaa688f1b9e34ec037ff33f5e14de7c530b480a0a42cc6cb8817974f93505b47b4e36be657882d04
7
- data.tar.gz: 90d5141f6da4430059e474803cb5ae25ebd9b6430a31b555b29c48b37ca5312c730b8e030eb0488f1b9d3ce338e49a03d47621d152a720f402325476556645b9
6
+ metadata.gz: 62377ec55bd35ef893b6ac9bf80676a2873cdd5a63cf6635412b6ceb294aa6d85b352c535392647e633691fd9c1424a740460586e6f3395c1a8958e230e6ea98
7
+ data.tar.gz: 75337ef3e5cab047fae4c81d3e879291d904de3e58bb07bdf976e1bb3197789679b0fecd6f9ecf20b3489701d9a4036ef6584b1f969e56996dd24300195425e4
@@ -40,15 +40,17 @@
40
40
  </legal-statement>
41
41
  <feedback-statement>
42
42
  <clause>
43
- <p id="boilerplate-feedback-name">UN Economic Commission for Europe: Information Service</p>
43
+ <p id="boilerplate-feedback-name">{% if subdivision %}{{subdivision}}{% else %}UN Economic Commission for Europe: Information Service{% endif %}</p>
44
44
  <p id="boilerplate-feedback-address">
45
+ {% if pub_address %}{{ pub_address }}{% else %}
45
46
  Palais des Nations<br />
46
47
  CH-1211 Geneva 10<br />
47
- Switzerland<br />
48
+ Switzerland{% endif %}<br />
48
49
  <br />
49
- <link target="tel:+41(0)229171234">+41 (0) 22 917 12 34 (switchboard)</link><br />
50
- <link target="mailto:unece_info@un.org">unece_info@un.org</link><br />
51
- <link target="https://www.unece.org/">www.unece.org/</link>
50
+ <link target="tel:{% if pub_phone %}{{ pub_phone }}{% else %}+41(0)229171234{% endif %}">{% if pub_phone %}{{ pub_phone }}{% else %}+41 (0) 22 917 12 34 (switchboard){% endif %}</link><br />
51
+ {% if pub_fax %}<link target="tel:{{pub_fax}}">{{pub_fax}}</link><br/>{% endif %}
52
+ <link target="mailto:{% if pub_email %}{{ pub_email }}{% else %}unece_info@un.org{% endif %}">{% if pub_email %}{{ pub_email }}{% else %}unece_info@un.org{% endif %}</link><br />
53
+ <link target="{% if pub_uri %}{{pub_uri}}{% else %}https://www.unece.org/{% endif %}">{% if pub_uri %}{{pub_uri}}{% else %}www.unece.org/{% endif %}</link>
52
54
  </p>
53
55
  </clause>
54
56
  </feedback-statement>
@@ -42,7 +42,6 @@
42
42
  </define>
43
43
  <define name="xref">
44
44
  <element name="xref">
45
- <!-- attribute target { xsd:IDREF }, -->
46
45
  <attribute name="target">
47
46
  <data type="string">
48
47
  <param name="pattern">\i\c*|\c+#\c+</param>
@@ -42,8 +42,16 @@
42
42
  </div>
43
43
  </div>
44
44
 
45
+ {% assign fn_refs = "" | split: ',' %}
46
+ {% assign txt = "" %}
47
+ {% for item in title_footnote %}
48
+ {% assign txt = txt | append: "*" %}
49
+ {% assign txtarr = txt | split: "," %}
50
+ {% assign fn_refs = fn_refs | concat: txtarr %}
51
+ {% endfor %}
52
+
45
53
  <div class="coverpage-title">
46
- <span class="title-first">{{ doctitle }}</span>
54
+ <span class="title-first">{{ doctitle }}{% if fn_refs.size > 0 %}<sup>{{ fn_refs | join: "," }}</sup>{% endif %} </span>
47
55
  <!--<span class="title-second">{{ docsubtitle }}</span>-->
48
56
  </div>
49
57
  </div>
@@ -69,6 +77,14 @@
69
77
  <div class="coverpage-stage-block" >{{ revdate }}</div>
70
78
  {% endif %}
71
79
 
80
+ {% if fn_refs.size > 0 %}
81
+ <div class="title-footnote">
82
+ {% for item in title_footnote %}
83
+ <p><sup>{{fn_refs[forloop.index0]}}</sup> {{ item }}</p>
84
+ {% endfor %}
85
+ </div>
86
+ {% endif %}
87
+
72
88
  <div class="info-section">
73
89
  <div class="copyright">
74
90
  <p class="year">
@@ -22,8 +22,17 @@
22
22
  <span class="docyear">{{ draftinfo }}</span>
23
23
  </div>
24
24
 
25
+
26
+ {% assign fn_refs = "" | split: ',' %}
27
+ {% assign txt = "" %}
28
+ {% for item in title_footnote %}
29
+ {% assign txt = txt | append: "*" %}
30
+ {% assign txtarr = txt | split: "," %}
31
+ {% assign fn_refs = fn_refs | concat: txtarr %}
32
+ {% endfor %}
33
+
25
34
  <div class="coverpage-title">
26
- <span class="title-first">{{ doctitle }}</span>
35
+ <span class="title-first">{{ doctitle }}{% if fn_refs.size > 0 %}<sup>{{ fn_refs | join: "," }}</sup>{% endif %} </span>
27
36
  <!--<span class="title-second">{{ docsubtitle }}</span>-->
28
37
  </div>
29
38
  </div>
@@ -57,6 +66,16 @@
57
66
  <div class="coverpage-stage-block" >{{ revdate }}</div>
58
67
  {% endif %}
59
68
 
69
+ {% if fn_refs.size > 0 %}
70
+ <div class="title-footnote">
71
+ {% for item in title_footnote %}
72
+ <p><sup>{{fn_refs[forloop.index0]}}</sup> {{ item }}</p>
73
+ {% endfor %}
74
+ </div>
75
+ {% endif %}
76
+
77
+
78
+
60
79
  <div class="info-section">
61
80
  <div class="copyright">
62
81
  <p class="year">
@@ -16,7 +16,7 @@ fieldset, form, label, legend,
16
16
  table, caption, tbody, tfoot, thead, tr, th, td,
17
17
  article, aside, canvas, details, embed,
18
18
  figure, figcaption, footer, header, hgroup,
19
- menu, nav, output, ruby, section, summary,
19
+ menu, output, ruby, section, summary,
20
20
  time, mark, audio, video {
21
21
  margin: 0;
22
22
  padding: 0; }
@@ -920,6 +920,9 @@ h2 p {
920
920
  padding: 0 2em 0 3em;
921
921
  text-align: center; }
922
922
 
923
+ .title-footnote {
924
+ text-align: left; }
925
+
923
926
  .info-section {
924
927
  padding: 0 2em; }
925
928
 
@@ -653,6 +653,10 @@ h2 p {
653
653
  text-align: center;
654
654
  }
655
655
 
656
+ .title-footnote {
657
+ text-align: left;
658
+ }
659
+
656
660
  .info-section {
657
661
  padding: 0 2em;
658
662
  }
@@ -9227,7 +9227,15 @@ style='font-family:"Times New Roman",serif'></span></p>
9227
9227
 
9228
9228
  </div>
9229
9229
 
9230
- <p class="MsoNormal" style='margin-left:70.9pt'><b style='mso-bidi-font-weight:normal'><span lang="EN-AU" style='font-size:16.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>{{ doctitle }}</span></b></p>
9230
+ {% assign fn_refs = "" | split: ',' %}
9231
+ {% assign txt = "" %}
9232
+ {% for item in title_footnote %}
9233
+ {% assign txt = txt | append: "*" %}
9234
+ {% assign txtarr = txt | split: "," %}
9235
+ {% assign fn_refs = fn_refs | concat: txtarr %}
9236
+ {% endfor %}
9237
+
9238
+ <p class="MsoNormal" style='margin-left:70.9pt'><b style='mso-bidi-font-weight:normal'><span lang="EN-AU" style='font-size:16.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>{{ doctitle }}{% if fn_refs.size > 0 %}<sup>{{ fn_refs | join: "," }}</sup>{% endif %}</span></b></p>
9231
9239
 
9232
9240
  <p class="MsoNormal" style='margin-left:70.9pt'><b style='mso-bidi-font-weight:normal'><span lang="EN-AU" style='font-family:"Times New Roman",serif'>{{ docsubtitle }}</span></b></p>
9233
9241
 
@@ -9292,3 +9300,11 @@ BADzAAAAsQUAAAAA
9292
9300
  </v:textbox>
9293
9301
  <w:wrap type="square"/>
9294
9302
  </v:shape></p>
9303
+
9304
+ {% if fn_refs.size > 0 %}
9305
+ <div class="title-footnote">
9306
+ {% for item in title_footnote %}
9307
+ <p><sup>{{fn_refs[forloop.index0]}}</sup> {{ item }}</p>
9308
+ {% endfor %}
9309
+ </div>
9310
+ {% endif %}
@@ -14,14 +14,30 @@ style='font-family:"Times New Roman",serif'><span style='mso-tab-count:2'> </spa
14
14
  lang=EN-AU style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman",serif'>{{ doclanguage | join: ", " }} only<o:p></o:p></span></p>
15
15
  {% endif %}
16
16
 
17
+ {% assign fn_refs = "" | split: ',' %}
18
+ {% assign txt = "" %}
19
+ {% for item in title_footnote %}
20
+ {% assign txt = txt | append: "*" %}
21
+ {% assign txtarr = txt | split: "," %}
22
+ {% assign fn_refs = fn_refs | concat: txtarr %}
23
+ {% endfor %}
24
+
17
25
  <p class="MsoNormal" align="center" style='text-align:center;line-height:18.0pt;margin-bottom:0.0pt'><b
18
- style='mso-bidi-font-weight:normal'><span lang="EN-GB" style='font-size:24.0pt'>{{ doctitle }}</span>
26
+ style='mso-bidi-font-weight:normal'><span lang="EN-GB" style='font-size:24.0pt'>{{ doctitle }}{% if fn_refs.size > 0 %}<sup>{{ fn_refs | join: "," }}</sup>{% endif %}</span>
19
27
  </b><br/><span lang="EN-GB" style='font-size:16.0pt'>{{ docsubtitle }}</span></p>
20
28
 
21
29
  <p class="MsoNormal" align="right" style='text-align:right'><b style='mso-bidi-font-weight:
22
30
  normal'><span lang="EN-GB" style='font-size:14.0pt;mso-no-proof:yes'>{{ doctype }} No. {{ docnumber }} {{ draftinfo }}</span></b><b
23
31
  <p class="MsoNormal" style='margin-top:100.0pt'><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
24
32
 
33
+ {% if fn_refs.size > 0 %}
34
+ <div class="title-footnote">
35
+ {% for item in title_footnote %}
36
+ <p><sup>{{fn_refs[forloop.index0]}}</sup> {{ item }}</p>
37
+ {% endfor %}
38
+ </div>
39
+ {% endif %}
40
+
25
41
  <p class="MsoNormal" align="center" style='text-align:center'><span lang="EN-GB" style='mso-no-proof:yes'>United Nations</span><br/>
26
42
  <span lang="EN-GB"><span style='mso-no-proof:yes'>New York and Geneva, {{ docyear }}</span></p>
27
43
 
@@ -11,6 +11,7 @@ module IsoDoc
11
11
 
12
12
  def note1(f)
13
13
  return if f.parent.name == "bibitem"
14
+ return if f["type"] == "title-footnote"
14
15
  n = @xrefs.get[f["id"]]
15
16
  lbl = case f["type"]
16
17
  when "source" then "Source"
@@ -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, STIX2Math, HanSans" font-size="10pt" xml:lang="{$lang}">
40
+ <fo:root font-family="Times New Roman, STIX Two Math, HanSans" 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}">
@@ -1191,7 +1191,10 @@
1191
1191
 
1192
1192
 
1193
1193
  </title-toc>
1194
- <title-toc lang="fr">Sommaire</title-toc>
1194
+ <title-toc lang="fr">
1195
+
1196
+
1197
+ </title-toc>
1195
1198
 
1196
1199
  <title-toc lang="zh">Contents</title-toc>
1197
1200
 
@@ -1279,10 +1282,19 @@
1279
1282
 
1280
1283
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1281
1284
  <xsl:param name="name"/>
1282
- <xsl:variable name="lang">
1283
- <xsl:call-template name="getLang"/>
1285
+ <xsl:param name="lang"/>
1286
+ <xsl:variable name="lang_">
1287
+ <xsl:choose>
1288
+ <xsl:when test="$lang != ''">
1289
+ <xsl:value-of select="$lang"/>
1290
+ </xsl:when>
1291
+ <xsl:otherwise>
1292
+ <xsl:call-template name="getLang"/>
1293
+ </xsl:otherwise>
1294
+ </xsl:choose>
1284
1295
  </xsl:variable>
1285
- <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $lang]"/>
1296
+ <xsl:variable name="language" select="normalize-space($lang_)"/>
1297
+ <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
1286
1298
  <xsl:choose>
1287
1299
  <xsl:when test="normalize-space($title_) != ''">
1288
1300
  <xsl:value-of select="$title_"/>
@@ -1427,6 +1439,7 @@
1427
1439
 
1428
1440
 
1429
1441
 
1442
+
1430
1443
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1431
1444
 
1432
1445
 
@@ -1649,6 +1662,8 @@
1649
1662
 
1650
1663
 
1651
1664
 
1665
+
1666
+
1652
1667
  <!-- $namespace = 'iso' or -->
1653
1668
 
1654
1669
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -1686,6 +1701,7 @@
1686
1701
  <xsl:with-param name="table" select="$simple-table"/>
1687
1702
  </xsl:call-template>
1688
1703
  </xsl:variable>
1704
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1689
1705
 
1690
1706
  <!-- <xsl:variable name="colwidths2">
1691
1707
  <xsl:call-template name="calculate-column-widths">
@@ -1707,32 +1723,54 @@
1707
1723
  <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1708
1724
 
1709
1725
 
1710
-
1726
+
1727
+
1711
1728
 
1712
1729
  <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
1730
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
1731
+
1713
1732
 
1714
1733
 
1715
-
1734
+
1716
1735
 
1717
1736
 
1718
1737
 
1719
- <fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
1720
-
1721
-
1722
-
1723
-
1724
-
1738
+
1739
+
1740
+
1741
+
1742
+ <xsl:variable name="table_attributes">
1743
+ <attribute name="table-layout">fixed</attribute>
1744
+ <attribute name="width">100%</attribute>
1745
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1746
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1725
1747
 
1726
1748
 
1727
1749
 
1728
- <xsl:attribute name="border-top">0.5pt solid black</xsl:attribute>
1729
- <xsl:attribute name="font-size">8pt</xsl:attribute>
1730
1750
 
1751
+
1752
+
1731
1753
 
1754
+ <attribute name="border-top">0.5pt solid black</attribute>
1755
+
1732
1756
 
1757
+
1733
1758
 
1759
+ </xsl:variable>
1760
+
1761
+
1762
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
1734
1763
 
1764
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1765
+ <xsl:attribute name="{@name}">
1766
+ <xsl:value-of select="."/>
1767
+ </xsl:attribute>
1768
+ </xsl:for-each>
1735
1769
 
1770
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1771
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1772
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1773
+ </xsl:if>
1736
1774
 
1737
1775
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1738
1776
  <xsl:choose>
@@ -1756,6 +1794,33 @@
1756
1794
 
1757
1795
  </fo:table>
1758
1796
 
1797
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1798
+ <xsl:call-template name="insertTableFooterInSeparateTable">
1799
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
1800
+ <xsl:with-param name="colwidths" select="$colwidths"/>
1801
+ </xsl:call-template>
1802
+ </xsl:for-each>
1803
+
1804
+ <!-- insert footer as table -->
1805
+ <!-- <fo:table>
1806
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1807
+ <xsl:attribute name="{@name}">
1808
+ <xsl:value-of select="."/>
1809
+ </xsl:attribute>
1810
+ </xsl:for-each>
1811
+
1812
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1813
+ <xsl:choose>
1814
+ <xsl:when test=". = 1 or . = 0">
1815
+ <fo:table-column column-width="proportional-column-width(2)"/>
1816
+ </xsl:when>
1817
+ <xsl:otherwise>
1818
+ <fo:table-column column-width="proportional-column-width({.})"/>
1819
+ </xsl:otherwise>
1820
+ </xsl:choose>
1821
+ </xsl:for-each>
1822
+ </fo:table>-->
1823
+
1759
1824
 
1760
1825
 
1761
1826
 
@@ -1820,6 +1885,13 @@
1820
1885
  <xsl:for-each select="xalan:nodeset($table)//tr">
1821
1886
  <xsl:variable name="td_text">
1822
1887
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
1888
+
1889
+ <!-- <xsl:if test="$namespace = 'bipm'">
1890
+ <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
1891
+ <word><xsl:value-of select="normalize-space(.)"/></word>
1892
+ </xsl:for-each>
1893
+ </xsl:if> -->
1894
+
1823
1895
  </xsl:variable>
1824
1896
  <xsl:variable name="words">
1825
1897
  <xsl:variable name="string_with_added_zerospaces">
@@ -1879,11 +1951,14 @@
1879
1951
  <xsl:value-of select="*[local-name()='origin']/@citeas"/>
1880
1952
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
1881
1953
  <xsl:value-of select="@target"/>
1954
+ </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
1955
+ <xsl:variable name="math_text" select="normalize-space(.)"/>
1956
+ <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
1882
1957
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1883
1958
  <xsl:param name="cols-count"/>
1884
1959
  <!-- font-weight="bold" -->
1885
1960
  <fo:table-header>
1886
-
1961
+
1887
1962
  <xsl:apply-templates/>
1888
1963
  </fo:table-header>
1889
1964
  </xsl:template><xsl:template name="table-header-title">
@@ -1908,6 +1983,13 @@
1908
1983
  </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
1909
1984
  <xsl:apply-templates/>
1910
1985
  </xsl:template><xsl:template name="insertTableFooter">
1986
+ <xsl:param name="cols-count"/>
1987
+ <xsl:if test="../*[local-name()='tfoot']">
1988
+ <fo:table-footer>
1989
+ <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
1990
+ </fo:table-footer>
1991
+ </xsl:if>
1992
+ </xsl:template><xsl:template name="insertTableFooter2">
1911
1993
  <xsl:param name="cols-count"/>
1912
1994
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1913
1995
  <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
@@ -1929,11 +2011,15 @@
1929
2011
  <!-- fn will be processed inside 'note' processing -->
1930
2012
 
1931
2013
 
1932
- <!-- except gb -->
2014
+
2015
+ <!-- except gb and bipm -->
1933
2016
 
1934
2017
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1935
2018
 
1936
2019
 
2020
+
2021
+
2022
+
1937
2023
  <!-- horizontal row separator -->
1938
2024
 
1939
2025
 
@@ -1947,6 +2033,84 @@
1947
2033
  </fo:table-footer>
1948
2034
 
1949
2035
  </xsl:if>
2036
+ </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
2037
+ <xsl:param name="table_attributes"/>
2038
+ <xsl:param name="colwidths"/>
2039
+
2040
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2041
+
2042
+ <xsl:if test="$isNoteOrFnExist = 'true'">
2043
+
2044
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
2045
+
2046
+ <fo:table keep-with-previous="always">
2047
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2048
+ <xsl:choose>
2049
+ <xsl:when test="@name = 'border-top'">
2050
+ <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
2051
+ </xsl:when>
2052
+ <xsl:when test="@name = 'border'">
2053
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2054
+ <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
2055
+ </xsl:when>
2056
+ <xsl:otherwise>
2057
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2058
+ </xsl:otherwise>
2059
+ </xsl:choose>
2060
+ </xsl:for-each>
2061
+
2062
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
2063
+ <xsl:choose>
2064
+ <xsl:when test=". = 1 or . = 0">
2065
+ <fo:table-column column-width="proportional-column-width(2)"/>
2066
+ </xsl:when>
2067
+ <xsl:otherwise>
2068
+ <fo:table-column column-width="proportional-column-width({.})"/>
2069
+ </xsl:otherwise>
2070
+ </xsl:choose>
2071
+ </xsl:for-each>
2072
+
2073
+ <fo:table-body>
2074
+ <fo:table-row>
2075
+ <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2076
+
2077
+
2078
+
2079
+ <!-- fn will be processed inside 'note' processing -->
2080
+
2081
+
2082
+
2083
+ <!-- except gb and bipm -->
2084
+
2085
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2086
+
2087
+
2088
+ <!-- <xsl:if test="$namespace = 'bipm'">
2089
+ <xsl:choose>
2090
+ <xsl:when test="ancestor::*[local-name()='preface']">
2091
+ show Note under table in preface (ex. abstract) sections
2092
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2093
+ </xsl:when>
2094
+ <xsl:otherwise>
2095
+ empty, because notes show at page side in main sections
2096
+ <fo:block/>
2097
+ </xsl:otherwise>
2098
+ </xsl:choose>
2099
+ </xsl:if> -->
2100
+
2101
+
2102
+ <!-- horizontal row separator -->
2103
+
2104
+
2105
+ <!-- fn processing -->
2106
+ <xsl:call-template name="fn_display"/>
2107
+
2108
+ </fo:table-cell>
2109
+ </fo:table-row>
2110
+ </fo:table-body>
2111
+
2112
+ </fo:table>
2113
+ </xsl:if>
1950
2114
  </xsl:template><xsl:template match="*[local-name()='tbody']">
1951
2115
 
1952
2116
  <xsl:variable name="cols-count">
@@ -2003,8 +2167,8 @@
2003
2167
  <xsl:if test="not(*[local-name()='th'])">
2004
2168
  <xsl:attribute name="min-height">8mm</xsl:attribute>
2005
2169
  </xsl:if>
2006
-
2007
-
2170
+
2171
+
2008
2172
 
2009
2173
  <xsl:apply-templates/>
2010
2174
  </fo:table-row>
@@ -2038,6 +2202,7 @@
2038
2202
  <xsl:attribute name="text-indent">0mm</xsl:attribute>
2039
2203
 
2040
2204
 
2205
+
2041
2206
  <xsl:if test="@colspan">
2042
2207
  <xsl:attribute name="number-columns-spanned">
2043
2208
  <xsl:value-of select="@colspan"/>
@@ -2077,7 +2242,7 @@
2077
2242
 
2078
2243
 
2079
2244
 
2080
-
2245
+
2081
2246
 
2082
2247
 
2083
2248
 
@@ -2092,6 +2257,7 @@
2092
2257
  <xsl:attribute name="text-indent">0mm</xsl:attribute>
2093
2258
 
2094
2259
 
2260
+
2095
2261
  <xsl:if test="@colspan">
2096
2262
  <xsl:attribute name="number-columns-spanned">
2097
2263
  <xsl:value-of select="@colspan"/>
@@ -2115,6 +2281,8 @@
2115
2281
 
2116
2282
 
2117
2283
 
2284
+
2285
+
2118
2286
  <fo:inline padding-right="2mm">
2119
2287
 
2120
2288
 
@@ -2129,10 +2297,11 @@
2129
2297
  </fo:inline> -->
2130
2298
  </xsl:if>
2131
2299
 
2132
-
2300
+
2133
2301
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2134
2302
 
2135
2303
  </fo:inline>
2304
+
2136
2305
  <xsl:apply-templates mode="process"/>
2137
2306
  </fo:block>
2138
2307
 
@@ -2156,6 +2325,7 @@
2156
2325
 
2157
2326
 
2158
2327
 
2328
+
2159
2329
  <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
2160
2330
 
2161
2331
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -2165,12 +2335,15 @@
2165
2335
 
2166
2336
 
2167
2337
 
2338
+
2168
2339
  <xsl:value-of select="@reference"/>
2169
2340
 
2341
+
2170
2342
  </fo:inline>
2171
2343
  <fo:inline>
2172
2344
 
2173
- <xsl:apply-templates/>
2345
+ <!-- <xsl:apply-templates /> -->
2346
+ <xsl:copy-of select="./node()"/>
2174
2347
  </fo:inline>
2175
2348
  </fo:block>
2176
2349
  </xsl:if>
@@ -2207,7 +2380,20 @@
2207
2380
  <xsl:variable name="following_dl_colwidths">
2208
2381
  <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2209
2382
  <xsl:variable name="html-table">
2210
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2383
+ <xsl:variable name="doc_ns">
2384
+
2385
+ </xsl:variable>
2386
+ <xsl:variable name="ns">
2387
+ <xsl:choose>
2388
+ <xsl:when test="normalize-space($doc_ns) != ''">
2389
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2390
+ </xsl:when>
2391
+ <xsl:otherwise>
2392
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2393
+ </xsl:otherwise>
2394
+ </xsl:choose>
2395
+ </xsl:variable>
2396
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2211
2397
  <xsl:element name="{$ns}:table">
2212
2398
  <xsl:for-each select="*[local-name() = 'dl'][1]">
2213
2399
  <tbody>
@@ -2272,7 +2458,8 @@
2272
2458
  <xsl:attribute name="margin-bottom">0</xsl:attribute>
2273
2459
  </xsl:if>
2274
2460
 
2275
- <xsl:apply-templates/>
2461
+ <!-- <xsl:apply-templates /> -->
2462
+ <xsl:copy-of select="./node()"/>
2276
2463
  </fo:block>
2277
2464
  </fo:table-cell>
2278
2465
  </fo:table-row>
@@ -2291,9 +2478,12 @@
2291
2478
 
2292
2479
 
2293
2480
 
2481
+
2294
2482
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2295
2483
 
2484
+
2296
2485
  <xsl:value-of select="@reference"/>
2486
+
2297
2487
  </fo:basic-link>
2298
2488
  </fo:inline>
2299
2489
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
@@ -2391,7 +2581,20 @@
2391
2581
  </xsl:choose>
2392
2582
  <!-- create virtual html table for dl/[dt and dd] -->
2393
2583
  <xsl:variable name="html-table">
2394
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2584
+ <xsl:variable name="doc_ns">
2585
+
2586
+ </xsl:variable>
2587
+ <xsl:variable name="ns">
2588
+ <xsl:choose>
2589
+ <xsl:when test="normalize-space($doc_ns) != ''">
2590
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2591
+ </xsl:when>
2592
+ <xsl:otherwise>
2593
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2594
+ </xsl:otherwise>
2595
+ </xsl:choose>
2596
+ </xsl:variable>
2597
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2395
2598
  <xsl:element name="{$ns}:table">
2396
2599
  <tbody>
2397
2600
  <xsl:apply-templates mode="dl"/>
@@ -2535,6 +2738,7 @@
2535
2738
 
2536
2739
 
2537
2740
 
2741
+
2538
2742
  <xsl:apply-templates/>
2539
2743
  <!-- <xsl:if test="$namespace = 'gb'">
2540
2744
  <xsl:if test="ancestor::*[local-name()='formula']">
@@ -2601,18 +2805,18 @@
2601
2805
  </xsl:template><xsl:template match="*[local-name()='tt']">
2602
2806
  <fo:inline xsl:use-attribute-sets="tt-style">
2603
2807
  <xsl:variable name="_font-size">
2604
-
2605
-
2606
-
2607
2808
 
2608
2809
 
2609
2810
 
2610
2811
 
2611
2812
 
2612
2813
 
2613
-
2614
2814
 
2615
-
2815
+
2816
+
2817
+
2818
+
2819
+
2616
2820
 
2617
2821
 
2618
2822
  </xsl:variable>
@@ -2950,7 +3154,7 @@
2950
3154
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
2951
3155
  <xsl:value-of select="substring($str, 2)"/>
2952
3156
  </xsl:template><xsl:template match="mathml:math">
2953
- <fo:inline font-family="STIX2Math">
3157
+ <fo:inline font-family="STIX Two Math"> <!-- -->
2954
3158
  <xsl:variable name="mathml">
2955
3159
  <xsl:apply-templates select="." mode="mathml"/>
2956
3160
  </xsl:variable>
@@ -3044,7 +3248,7 @@
3044
3248
  <xsl:apply-templates/>
3045
3249
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
3046
3250
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
3047
-
3251
+
3048
3252
  <xsl:apply-templates/>
3049
3253
  </fo:basic-link>
3050
3254
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -3263,18 +3467,9 @@
3263
3467
  <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
3264
3468
  <fo:bookmark-title>
3265
3469
  <xsl:variable name="bookmark-title_">
3266
- <xsl:choose>
3267
- <xsl:when test="@lang = 'en'">
3268
-
3269
-
3270
- </xsl:when>
3271
- <xsl:when test="@lang = 'fr'">
3272
-
3273
-
3274
- </xsl:when>
3275
- <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3276
- <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3277
- </xsl:choose>
3470
+ <xsl:call-template name="getLangVersion">
3471
+ <xsl:with-param name="lang" select="@lang"/>
3472
+ </xsl:call-template>
3278
3473
  </xsl:variable>
3279
3474
  <xsl:choose>
3280
3475
  <xsl:when test="normalize-space($bookmark-title_) != ''">
@@ -3316,6 +3511,20 @@
3316
3511
 
3317
3512
  </fo:bookmark-tree>
3318
3513
  </xsl:if>
3514
+ </xsl:template><xsl:template name="getLangVersion">
3515
+ <xsl:param name="lang"/>
3516
+ <xsl:choose>
3517
+ <xsl:when test="$lang = 'en'">
3518
+
3519
+
3520
+ </xsl:when>
3521
+ <xsl:when test="$lang = 'fr'">
3522
+
3523
+
3524
+ </xsl:when>
3525
+ <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
3526
+ <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
3527
+ </xsl:choose>
3319
3528
  </xsl:template><xsl:template match="item" mode="bookmark">
3320
3529
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
3321
3530
  <fo:bookmark-title>
@@ -3330,7 +3539,7 @@
3330
3539
  </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
3331
3540
  <xsl:if test="normalize-space() != ''">
3332
3541
  <fo:block xsl:use-attribute-sets="figure-name-style">
3333
-
3542
+
3334
3543
  <xsl:apply-templates/>
3335
3544
  </fo:block>
3336
3545
  </xsl:if>
@@ -3966,6 +4175,7 @@
3966
4175
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
3967
4176
  <fo:block>
3968
4177
  <xsl:call-template name="setId"/>
4178
+
3969
4179
  <xsl:apply-templates/>
3970
4180
  </fo:block>
3971
4181
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
@@ -4006,6 +4216,7 @@
4006
4216
  </xsl:choose>
4007
4217
  </xsl:attribute>
4008
4218
 
4219
+
4009
4220
  <fo:block-container margin-left="0mm">
4010
4221
  <fo:block>
4011
4222
  <xsl:apply-templates select="." mode="ul_ol"/>
@@ -4191,6 +4402,7 @@
4191
4402
 
4192
4403
 
4193
4404
 
4405
+
4194
4406
 
4195
4407
  </xsl:variable>
4196
4408
  <xsl:choose>
@@ -4205,6 +4417,7 @@
4205
4417
  <dc:creator>
4206
4418
 
4207
4419
 
4420
+
4208
4421
  </dc:creator>
4209
4422
  <dc:description>
4210
4423
  <xsl:variable name="abstract">
@@ -4214,6 +4427,7 @@
4214
4427
  <xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
4215
4428
 
4216
4429
 
4430
+
4217
4431
  </xsl:variable>
4218
4432
  <xsl:value-of select="normalize-space($abstract)"/>
4219
4433
  </dc:description>