metanorma-itu 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -63,9 +63,12 @@
63
63
  <xsl:call-template name="getLang"/>
64
64
  </xsl:variable>
65
65
 
66
+ <xsl:variable name="isAmendment" select="normalize-space(/itu:itu-standard/itu:local_bibdata/itu:ext/itu:structuredidentifier/itu:amendment)"/>
67
+ <xsl:variable name="isCorrigendum" select="normalize-space(/itu:itu-standard/itu:local_bibdata/itu:ext/itu:structuredidentifier/itu:corrigendum)"/>
68
+
66
69
  <xsl:template match="/">
67
70
  <xsl:call-template name="namespaceCheck"/>
68
- <fo:root font-family="Times New Roman, STIX2Math" font-size="12pt" xml:lang="{$lang}">
71
+ <fo:root font-family="Times New Roman, STIX Two Math" font-size="12pt" xml:lang="{$lang}">
69
72
  <fo:layout-master-set>
70
73
  <!-- cover page -->
71
74
  <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
@@ -204,6 +207,16 @@
204
207
  <xsl:value-of select="$title-annex"/><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid"/>
205
208
  </fo:block>
206
209
  </xsl:if>
210
+ <xsl:if test="$isAmendment != ''">
211
+ <fo:block font-size="18pt" font-weight="bold">
212
+ <xsl:value-of select="$isAmendment"/>
213
+ </fo:block>
214
+ </xsl:if>
215
+ <xsl:if test="$isCorrigendum != ''">
216
+ <fo:block font-size="18pt" font-weight="bold">
217
+ <xsl:value-of select="$isCorrigendum"/>
218
+ </fo:block>
219
+ </xsl:if>
207
220
  <fo:block font-size="14pt">
208
221
  <xsl:call-template name="formatDate">
209
222
  <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
@@ -244,7 +257,7 @@
244
257
  </fo:table-cell>
245
258
  <fo:table-cell font-size="18pt" number-columns-spanned="3">
246
259
  <fo:block padding-right="2mm" margin-top="6pt">
247
- <xsl:if test="not(/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en'])">
260
+ <xsl:if test="not(/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']) and $isAmendment = '' and $isCorrigendum = ''">
248
261
  <xsl:attribute name="font-weight">bold</xsl:attribute>
249
262
  </xsl:if>
250
263
  <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
@@ -254,6 +267,24 @@
254
267
  <xsl:value-of select="."/>
255
268
  </fo:block>
256
269
  </xsl:for-each>
270
+ <xsl:if test="$isAmendment != ''">
271
+ <fo:block padding-right="2mm" margin-top="6pt" font-weight="bold">
272
+ <xsl:value-of select="$isAmendment"/>
273
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment']">
274
+ <xsl:text>: </xsl:text>
275
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment']"/>
276
+ </xsl:if>
277
+ </fo:block>
278
+ </xsl:if>
279
+ <xsl:if test="$isCorrigendum != ''">
280
+ <fo:block padding-right="2mm" margin-top="6pt" font-weight="bold">
281
+ <xsl:value-of select="$isCorrigendum"/>
282
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum']">
283
+ <xsl:text>: </xsl:text>
284
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum']"/>
285
+ </xsl:if>
286
+ </fo:block>
287
+ </xsl:if>
257
288
  </fo:table-cell>
258
289
  </fo:table-row>
259
290
  <fo:table-row height="40mm">
@@ -1122,7 +1153,7 @@
1122
1153
  </xsl:template>
1123
1154
 
1124
1155
  <xsl:template match="mathml:math" priority="2">
1125
- <fo:inline font-family="STIX2Math" font-size="11pt">
1156
+ <fo:inline font-family="STIX Two Math" font-size="11pt">
1126
1157
  <xsl:variable name="mathml">
1127
1158
  <xsl:apply-templates select="." mode="mathml"/>
1128
1159
  </xsl:variable>
@@ -1253,7 +1284,12 @@
1253
1284
 
1254
1285
 
1255
1286
  </title-toc>
1256
- <title-toc lang="fr">Sommaire</title-toc>
1287
+ <title-toc lang="fr">
1288
+
1289
+ <xsl:text>Sommaire</xsl:text>
1290
+
1291
+
1292
+ </title-toc>
1257
1293
 
1258
1294
  <title-toc lang="zh">Contents</title-toc>
1259
1295
 
@@ -1341,10 +1377,19 @@
1341
1377
 
1342
1378
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1343
1379
  <xsl:param name="name"/>
1344
- <xsl:variable name="lang">
1345
- <xsl:call-template name="getLang"/>
1380
+ <xsl:param name="lang"/>
1381
+ <xsl:variable name="lang_">
1382
+ <xsl:choose>
1383
+ <xsl:when test="$lang != ''">
1384
+ <xsl:value-of select="$lang"/>
1385
+ </xsl:when>
1386
+ <xsl:otherwise>
1387
+ <xsl:call-template name="getLang"/>
1388
+ </xsl:otherwise>
1389
+ </xsl:choose>
1346
1390
  </xsl:variable>
1347
- <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $lang]"/>
1391
+ <xsl:variable name="language" select="normalize-space($lang_)"/>
1392
+ <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
1348
1393
  <xsl:choose>
1349
1394
  <xsl:when test="normalize-space($title_) != ''">
1350
1395
  <xsl:value-of select="$title_"/>
@@ -1485,6 +1530,7 @@
1485
1530
 
1486
1531
 
1487
1532
 
1533
+
1488
1534
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1489
1535
 
1490
1536
 
@@ -1724,6 +1770,8 @@
1724
1770
 
1725
1771
 
1726
1772
 
1773
+
1774
+
1727
1775
  <!-- $namespace = 'iso' or -->
1728
1776
 
1729
1777
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -1761,6 +1809,7 @@
1761
1809
  <xsl:with-param name="table" select="$simple-table"/>
1762
1810
  </xsl:call-template>
1763
1811
  </xsl:variable>
1812
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1764
1813
 
1765
1814
  <!-- <xsl:variable name="colwidths2">
1766
1815
  <xsl:call-template name="calculate-column-widths">
@@ -1781,39 +1830,61 @@
1781
1830
 
1782
1831
  <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1783
1832
 
1784
- <xsl:attribute name="space-after">6pt</xsl:attribute>
1785
-
1833
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1786
1834
 
1787
1835
 
1836
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
1788
1837
 
1838
+
1839
+
1840
+
1789
1841
 
1790
1842
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
1791
1843
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
1792
1844
  <xsl:attribute name="space-after">18pt</xsl:attribute>
1793
1845
 
1794
-
1795
1846
 
1847
+
1796
1848
 
1797
1849
 
1798
- <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">
1799
-
1800
-
1801
-
1802
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1803
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
1804
-
1805
-
1806
-
1850
+
1851
+
1852
+
1853
+
1854
+
1855
+ <xsl:variable name="table_attributes">
1856
+ <attribute name="table-layout">fixed</attribute>
1857
+ <attribute name="width">100%</attribute>
1858
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1859
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1807
1860
 
1808
1861
 
1809
1862
 
1863
+ <attribute name="margin-left">0mm</attribute>
1864
+ <attribute name="margin-right">0mm</attribute>
1810
1865
 
1811
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1812
1866
 
1867
+
1868
+
1869
+
1813
1870
 
1871
+
1814
1872
 
1873
+ </xsl:variable>
1874
+
1875
+
1876
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
1815
1877
 
1878
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1879
+ <xsl:attribute name="{@name}">
1880
+ <xsl:value-of select="."/>
1881
+ </xsl:attribute>
1882
+ </xsl:for-each>
1816
1883
 
1884
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1885
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1886
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1887
+ </xsl:if>
1817
1888
 
1818
1889
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1819
1890
  <xsl:choose>
@@ -1837,6 +1908,33 @@
1837
1908
 
1838
1909
  </fo:table>
1839
1910
 
1911
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1912
+ <xsl:call-template name="insertTableFooterInSeparateTable">
1913
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
1914
+ <xsl:with-param name="colwidths" select="$colwidths"/>
1915
+ </xsl:call-template>
1916
+ </xsl:for-each>
1917
+
1918
+ <!-- insert footer as table -->
1919
+ <!-- <fo:table>
1920
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1921
+ <xsl:attribute name="{@name}">
1922
+ <xsl:value-of select="."/>
1923
+ </xsl:attribute>
1924
+ </xsl:for-each>
1925
+
1926
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1927
+ <xsl:choose>
1928
+ <xsl:when test=". = 1 or . = 0">
1929
+ <fo:table-column column-width="proportional-column-width(2)"/>
1930
+ </xsl:when>
1931
+ <xsl:otherwise>
1932
+ <fo:table-column column-width="proportional-column-width({.})"/>
1933
+ </xsl:otherwise>
1934
+ </xsl:choose>
1935
+ </xsl:for-each>
1936
+ </fo:table>-->
1937
+
1840
1938
 
1841
1939
 
1842
1940
 
@@ -1901,6 +1999,13 @@
1901
1999
  <xsl:for-each select="xalan:nodeset($table)//tr">
1902
2000
  <xsl:variable name="td_text">
1903
2001
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
2002
+
2003
+ <!-- <xsl:if test="$namespace = 'bipm'">
2004
+ <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
2005
+ <word><xsl:value-of select="normalize-space(.)"/></word>
2006
+ </xsl:for-each>
2007
+ </xsl:if> -->
2008
+
1904
2009
  </xsl:variable>
1905
2010
  <xsl:variable name="words">
1906
2011
  <xsl:variable name="string_with_added_zerospaces">
@@ -1960,11 +2065,14 @@
1960
2065
  <xsl:value-of select="*[local-name()='origin']/@citeas"/>
1961
2066
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
1962
2067
  <xsl:value-of select="@target"/>
2068
+ </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
2069
+ <xsl:variable name="math_text" select="normalize-space(.)"/>
2070
+ <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
1963
2071
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1964
2072
  <xsl:param name="cols-count"/>
1965
2073
  <!-- font-weight="bold" -->
1966
2074
  <fo:table-header>
1967
-
2075
+
1968
2076
  <xsl:apply-templates/>
1969
2077
  </fo:table-header>
1970
2078
  </xsl:template><xsl:template name="table-header-title">
@@ -1989,6 +2097,13 @@
1989
2097
  </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
1990
2098
  <xsl:apply-templates/>
1991
2099
  </xsl:template><xsl:template name="insertTableFooter">
2100
+ <xsl:param name="cols-count"/>
2101
+ <xsl:if test="../*[local-name()='tfoot']">
2102
+ <fo:table-footer>
2103
+ <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2104
+ </fo:table-footer>
2105
+ </xsl:if>
2106
+ </xsl:template><xsl:template name="insertTableFooter2">
1992
2107
  <xsl:param name="cols-count"/>
1993
2108
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1994
2109
  <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
@@ -2014,11 +2129,15 @@
2014
2129
  <!-- fn will be processed inside 'note' processing -->
2015
2130
 
2016
2131
 
2017
- <!-- except gb -->
2132
+
2133
+ <!-- except gb and bipm -->
2018
2134
 
2019
2135
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2020
2136
 
2021
2137
 
2138
+
2139
+
2140
+
2022
2141
  <!-- horizontal row separator -->
2023
2142
 
2024
2143
 
@@ -2032,6 +2151,88 @@
2032
2151
  </fo:table-footer>
2033
2152
 
2034
2153
  </xsl:if>
2154
+ </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
2155
+ <xsl:param name="table_attributes"/>
2156
+ <xsl:param name="colwidths"/>
2157
+
2158
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2159
+
2160
+ <xsl:if test="$isNoteOrFnExist = 'true'">
2161
+
2162
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
2163
+
2164
+ <fo:table keep-with-previous="always">
2165
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2166
+ <xsl:choose>
2167
+ <xsl:when test="@name = 'border-top'">
2168
+ <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
2169
+ </xsl:when>
2170
+ <xsl:when test="@name = 'border'">
2171
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2172
+ <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
2173
+ </xsl:when>
2174
+ <xsl:otherwise>
2175
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2176
+ </xsl:otherwise>
2177
+ </xsl:choose>
2178
+ </xsl:for-each>
2179
+
2180
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
2181
+ <xsl:choose>
2182
+ <xsl:when test=". = 1 or . = 0">
2183
+ <fo:table-column column-width="proportional-column-width(2)"/>
2184
+ </xsl:when>
2185
+ <xsl:otherwise>
2186
+ <fo:table-column column-width="proportional-column-width({.})"/>
2187
+ </xsl:otherwise>
2188
+ </xsl:choose>
2189
+ </xsl:for-each>
2190
+
2191
+ <fo:table-body>
2192
+ <fo:table-row>
2193
+ <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2194
+
2195
+
2196
+
2197
+ <xsl:if test="ancestor::*[local-name()='preface']">
2198
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2199
+ </xsl:if>
2200
+
2201
+ <!-- fn will be processed inside 'note' processing -->
2202
+
2203
+
2204
+
2205
+ <!-- except gb and bipm -->
2206
+
2207
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2208
+
2209
+
2210
+ <!-- <xsl:if test="$namespace = 'bipm'">
2211
+ <xsl:choose>
2212
+ <xsl:when test="ancestor::*[local-name()='preface']">
2213
+ show Note under table in preface (ex. abstract) sections
2214
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2215
+ </xsl:when>
2216
+ <xsl:otherwise>
2217
+ empty, because notes show at page side in main sections
2218
+ <fo:block/>
2219
+ </xsl:otherwise>
2220
+ </xsl:choose>
2221
+ </xsl:if> -->
2222
+
2223
+
2224
+ <!-- horizontal row separator -->
2225
+
2226
+
2227
+ <!-- fn processing -->
2228
+ <xsl:call-template name="fn_display"/>
2229
+
2230
+ </fo:table-cell>
2231
+ </fo:table-row>
2232
+ </fo:table-body>
2233
+
2234
+ </fo:table>
2235
+ </xsl:if>
2035
2236
  </xsl:template><xsl:template match="*[local-name()='tbody']">
2036
2237
 
2037
2238
  <xsl:variable name="cols-count">
@@ -2084,8 +2285,8 @@
2084
2285
 
2085
2286
  </xsl:if>
2086
2287
 
2087
-
2088
-
2288
+
2289
+
2089
2290
 
2090
2291
  <xsl:apply-templates/>
2091
2292
  </fo:table-row>
@@ -2113,6 +2314,7 @@
2113
2314
 
2114
2315
 
2115
2316
 
2317
+
2116
2318
  <xsl:if test="@colspan">
2117
2319
  <xsl:attribute name="number-columns-spanned">
2118
2320
  <xsl:value-of select="@colspan"/>
@@ -2157,7 +2359,8 @@
2157
2359
  <xsl:attribute name="display-align">before</xsl:attribute>
2158
2360
 
2159
2361
 
2160
-
2362
+
2363
+
2161
2364
 
2162
2365
 
2163
2366
 
@@ -2187,14 +2390,17 @@
2187
2390
 
2188
2391
 
2189
2392
 
2393
+
2394
+
2190
2395
  <fo:inline padding-right="2mm">
2191
2396
 
2192
2397
 
2193
2398
 
2194
-
2399
+
2195
2400
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2196
2401
 
2197
2402
  </fo:inline>
2403
+
2198
2404
  <xsl:apply-templates mode="process"/>
2199
2405
  </fo:block>
2200
2406
 
@@ -2227,6 +2433,7 @@
2227
2433
  <xsl:attribute name="text-indent">-5mm</xsl:attribute>
2228
2434
  <xsl:attribute name="start-indent">5mm</xsl:attribute>
2229
2435
 
2436
+
2230
2437
  <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
2231
2438
 
2232
2439
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -2239,8 +2446,10 @@
2239
2446
  <xsl:attribute name="font-size">70%</xsl:attribute>
2240
2447
 
2241
2448
 
2449
+
2242
2450
  <xsl:value-of select="@reference"/>
2243
2451
 
2452
+
2244
2453
  <!-- <xsl:if test="@preface = 'true'"> -->
2245
2454
  <xsl:text>)</xsl:text>
2246
2455
  <!-- </xsl:if> -->
@@ -2248,7 +2457,8 @@
2248
2457
  </fo:inline>
2249
2458
  <fo:inline>
2250
2459
 
2251
- <xsl:apply-templates/>
2460
+ <!-- <xsl:apply-templates /> -->
2461
+ <xsl:copy-of select="./node()"/>
2252
2462
  </fo:inline>
2253
2463
  </fo:block>
2254
2464
  </xsl:if>
@@ -2285,7 +2495,20 @@
2285
2495
  <xsl:variable name="following_dl_colwidths">
2286
2496
  <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2287
2497
  <xsl:variable name="html-table">
2288
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2498
+ <xsl:variable name="doc_ns">
2499
+
2500
+ </xsl:variable>
2501
+ <xsl:variable name="ns">
2502
+ <xsl:choose>
2503
+ <xsl:when test="normalize-space($doc_ns) != ''">
2504
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2505
+ </xsl:when>
2506
+ <xsl:otherwise>
2507
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2508
+ </xsl:otherwise>
2509
+ </xsl:choose>
2510
+ </xsl:variable>
2511
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2289
2512
  <xsl:element name="{$ns}:table">
2290
2513
  <xsl:for-each select="*[local-name() = 'dl'][1]">
2291
2514
  <tbody>
@@ -2350,7 +2573,8 @@
2350
2573
  <xsl:attribute name="margin-bottom">0</xsl:attribute>
2351
2574
  </xsl:if>
2352
2575
 
2353
- <xsl:apply-templates/>
2576
+ <!-- <xsl:apply-templates /> -->
2577
+ <xsl:copy-of select="./node()"/>
2354
2578
  </fo:block>
2355
2579
  </fo:table-cell>
2356
2580
  </fo:table-row>
@@ -2372,9 +2596,12 @@
2372
2596
  <xsl:attribute name="color">blue</xsl:attribute>
2373
2597
 
2374
2598
 
2599
+
2375
2600
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2376
2601
 
2602
+
2377
2603
  <xsl:value-of select="@reference"/>
2604
+
2378
2605
  </fo:basic-link>
2379
2606
  </fo:inline>
2380
2607
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
@@ -2459,7 +2686,7 @@
2459
2686
  </xsl:if>
2460
2687
  <xsl:if test="$parent = 'li'">
2461
2688
  <!-- <xsl:attribute name="margin-left">-4mm</xsl:attribute> -->
2462
- </xsl:if>
2689
+ </xsl:if>
2463
2690
 
2464
2691
 
2465
2692
 
@@ -2481,7 +2708,20 @@
2481
2708
  </xsl:choose>
2482
2709
  <!-- create virtual html table for dl/[dt and dd] -->
2483
2710
  <xsl:variable name="html-table">
2484
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2711
+ <xsl:variable name="doc_ns">
2712
+
2713
+ </xsl:variable>
2714
+ <xsl:variable name="ns">
2715
+ <xsl:choose>
2716
+ <xsl:when test="normalize-space($doc_ns) != ''">
2717
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2718
+ </xsl:when>
2719
+ <xsl:otherwise>
2720
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2721
+ </xsl:otherwise>
2722
+ </xsl:choose>
2723
+ </xsl:variable>
2724
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2485
2725
  <xsl:element name="{$ns}:table">
2486
2726
  <tbody>
2487
2727
  <xsl:apply-templates mode="dl"/>
@@ -2633,6 +2873,7 @@
2633
2873
  </xsl:if>
2634
2874
 
2635
2875
 
2876
+
2636
2877
  <xsl:apply-templates/>
2637
2878
  <!-- <xsl:if test="$namespace = 'gb'">
2638
2879
  <xsl:if test="ancestor::*[local-name()='formula']">
@@ -2701,18 +2942,18 @@
2701
2942
  </xsl:template><xsl:template match="*[local-name()='tt']">
2702
2943
  <fo:inline xsl:use-attribute-sets="tt-style">
2703
2944
  <xsl:variable name="_font-size">
2704
-
2705
-
2706
-
2707
2945
 
2708
2946
 
2709
2947
 
2710
2948
 
2711
2949
 
2712
2950
 
2713
-
2714
2951
 
2715
-
2952
+
2953
+
2954
+
2955
+
2956
+
2716
2957
 
2717
2958
 
2718
2959
  </xsl:variable>
@@ -3050,7 +3291,7 @@
3050
3291
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
3051
3292
  <xsl:value-of select="substring($str, 2)"/>
3052
3293
  </xsl:template><xsl:template match="mathml:math">
3053
- <fo:inline font-family="STIX2Math">
3294
+ <fo:inline font-family="STIX Two Math"> <!-- -->
3054
3295
  <xsl:variable name="mathml">
3055
3296
  <xsl:apply-templates select="." mode="mathml"/>
3056
3297
  </xsl:variable>
@@ -3144,7 +3385,7 @@
3144
3385
  <xsl:apply-templates/>
3145
3386
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
3146
3387
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
3147
-
3388
+
3148
3389
  <xsl:apply-templates/>
3149
3390
  </fo:basic-link>
3150
3391
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -3358,18 +3599,9 @@
3358
3599
  <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
3359
3600
  <fo:bookmark-title>
3360
3601
  <xsl:variable name="bookmark-title_">
3361
- <xsl:choose>
3362
- <xsl:when test="@lang = 'en'">
3363
-
3364
-
3365
- </xsl:when>
3366
- <xsl:when test="@lang = 'fr'">
3367
-
3368
-
3369
- </xsl:when>
3370
- <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3371
- <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3372
- </xsl:choose>
3602
+ <xsl:call-template name="getLangVersion">
3603
+ <xsl:with-param name="lang" select="@lang"/>
3604
+ </xsl:call-template>
3373
3605
  </xsl:variable>
3374
3606
  <xsl:choose>
3375
3607
  <xsl:when test="normalize-space($bookmark-title_) != ''">
@@ -3411,6 +3643,20 @@
3411
3643
 
3412
3644
  </fo:bookmark-tree>
3413
3645
  </xsl:if>
3646
+ </xsl:template><xsl:template name="getLangVersion">
3647
+ <xsl:param name="lang"/>
3648
+ <xsl:choose>
3649
+ <xsl:when test="$lang = 'en'">
3650
+
3651
+
3652
+ </xsl:when>
3653
+ <xsl:when test="$lang = 'fr'">
3654
+
3655
+
3656
+ </xsl:when>
3657
+ <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
3658
+ <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
3659
+ </xsl:choose>
3414
3660
  </xsl:template><xsl:template match="item" mode="bookmark">
3415
3661
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
3416
3662
  <fo:bookmark-title>
@@ -3425,7 +3671,7 @@
3425
3671
  </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">
3426
3672
  <xsl:if test="normalize-space() != ''">
3427
3673
  <fo:block xsl:use-attribute-sets="figure-name-style">
3428
-
3674
+
3429
3675
  <xsl:apply-templates/>
3430
3676
  </fo:block>
3431
3677
  </xsl:if>
@@ -4052,6 +4298,7 @@
4052
4298
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
4053
4299
  <fo:block>
4054
4300
  <xsl:call-template name="setId"/>
4301
+
4055
4302
  <xsl:apply-templates/>
4056
4303
  </fo:block>
4057
4304
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
@@ -4087,6 +4334,7 @@
4087
4334
  </xsl:choose>
4088
4335
  </xsl:attribute>
4089
4336
 
4337
+
4090
4338
  <fo:block-container margin-left="0mm">
4091
4339
  <fo:block>
4092
4340
  <xsl:apply-templates select="." mode="ul_ol"/>
@@ -4271,6 +4519,7 @@
4271
4519
 
4272
4520
 
4273
4521
 
4522
+
4274
4523
  <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@type='main']"/>
4275
4524
 
4276
4525
  </xsl:variable>
@@ -4288,6 +4537,7 @@
4288
4537
  <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
4289
4538
 
4290
4539
 
4540
+
4291
4541
  </dc:creator>
4292
4542
  <dc:description>
4293
4543
  <xsl:variable name="abstract">
@@ -4297,6 +4547,7 @@
4297
4547
 
4298
4548
  <xsl:copy-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'abstract']//text()"/>
4299
4549
 
4550
+
4300
4551
  </xsl:variable>
4301
4552
  <xsl:value-of select="normalize-space($abstract)"/>
4302
4553
  </dc:description>