metanorma-iho 0.2.4 → 0.2.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: cfcef8b84ef111f6f524d3be2ab6e10a1f5a167e78340028484ddce1e2dbcd2e
4
- data.tar.gz: b43a8f171ddce0f39422172bce91c522abbbb26cd4ed71374feaa4156b544766
3
+ metadata.gz: 220adb84380d83295f89f7657a7311c2242c0b36ca7ad3cf8f87badc7a53d9a9
4
+ data.tar.gz: b5d713d761cc297c8cb434912eb1ebb3b8ee541036f05679341c62d94141ec45
5
5
  SHA512:
6
- metadata.gz: 4f394dc0d1fb60c38446fc4c9331b8e8d6c7a21a9669584740912cc7c4c299a5ea80d0a026af23d2f2b519a3bbe2bf500cb64d4cdb3721fe27aa86c3960ae924
7
- data.tar.gz: d009ab8824da4788e723e734320c3d95641fc52541fbce2f3f2af843bcf653382c52b15c78114389bf4da46abd9b3b484c7da51b7f7d6c239c2db0925dd6939b
6
+ metadata.gz: 1046417d144ae07ced41c663572cc23f4b95526b61d0a59f5f8525b3b4e38906e70c2737cc54de5488f556e2e58f878008792f82352485875829662b1372bbb3
7
+ data.tar.gz: 7f1a7d1208ace1b629eb26214ac2938f8e1bc45b1c6897b4cdac08d67182d609d5c5ee06d7ed9cbd259aa007a7eaf43856f1c606068fa969734375715db991db
@@ -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>
@@ -12,7 +12,6 @@ module IsoDoc
12
12
 
13
13
  def info(isoxml, out)
14
14
  @meta.series isoxml, out
15
- @meta.commentperiod isoxml, out
16
15
  super
17
16
  end
18
17
 
@@ -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; }
@@ -981,7 +981,12 @@
981
981
 
982
982
 
983
983
  </title-toc>
984
- <title-toc lang="fr">Sommaire</title-toc>
984
+ <title-toc lang="fr">
985
+
986
+ <xsl:text>Sommaire</xsl:text>
987
+
988
+
989
+ </title-toc>
985
990
 
986
991
  <title-toc lang="zh">Contents</title-toc>
987
992
 
@@ -1069,10 +1074,19 @@
1069
1074
 
1070
1075
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1071
1076
  <xsl:param name="name"/>
1072
- <xsl:variable name="lang">
1073
- <xsl:call-template name="getLang"/>
1077
+ <xsl:param name="lang"/>
1078
+ <xsl:variable name="lang_">
1079
+ <xsl:choose>
1080
+ <xsl:when test="$lang != ''">
1081
+ <xsl:value-of select="$lang"/>
1082
+ </xsl:when>
1083
+ <xsl:otherwise>
1084
+ <xsl:call-template name="getLang"/>
1085
+ </xsl:otherwise>
1086
+ </xsl:choose>
1074
1087
  </xsl:variable>
1075
- <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $lang]"/>
1088
+ <xsl:variable name="language" select="normalize-space($lang_)"/>
1089
+ <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
1076
1090
  <xsl:choose>
1077
1091
  <xsl:when test="normalize-space($title_) != ''">
1078
1092
  <xsl:value-of select="$title_"/>
@@ -1226,6 +1240,7 @@
1226
1240
 
1227
1241
 
1228
1242
 
1243
+
1229
1244
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1230
1245
 
1231
1246
 
@@ -1470,6 +1485,8 @@
1470
1485
 
1471
1486
 
1472
1487
 
1488
+
1489
+
1473
1490
  <!-- $namespace = 'iso' or -->
1474
1491
 
1475
1492
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -1507,6 +1524,7 @@
1507
1524
  <xsl:with-param name="table" select="$simple-table"/>
1508
1525
  </xsl:call-template>
1509
1526
  </xsl:variable>
1527
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1510
1528
 
1511
1529
  <!-- <xsl:variable name="colwidths2">
1512
1530
  <xsl:call-template name="calculate-column-widths">
@@ -1528,10 +1546,13 @@
1528
1546
  <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1529
1547
 
1530
1548
 
1549
+
1550
+
1551
+
1531
1552
 
1532
1553
 
1554
+
1533
1555
 
1534
-
1535
1556
 
1536
1557
 
1537
1558
  <xsl:attribute name="space-after">18pt</xsl:attribute>
@@ -1539,23 +1560,42 @@
1539
1560
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
1540
1561
 
1541
1562
 
1542
- <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">
1543
-
1544
-
1545
-
1546
-
1547
-
1548
-
1563
+
1564
+
1565
+
1566
+ <xsl:variable name="table_attributes">
1567
+ <attribute name="table-layout">fixed</attribute>
1568
+ <attribute name="width">100%</attribute>
1569
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1570
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1549
1571
 
1550
1572
 
1551
1573
 
1552
1574
 
1575
+
1576
+
1577
+
1578
+
1579
+ <attribute name="margin-left">0mm</attribute>
1580
+ <attribute name="margin-right">0mm</attribute>
1553
1581
 
1554
1582
 
1555
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1556
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
1557
1583
 
1584
+ </xsl:variable>
1585
+
1586
+
1587
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
1558
1588
 
1589
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1590
+ <xsl:attribute name="{@name}">
1591
+ <xsl:value-of select="."/>
1592
+ </xsl:attribute>
1593
+ </xsl:for-each>
1594
+
1595
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1596
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1597
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1598
+ </xsl:if>
1559
1599
 
1560
1600
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1561
1601
  <xsl:choose>
@@ -1579,6 +1619,33 @@
1579
1619
 
1580
1620
  </fo:table>
1581
1621
 
1622
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1623
+ <xsl:call-template name="insertTableFooterInSeparateTable">
1624
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
1625
+ <xsl:with-param name="colwidths" select="$colwidths"/>
1626
+ </xsl:call-template>
1627
+ </xsl:for-each>
1628
+
1629
+ <!-- insert footer as table -->
1630
+ <!-- <fo:table>
1631
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1632
+ <xsl:attribute name="{@name}">
1633
+ <xsl:value-of select="."/>
1634
+ </xsl:attribute>
1635
+ </xsl:for-each>
1636
+
1637
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1638
+ <xsl:choose>
1639
+ <xsl:when test=". = 1 or . = 0">
1640
+ <fo:table-column column-width="proportional-column-width(2)"/>
1641
+ </xsl:when>
1642
+ <xsl:otherwise>
1643
+ <fo:table-column column-width="proportional-column-width({.})"/>
1644
+ </xsl:otherwise>
1645
+ </xsl:choose>
1646
+ </xsl:for-each>
1647
+ </fo:table>-->
1648
+
1582
1649
 
1583
1650
 
1584
1651
 
@@ -1643,6 +1710,13 @@
1643
1710
  <xsl:for-each select="xalan:nodeset($table)//tr">
1644
1711
  <xsl:variable name="td_text">
1645
1712
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
1713
+
1714
+ <!-- <xsl:if test="$namespace = 'bipm'">
1715
+ <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
1716
+ <word><xsl:value-of select="normalize-space(.)"/></word>
1717
+ </xsl:for-each>
1718
+ </xsl:if> -->
1719
+
1646
1720
  </xsl:variable>
1647
1721
  <xsl:variable name="words">
1648
1722
  <xsl:variable name="string_with_added_zerospaces">
@@ -1702,11 +1776,14 @@
1702
1776
  <xsl:value-of select="*[local-name()='origin']/@citeas"/>
1703
1777
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
1704
1778
  <xsl:value-of select="@target"/>
1779
+ </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
1780
+ <xsl:variable name="math_text" select="normalize-space(.)"/>
1781
+ <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
1705
1782
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1706
1783
  <xsl:param name="cols-count"/>
1707
1784
  <!-- font-weight="bold" -->
1708
1785
  <fo:table-header>
1709
-
1786
+
1710
1787
  <xsl:apply-templates/>
1711
1788
  </fo:table-header>
1712
1789
  </xsl:template><xsl:template name="table-header-title">
@@ -1731,6 +1808,13 @@
1731
1808
  </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
1732
1809
  <xsl:apply-templates/>
1733
1810
  </xsl:template><xsl:template name="insertTableFooter">
1811
+ <xsl:param name="cols-count"/>
1812
+ <xsl:if test="../*[local-name()='tfoot']">
1813
+ <fo:table-footer>
1814
+ <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
1815
+ </fo:table-footer>
1816
+ </xsl:if>
1817
+ </xsl:template><xsl:template name="insertTableFooter2">
1734
1818
  <xsl:param name="cols-count"/>
1735
1819
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1736
1820
  <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
@@ -1752,11 +1836,15 @@
1752
1836
  <!-- fn will be processed inside 'note' processing -->
1753
1837
 
1754
1838
 
1755
- <!-- except gb -->
1839
+
1840
+ <!-- except gb and bipm -->
1756
1841
 
1757
1842
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1758
1843
 
1759
1844
 
1845
+
1846
+
1847
+
1760
1848
  <!-- horizontal row separator -->
1761
1849
 
1762
1850
 
@@ -1770,6 +1858,84 @@
1770
1858
  </fo:table-footer>
1771
1859
 
1772
1860
  </xsl:if>
1861
+ </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
1862
+ <xsl:param name="table_attributes"/>
1863
+ <xsl:param name="colwidths"/>
1864
+
1865
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1866
+
1867
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1868
+
1869
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
1870
+
1871
+ <fo:table keep-with-previous="always">
1872
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1873
+ <xsl:choose>
1874
+ <xsl:when test="@name = 'border-top'">
1875
+ <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
1876
+ </xsl:when>
1877
+ <xsl:when test="@name = 'border'">
1878
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
1879
+ <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
1880
+ </xsl:when>
1881
+ <xsl:otherwise>
1882
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
1883
+ </xsl:otherwise>
1884
+ </xsl:choose>
1885
+ </xsl:for-each>
1886
+
1887
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1888
+ <xsl:choose>
1889
+ <xsl:when test=". = 1 or . = 0">
1890
+ <fo:table-column column-width="proportional-column-width(2)"/>
1891
+ </xsl:when>
1892
+ <xsl:otherwise>
1893
+ <fo:table-column column-width="proportional-column-width({.})"/>
1894
+ </xsl:otherwise>
1895
+ </xsl:choose>
1896
+ </xsl:for-each>
1897
+
1898
+ <fo:table-body>
1899
+ <fo:table-row>
1900
+ <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
1901
+
1902
+
1903
+
1904
+ <!-- fn will be processed inside 'note' processing -->
1905
+
1906
+
1907
+
1908
+ <!-- except gb and bipm -->
1909
+
1910
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1911
+
1912
+
1913
+ <!-- <xsl:if test="$namespace = 'bipm'">
1914
+ <xsl:choose>
1915
+ <xsl:when test="ancestor::*[local-name()='preface']">
1916
+ show Note under table in preface (ex. abstract) sections
1917
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1918
+ </xsl:when>
1919
+ <xsl:otherwise>
1920
+ empty, because notes show at page side in main sections
1921
+ <fo:block/>
1922
+ </xsl:otherwise>
1923
+ </xsl:choose>
1924
+ </xsl:if> -->
1925
+
1926
+
1927
+ <!-- horizontal row separator -->
1928
+
1929
+
1930
+ <!-- fn processing -->
1931
+ <xsl:call-template name="fn_display"/>
1932
+
1933
+ </fo:table-cell>
1934
+ </fo:table-row>
1935
+ </fo:table-body>
1936
+
1937
+ </fo:table>
1938
+ </xsl:if>
1773
1939
  </xsl:template><xsl:template match="*[local-name()='tbody']">
1774
1940
 
1775
1941
  <xsl:variable name="cols-count">
@@ -1822,8 +1988,8 @@
1822
1988
 
1823
1989
  </xsl:if>
1824
1990
 
1825
-
1826
-
1991
+
1992
+
1827
1993
 
1828
1994
  <xsl:apply-templates/>
1829
1995
  </fo:table-row>
@@ -1847,6 +2013,7 @@
1847
2013
 
1848
2014
 
1849
2015
 
2016
+
1850
2017
  <xsl:if test="@colspan">
1851
2018
  <xsl:attribute name="number-columns-spanned">
1852
2019
  <xsl:value-of select="@colspan"/>
@@ -1888,7 +2055,8 @@
1888
2055
 
1889
2056
 
1890
2057
 
1891
-
2058
+
2059
+
1892
2060
 
1893
2061
 
1894
2062
 
@@ -1920,6 +2088,8 @@
1920
2088
 
1921
2089
  <xsl:attribute name="font-size">12pt</xsl:attribute>
1922
2090
 
2091
+
2092
+
1923
2093
  <fo:inline padding-right="2mm">
1924
2094
 
1925
2095
 
@@ -1927,10 +2097,11 @@
1927
2097
  <xsl:attribute name="padding-right">3mm</xsl:attribute>
1928
2098
 
1929
2099
 
1930
-
2100
+
1931
2101
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
1932
2102
 
1933
2103
  </fo:inline>
2104
+
1934
2105
  <xsl:apply-templates mode="process"/>
1935
2106
  </fo:block>
1936
2107
 
@@ -1954,6 +2125,7 @@
1954
2125
 
1955
2126
 
1956
2127
 
2128
+
1957
2129
  <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
1958
2130
 
1959
2131
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -1963,12 +2135,15 @@
1963
2135
 
1964
2136
 
1965
2137
 
2138
+
1966
2139
  <xsl:value-of select="@reference"/>
1967
2140
 
2141
+
1968
2142
  </fo:inline>
1969
2143
  <fo:inline>
1970
2144
 
1971
- <xsl:apply-templates/>
2145
+ <!-- <xsl:apply-templates /> -->
2146
+ <xsl:copy-of select="./node()"/>
1972
2147
  </fo:inline>
1973
2148
  </fo:block>
1974
2149
  </xsl:if>
@@ -2005,7 +2180,20 @@
2005
2180
  <xsl:variable name="following_dl_colwidths">
2006
2181
  <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2007
2182
  <xsl:variable name="html-table">
2008
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2183
+ <xsl:variable name="doc_ns">
2184
+
2185
+ </xsl:variable>
2186
+ <xsl:variable name="ns">
2187
+ <xsl:choose>
2188
+ <xsl:when test="normalize-space($doc_ns) != ''">
2189
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2190
+ </xsl:when>
2191
+ <xsl:otherwise>
2192
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2193
+ </xsl:otherwise>
2194
+ </xsl:choose>
2195
+ </xsl:variable>
2196
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2009
2197
  <xsl:element name="{$ns}:table">
2010
2198
  <xsl:for-each select="*[local-name() = 'dl'][1]">
2011
2199
  <tbody>
@@ -2070,7 +2258,8 @@
2070
2258
  <xsl:attribute name="margin-bottom">0</xsl:attribute>
2071
2259
  </xsl:if>
2072
2260
 
2073
- <xsl:apply-templates/>
2261
+ <!-- <xsl:apply-templates /> -->
2262
+ <xsl:copy-of select="./node()"/>
2074
2263
  </fo:block>
2075
2264
  </fo:table-cell>
2076
2265
  </fo:table-row>
@@ -2089,9 +2278,12 @@
2089
2278
 
2090
2279
 
2091
2280
 
2281
+
2092
2282
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2093
2283
 
2284
+
2094
2285
  <xsl:value-of select="@reference"/>
2286
+
2095
2287
  </fo:basic-link>
2096
2288
  </fo:inline>
2097
2289
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
@@ -2193,7 +2385,20 @@
2193
2385
  </xsl:choose>
2194
2386
  <!-- create virtual html table for dl/[dt and dd] -->
2195
2387
  <xsl:variable name="html-table">
2196
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2388
+ <xsl:variable name="doc_ns">
2389
+
2390
+ </xsl:variable>
2391
+ <xsl:variable name="ns">
2392
+ <xsl:choose>
2393
+ <xsl:when test="normalize-space($doc_ns) != ''">
2394
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2395
+ </xsl:when>
2396
+ <xsl:otherwise>
2397
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2398
+ </xsl:otherwise>
2399
+ </xsl:choose>
2400
+ </xsl:variable>
2401
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2197
2402
  <xsl:element name="{$ns}:table">
2198
2403
  <tbody>
2199
2404
  <xsl:apply-templates mode="dl"/>
@@ -2340,6 +2545,7 @@
2340
2545
 
2341
2546
 
2342
2547
 
2548
+
2343
2549
  <xsl:apply-templates/>
2344
2550
  <!-- <xsl:if test="$namespace = 'gb'">
2345
2551
  <xsl:if test="ancestor::*[local-name()='formula']">
@@ -2406,18 +2612,18 @@
2406
2612
  </xsl:template><xsl:template match="*[local-name()='tt']">
2407
2613
  <fo:inline xsl:use-attribute-sets="tt-style">
2408
2614
  <xsl:variable name="_font-size">
2409
-
2410
-
2411
-
2615
+
2616
+
2617
+
2412
2618
 
2413
2619
  10
2414
2620
 
2415
2621
 
2416
2622
 
2417
2623
 
2418
-
2419
2624
 
2420
-
2625
+
2626
+
2421
2627
 
2422
2628
 
2423
2629
  </xsl:variable>
@@ -2755,7 +2961,7 @@
2755
2961
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
2756
2962
  <xsl:value-of select="substring($str, 2)"/>
2757
2963
  </xsl:template><xsl:template match="mathml:math">
2758
- <fo:inline font-family="STIX2Math">
2964
+ <fo:inline font-family="STIX Two Math"> <!-- -->
2759
2965
  <xsl:variable name="mathml">
2760
2966
  <xsl:apply-templates select="." mode="mathml"/>
2761
2967
  </xsl:variable>
@@ -2849,7 +3055,7 @@
2849
3055
  <xsl:apply-templates/>
2850
3056
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
2851
3057
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
2852
-
3058
+
2853
3059
  <xsl:apply-templates/>
2854
3060
  </fo:basic-link>
2855
3061
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -3059,18 +3265,9 @@
3059
3265
  <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
3060
3266
  <fo:bookmark-title>
3061
3267
  <xsl:variable name="bookmark-title_">
3062
- <xsl:choose>
3063
- <xsl:when test="@lang = 'en'">
3064
-
3065
-
3066
- </xsl:when>
3067
- <xsl:when test="@lang = 'fr'">
3068
-
3069
-
3070
- </xsl:when>
3071
- <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3072
- <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3073
- </xsl:choose>
3268
+ <xsl:call-template name="getLangVersion">
3269
+ <xsl:with-param name="lang" select="@lang"/>
3270
+ </xsl:call-template>
3074
3271
  </xsl:variable>
3075
3272
  <xsl:choose>
3076
3273
  <xsl:when test="normalize-space($bookmark-title_) != ''">
@@ -3112,6 +3309,20 @@
3112
3309
 
3113
3310
  </fo:bookmark-tree>
3114
3311
  </xsl:if>
3312
+ </xsl:template><xsl:template name="getLangVersion">
3313
+ <xsl:param name="lang"/>
3314
+ <xsl:choose>
3315
+ <xsl:when test="$lang = 'en'">
3316
+
3317
+
3318
+ </xsl:when>
3319
+ <xsl:when test="$lang = 'fr'">
3320
+
3321
+
3322
+ </xsl:when>
3323
+ <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
3324
+ <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
3325
+ </xsl:choose>
3115
3326
  </xsl:template><xsl:template match="item" mode="bookmark">
3116
3327
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
3117
3328
  <fo:bookmark-title>
@@ -3126,7 +3337,7 @@
3126
3337
  </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">
3127
3338
  <xsl:if test="normalize-space() != ''">
3128
3339
  <fo:block xsl:use-attribute-sets="figure-name-style">
3129
-
3340
+
3130
3341
  <xsl:apply-templates/>
3131
3342
  </fo:block>
3132
3343
  </xsl:if>
@@ -3762,6 +3973,7 @@
3762
3973
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
3763
3974
  <fo:block>
3764
3975
  <xsl:call-template name="setId"/>
3976
+
3765
3977
  <xsl:apply-templates/>
3766
3978
  </fo:block>
3767
3979
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
@@ -3797,6 +4009,7 @@
3797
4009
  </xsl:choose>
3798
4010
  </xsl:attribute>
3799
4011
 
4012
+
3800
4013
  <fo:block-container margin-left="0mm">
3801
4014
  <fo:block>
3802
4015
  <xsl:apply-templates select="." mode="ul_ol"/>
@@ -4077,6 +4290,7 @@
4077
4290
  <dc:title>
4078
4291
  <xsl:variable name="title">
4079
4292
 
4293
+
4080
4294
 
4081
4295
  <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
4082
4296
 
@@ -4097,6 +4311,7 @@
4097
4311
  <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
4098
4312
 
4099
4313
 
4314
+
4100
4315
  </dc:creator>
4101
4316
  <dc:description>
4102
4317
  <xsl:variable name="abstract">
@@ -4106,6 +4321,7 @@
4106
4321
 
4107
4322
 
4108
4323
 
4324
+
4109
4325
  </xsl:variable>
4110
4326
  <xsl:value-of select="normalize-space($abstract)"/>
4111
4327
  </dc:description>
@@ -981,7 +981,12 @@
981
981
 
982
982
 
983
983
  </title-toc>
984
- <title-toc lang="fr">Sommaire</title-toc>
984
+ <title-toc lang="fr">
985
+
986
+ <xsl:text>Sommaire</xsl:text>
987
+
988
+
989
+ </title-toc>
985
990
 
986
991
  <title-toc lang="zh">Contents</title-toc>
987
992
 
@@ -1069,10 +1074,19 @@
1069
1074
 
1070
1075
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1071
1076
  <xsl:param name="name"/>
1072
- <xsl:variable name="lang">
1073
- <xsl:call-template name="getLang"/>
1077
+ <xsl:param name="lang"/>
1078
+ <xsl:variable name="lang_">
1079
+ <xsl:choose>
1080
+ <xsl:when test="$lang != ''">
1081
+ <xsl:value-of select="$lang"/>
1082
+ </xsl:when>
1083
+ <xsl:otherwise>
1084
+ <xsl:call-template name="getLang"/>
1085
+ </xsl:otherwise>
1086
+ </xsl:choose>
1074
1087
  </xsl:variable>
1075
- <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $lang]"/>
1088
+ <xsl:variable name="language" select="normalize-space($lang_)"/>
1089
+ <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
1076
1090
  <xsl:choose>
1077
1091
  <xsl:when test="normalize-space($title_) != ''">
1078
1092
  <xsl:value-of select="$title_"/>
@@ -1226,6 +1240,7 @@
1226
1240
 
1227
1241
 
1228
1242
 
1243
+
1229
1244
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1230
1245
 
1231
1246
 
@@ -1470,6 +1485,8 @@
1470
1485
 
1471
1486
 
1472
1487
 
1488
+
1489
+
1473
1490
  <!-- $namespace = 'iso' or -->
1474
1491
 
1475
1492
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -1507,6 +1524,7 @@
1507
1524
  <xsl:with-param name="table" select="$simple-table"/>
1508
1525
  </xsl:call-template>
1509
1526
  </xsl:variable>
1527
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1510
1528
 
1511
1529
  <!-- <xsl:variable name="colwidths2">
1512
1530
  <xsl:call-template name="calculate-column-widths">
@@ -1528,10 +1546,13 @@
1528
1546
  <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1529
1547
 
1530
1548
 
1549
+
1550
+
1551
+
1531
1552
 
1532
1553
 
1554
+
1533
1555
 
1534
-
1535
1556
 
1536
1557
 
1537
1558
  <xsl:attribute name="space-after">18pt</xsl:attribute>
@@ -1539,23 +1560,42 @@
1539
1560
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
1540
1561
 
1541
1562
 
1542
- <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">
1543
-
1544
-
1545
-
1546
-
1547
-
1548
-
1563
+
1564
+
1565
+
1566
+ <xsl:variable name="table_attributes">
1567
+ <attribute name="table-layout">fixed</attribute>
1568
+ <attribute name="width">100%</attribute>
1569
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1570
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1549
1571
 
1550
1572
 
1551
1573
 
1552
1574
 
1575
+
1576
+
1577
+
1578
+
1579
+ <attribute name="margin-left">0mm</attribute>
1580
+ <attribute name="margin-right">0mm</attribute>
1553
1581
 
1554
1582
 
1555
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1556
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
1557
1583
 
1584
+ </xsl:variable>
1585
+
1586
+
1587
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
1558
1588
 
1589
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1590
+ <xsl:attribute name="{@name}">
1591
+ <xsl:value-of select="."/>
1592
+ </xsl:attribute>
1593
+ </xsl:for-each>
1594
+
1595
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1596
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1597
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1598
+ </xsl:if>
1559
1599
 
1560
1600
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1561
1601
  <xsl:choose>
@@ -1579,6 +1619,33 @@
1579
1619
 
1580
1620
  </fo:table>
1581
1621
 
1622
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1623
+ <xsl:call-template name="insertTableFooterInSeparateTable">
1624
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
1625
+ <xsl:with-param name="colwidths" select="$colwidths"/>
1626
+ </xsl:call-template>
1627
+ </xsl:for-each>
1628
+
1629
+ <!-- insert footer as table -->
1630
+ <!-- <fo:table>
1631
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1632
+ <xsl:attribute name="{@name}">
1633
+ <xsl:value-of select="."/>
1634
+ </xsl:attribute>
1635
+ </xsl:for-each>
1636
+
1637
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1638
+ <xsl:choose>
1639
+ <xsl:when test=". = 1 or . = 0">
1640
+ <fo:table-column column-width="proportional-column-width(2)"/>
1641
+ </xsl:when>
1642
+ <xsl:otherwise>
1643
+ <fo:table-column column-width="proportional-column-width({.})"/>
1644
+ </xsl:otherwise>
1645
+ </xsl:choose>
1646
+ </xsl:for-each>
1647
+ </fo:table>-->
1648
+
1582
1649
 
1583
1650
 
1584
1651
 
@@ -1643,6 +1710,13 @@
1643
1710
  <xsl:for-each select="xalan:nodeset($table)//tr">
1644
1711
  <xsl:variable name="td_text">
1645
1712
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
1713
+
1714
+ <!-- <xsl:if test="$namespace = 'bipm'">
1715
+ <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
1716
+ <word><xsl:value-of select="normalize-space(.)"/></word>
1717
+ </xsl:for-each>
1718
+ </xsl:if> -->
1719
+
1646
1720
  </xsl:variable>
1647
1721
  <xsl:variable name="words">
1648
1722
  <xsl:variable name="string_with_added_zerospaces">
@@ -1702,11 +1776,14 @@
1702
1776
  <xsl:value-of select="*[local-name()='origin']/@citeas"/>
1703
1777
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
1704
1778
  <xsl:value-of select="@target"/>
1779
+ </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
1780
+ <xsl:variable name="math_text" select="normalize-space(.)"/>
1781
+ <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
1705
1782
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1706
1783
  <xsl:param name="cols-count"/>
1707
1784
  <!-- font-weight="bold" -->
1708
1785
  <fo:table-header>
1709
-
1786
+
1710
1787
  <xsl:apply-templates/>
1711
1788
  </fo:table-header>
1712
1789
  </xsl:template><xsl:template name="table-header-title">
@@ -1731,6 +1808,13 @@
1731
1808
  </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
1732
1809
  <xsl:apply-templates/>
1733
1810
  </xsl:template><xsl:template name="insertTableFooter">
1811
+ <xsl:param name="cols-count"/>
1812
+ <xsl:if test="../*[local-name()='tfoot']">
1813
+ <fo:table-footer>
1814
+ <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
1815
+ </fo:table-footer>
1816
+ </xsl:if>
1817
+ </xsl:template><xsl:template name="insertTableFooter2">
1734
1818
  <xsl:param name="cols-count"/>
1735
1819
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1736
1820
  <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
@@ -1752,11 +1836,15 @@
1752
1836
  <!-- fn will be processed inside 'note' processing -->
1753
1837
 
1754
1838
 
1755
- <!-- except gb -->
1839
+
1840
+ <!-- except gb and bipm -->
1756
1841
 
1757
1842
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1758
1843
 
1759
1844
 
1845
+
1846
+
1847
+
1760
1848
  <!-- horizontal row separator -->
1761
1849
 
1762
1850
 
@@ -1770,6 +1858,84 @@
1770
1858
  </fo:table-footer>
1771
1859
 
1772
1860
  </xsl:if>
1861
+ </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
1862
+ <xsl:param name="table_attributes"/>
1863
+ <xsl:param name="colwidths"/>
1864
+
1865
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1866
+
1867
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1868
+
1869
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
1870
+
1871
+ <fo:table keep-with-previous="always">
1872
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1873
+ <xsl:choose>
1874
+ <xsl:when test="@name = 'border-top'">
1875
+ <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
1876
+ </xsl:when>
1877
+ <xsl:when test="@name = 'border'">
1878
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
1879
+ <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
1880
+ </xsl:when>
1881
+ <xsl:otherwise>
1882
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
1883
+ </xsl:otherwise>
1884
+ </xsl:choose>
1885
+ </xsl:for-each>
1886
+
1887
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1888
+ <xsl:choose>
1889
+ <xsl:when test=". = 1 or . = 0">
1890
+ <fo:table-column column-width="proportional-column-width(2)"/>
1891
+ </xsl:when>
1892
+ <xsl:otherwise>
1893
+ <fo:table-column column-width="proportional-column-width({.})"/>
1894
+ </xsl:otherwise>
1895
+ </xsl:choose>
1896
+ </xsl:for-each>
1897
+
1898
+ <fo:table-body>
1899
+ <fo:table-row>
1900
+ <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
1901
+
1902
+
1903
+
1904
+ <!-- fn will be processed inside 'note' processing -->
1905
+
1906
+
1907
+
1908
+ <!-- except gb and bipm -->
1909
+
1910
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1911
+
1912
+
1913
+ <!-- <xsl:if test="$namespace = 'bipm'">
1914
+ <xsl:choose>
1915
+ <xsl:when test="ancestor::*[local-name()='preface']">
1916
+ show Note under table in preface (ex. abstract) sections
1917
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1918
+ </xsl:when>
1919
+ <xsl:otherwise>
1920
+ empty, because notes show at page side in main sections
1921
+ <fo:block/>
1922
+ </xsl:otherwise>
1923
+ </xsl:choose>
1924
+ </xsl:if> -->
1925
+
1926
+
1927
+ <!-- horizontal row separator -->
1928
+
1929
+
1930
+ <!-- fn processing -->
1931
+ <xsl:call-template name="fn_display"/>
1932
+
1933
+ </fo:table-cell>
1934
+ </fo:table-row>
1935
+ </fo:table-body>
1936
+
1937
+ </fo:table>
1938
+ </xsl:if>
1773
1939
  </xsl:template><xsl:template match="*[local-name()='tbody']">
1774
1940
 
1775
1941
  <xsl:variable name="cols-count">
@@ -1822,8 +1988,8 @@
1822
1988
 
1823
1989
  </xsl:if>
1824
1990
 
1825
-
1826
-
1991
+
1992
+
1827
1993
 
1828
1994
  <xsl:apply-templates/>
1829
1995
  </fo:table-row>
@@ -1847,6 +2013,7 @@
1847
2013
 
1848
2014
 
1849
2015
 
2016
+
1850
2017
  <xsl:if test="@colspan">
1851
2018
  <xsl:attribute name="number-columns-spanned">
1852
2019
  <xsl:value-of select="@colspan"/>
@@ -1888,7 +2055,8 @@
1888
2055
 
1889
2056
 
1890
2057
 
1891
-
2058
+
2059
+
1892
2060
 
1893
2061
 
1894
2062
 
@@ -1920,6 +2088,8 @@
1920
2088
 
1921
2089
  <xsl:attribute name="font-size">12pt</xsl:attribute>
1922
2090
 
2091
+
2092
+
1923
2093
  <fo:inline padding-right="2mm">
1924
2094
 
1925
2095
 
@@ -1927,10 +2097,11 @@
1927
2097
  <xsl:attribute name="padding-right">3mm</xsl:attribute>
1928
2098
 
1929
2099
 
1930
-
2100
+
1931
2101
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
1932
2102
 
1933
2103
  </fo:inline>
2104
+
1934
2105
  <xsl:apply-templates mode="process"/>
1935
2106
  </fo:block>
1936
2107
 
@@ -1954,6 +2125,7 @@
1954
2125
 
1955
2126
 
1956
2127
 
2128
+
1957
2129
  <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
1958
2130
 
1959
2131
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -1963,12 +2135,15 @@
1963
2135
 
1964
2136
 
1965
2137
 
2138
+
1966
2139
  <xsl:value-of select="@reference"/>
1967
2140
 
2141
+
1968
2142
  </fo:inline>
1969
2143
  <fo:inline>
1970
2144
 
1971
- <xsl:apply-templates/>
2145
+ <!-- <xsl:apply-templates /> -->
2146
+ <xsl:copy-of select="./node()"/>
1972
2147
  </fo:inline>
1973
2148
  </fo:block>
1974
2149
  </xsl:if>
@@ -2005,7 +2180,20 @@
2005
2180
  <xsl:variable name="following_dl_colwidths">
2006
2181
  <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2007
2182
  <xsl:variable name="html-table">
2008
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2183
+ <xsl:variable name="doc_ns">
2184
+
2185
+ </xsl:variable>
2186
+ <xsl:variable name="ns">
2187
+ <xsl:choose>
2188
+ <xsl:when test="normalize-space($doc_ns) != ''">
2189
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2190
+ </xsl:when>
2191
+ <xsl:otherwise>
2192
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2193
+ </xsl:otherwise>
2194
+ </xsl:choose>
2195
+ </xsl:variable>
2196
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2009
2197
  <xsl:element name="{$ns}:table">
2010
2198
  <xsl:for-each select="*[local-name() = 'dl'][1]">
2011
2199
  <tbody>
@@ -2070,7 +2258,8 @@
2070
2258
  <xsl:attribute name="margin-bottom">0</xsl:attribute>
2071
2259
  </xsl:if>
2072
2260
 
2073
- <xsl:apply-templates/>
2261
+ <!-- <xsl:apply-templates /> -->
2262
+ <xsl:copy-of select="./node()"/>
2074
2263
  </fo:block>
2075
2264
  </fo:table-cell>
2076
2265
  </fo:table-row>
@@ -2089,9 +2278,12 @@
2089
2278
 
2090
2279
 
2091
2280
 
2281
+
2092
2282
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2093
2283
 
2284
+
2094
2285
  <xsl:value-of select="@reference"/>
2286
+
2095
2287
  </fo:basic-link>
2096
2288
  </fo:inline>
2097
2289
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
@@ -2193,7 +2385,20 @@
2193
2385
  </xsl:choose>
2194
2386
  <!-- create virtual html table for dl/[dt and dd] -->
2195
2387
  <xsl:variable name="html-table">
2196
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2388
+ <xsl:variable name="doc_ns">
2389
+
2390
+ </xsl:variable>
2391
+ <xsl:variable name="ns">
2392
+ <xsl:choose>
2393
+ <xsl:when test="normalize-space($doc_ns) != ''">
2394
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2395
+ </xsl:when>
2396
+ <xsl:otherwise>
2397
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2398
+ </xsl:otherwise>
2399
+ </xsl:choose>
2400
+ </xsl:variable>
2401
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2197
2402
  <xsl:element name="{$ns}:table">
2198
2403
  <tbody>
2199
2404
  <xsl:apply-templates mode="dl"/>
@@ -2340,6 +2545,7 @@
2340
2545
 
2341
2546
 
2342
2547
 
2548
+
2343
2549
  <xsl:apply-templates/>
2344
2550
  <!-- <xsl:if test="$namespace = 'gb'">
2345
2551
  <xsl:if test="ancestor::*[local-name()='formula']">
@@ -2406,18 +2612,18 @@
2406
2612
  </xsl:template><xsl:template match="*[local-name()='tt']">
2407
2613
  <fo:inline xsl:use-attribute-sets="tt-style">
2408
2614
  <xsl:variable name="_font-size">
2409
-
2410
-
2411
-
2615
+
2616
+
2617
+
2412
2618
 
2413
2619
  10
2414
2620
 
2415
2621
 
2416
2622
 
2417
2623
 
2418
-
2419
2624
 
2420
-
2625
+
2626
+
2421
2627
 
2422
2628
 
2423
2629
  </xsl:variable>
@@ -2755,7 +2961,7 @@
2755
2961
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
2756
2962
  <xsl:value-of select="substring($str, 2)"/>
2757
2963
  </xsl:template><xsl:template match="mathml:math">
2758
- <fo:inline font-family="STIX2Math">
2964
+ <fo:inline font-family="STIX Two Math"> <!-- -->
2759
2965
  <xsl:variable name="mathml">
2760
2966
  <xsl:apply-templates select="." mode="mathml"/>
2761
2967
  </xsl:variable>
@@ -2849,7 +3055,7 @@
2849
3055
  <xsl:apply-templates/>
2850
3056
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
2851
3057
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
2852
-
3058
+
2853
3059
  <xsl:apply-templates/>
2854
3060
  </fo:basic-link>
2855
3061
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -3059,18 +3265,9 @@
3059
3265
  <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
3060
3266
  <fo:bookmark-title>
3061
3267
  <xsl:variable name="bookmark-title_">
3062
- <xsl:choose>
3063
- <xsl:when test="@lang = 'en'">
3064
-
3065
-
3066
- </xsl:when>
3067
- <xsl:when test="@lang = 'fr'">
3068
-
3069
-
3070
- </xsl:when>
3071
- <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3072
- <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3073
- </xsl:choose>
3268
+ <xsl:call-template name="getLangVersion">
3269
+ <xsl:with-param name="lang" select="@lang"/>
3270
+ </xsl:call-template>
3074
3271
  </xsl:variable>
3075
3272
  <xsl:choose>
3076
3273
  <xsl:when test="normalize-space($bookmark-title_) != ''">
@@ -3112,6 +3309,20 @@
3112
3309
 
3113
3310
  </fo:bookmark-tree>
3114
3311
  </xsl:if>
3312
+ </xsl:template><xsl:template name="getLangVersion">
3313
+ <xsl:param name="lang"/>
3314
+ <xsl:choose>
3315
+ <xsl:when test="$lang = 'en'">
3316
+
3317
+
3318
+ </xsl:when>
3319
+ <xsl:when test="$lang = 'fr'">
3320
+
3321
+
3322
+ </xsl:when>
3323
+ <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
3324
+ <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
3325
+ </xsl:choose>
3115
3326
  </xsl:template><xsl:template match="item" mode="bookmark">
3116
3327
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
3117
3328
  <fo:bookmark-title>
@@ -3126,7 +3337,7 @@
3126
3337
  </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">
3127
3338
  <xsl:if test="normalize-space() != ''">
3128
3339
  <fo:block xsl:use-attribute-sets="figure-name-style">
3129
-
3340
+
3130
3341
  <xsl:apply-templates/>
3131
3342
  </fo:block>
3132
3343
  </xsl:if>
@@ -3762,6 +3973,7 @@
3762
3973
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
3763
3974
  <fo:block>
3764
3975
  <xsl:call-template name="setId"/>
3976
+
3765
3977
  <xsl:apply-templates/>
3766
3978
  </fo:block>
3767
3979
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
@@ -3797,6 +4009,7 @@
3797
4009
  </xsl:choose>
3798
4010
  </xsl:attribute>
3799
4011
 
4012
+
3800
4013
  <fo:block-container margin-left="0mm">
3801
4014
  <fo:block>
3802
4015
  <xsl:apply-templates select="." mode="ul_ol"/>
@@ -4077,6 +4290,7 @@
4077
4290
  <dc:title>
4078
4291
  <xsl:variable name="title">
4079
4292
 
4293
+
4080
4294
 
4081
4295
  <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
4082
4296
 
@@ -4097,6 +4311,7 @@
4097
4311
  <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
4098
4312
 
4099
4313
 
4314
+
4100
4315
  </dc:creator>
4101
4316
  <dc:description>
4102
4317
  <xsl:variable name="abstract">
@@ -4106,6 +4321,7 @@
4106
4321
 
4107
4322
 
4108
4323
 
4324
+
4109
4325
  </xsl:variable>
4110
4326
  <xsl:value-of select="normalize-space($abstract)"/>
4111
4327
  </dc:description>
@@ -8,14 +8,6 @@ module IsoDoc
8
8
  Metanorma::IHO.configuration
9
9
  end
10
10
 
11
- def commentperiod(ixml, _out)
12
- from = ixml.at(ns("//bibdata/ext/commentperiod/from"))&.text
13
- to = ixml.at(ns("//bibdata/ext/commentperiod/to"))&.text
14
- extended = ixml.at(ns("//bibdata/ext/commentperiod/extended"))&.text
15
- set(:comment_from, from) if from
16
- set(:comment_to, to) if to
17
- end
18
-
19
11
  def series(xml, _out)
20
12
  set(:series, xml.at(ns("//bibdata/series[@type = 'main']/title"))&.text)
21
13
  a = xml.at(ns("//bibdata/series[@type = 'main']/abbreviation"))&.text and
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IHO
3
- VERSION = "0.2.4"
3
+ VERSION = "0.2.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iho
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
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-09-26 00:00:00.000000000 Z
11
+ date: 2020-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities