metanorma-nist 1.2.2 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +63 -0
- data/.github/workflows/release.yml +36 -0
- data/README.adoc +3 -4
- data/lib/asciidoctor/nist/basicdoc.rng +23 -0
- data/lib/asciidoctor/nist/isodoc.rng +135 -58
- data/lib/asciidoctor/nist/nist.rng +8 -1
- data/lib/isodoc/nist/base_convert.rb +0 -1
- data/lib/isodoc/nist/html/htmlstyle.css +5 -1
- data/lib/isodoc/nist/html/nist.css +16 -4
- data/lib/isodoc/nist/html/nist.scss +18 -4
- data/lib/isodoc/nist/html/nist_cswp.css +15 -3
- data/lib/isodoc/nist/html/nist_cswp.scss +17 -3
- data/lib/isodoc/nist/html_convert.rb +8 -0
- data/lib/isodoc/nist/metadata.rb +1 -0
- data/lib/isodoc/nist/metadata_id.rb +2 -0
- data/lib/isodoc/nist/nist.cswp.xsl +881 -220
- data/lib/isodoc/nist/nist.sp.xsl +912 -221
- data/lib/isodoc/nist/render.rb +0 -4
- data/lib/isodoc/nist/render_contributors.rb +1 -1
- data/lib/metanorma/nist/version.rb +1 -1
- data/metanorma-nist.gemspec +1 -1
- metadata +6 -7
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
data/lib/isodoc/nist/nist.sp.xsl
CHANGED
@@ -57,7 +57,7 @@
|
|
57
57
|
|
58
58
|
<xsl:template match="/">
|
59
59
|
<xsl:call-template name="namespaceCheck"/>
|
60
|
-
<fo:root font-family="Times New Roman,
|
60
|
+
<fo:root font-family="Times New Roman, STIX Two Math" font-size="12pt" xml:lang="{$lang}">
|
61
61
|
<fo:layout-master-set>
|
62
62
|
<!-- Cover pages -->
|
63
63
|
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
@@ -88,6 +88,10 @@
|
|
88
88
|
|
89
89
|
<xsl:call-template name="addPDFUAmeta"/>
|
90
90
|
|
91
|
+
<xsl:call-template name="addBookmarks">
|
92
|
+
<xsl:with-param name="contents" select="$contents"/>
|
93
|
+
</xsl:call-template>
|
94
|
+
|
91
95
|
<!-- cover page -->
|
92
96
|
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
93
97
|
<fo:flow flow-name="xsl-region-body">
|
@@ -869,7 +873,7 @@
|
|
869
873
|
</xsl:call-template>
|
870
874
|
</xsl:variable>
|
871
875
|
<fo:block font-size="12pt" margin-bottom="12pt" text-align="center" font-weight="bold"><xsl:value-of select="$title-toc"/></fo:block>
|
872
|
-
<xsl:for-each select="xalan:nodeset($contents)//item">
|
876
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
873
877
|
|
874
878
|
<fo:block>
|
875
879
|
<xsl:if test="@level = 1">
|
@@ -884,10 +888,10 @@
|
|
884
888
|
<xsl:if test="@type = 'annex'">
|
885
889
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
886
890
|
</xsl:if>
|
887
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
891
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
888
892
|
<xsl:value-of select="@section"/>
|
889
893
|
<xsl:text> </xsl:text>
|
890
|
-
<xsl:apply-templates/>
|
894
|
+
<xsl:apply-templates select="title"/>
|
891
895
|
<fo:inline keep-together.within-line="always">
|
892
896
|
<fo:leader leader-pattern="dots"/>
|
893
897
|
<xsl:if test="@type = 'annex'">
|
@@ -1148,17 +1152,24 @@
|
|
1148
1152
|
</xsl:variable>
|
1149
1153
|
|
1150
1154
|
<xsl:variable name="display">
|
1151
|
-
<xsl:choose>
|
1152
|
-
<xsl:when test="ancestor-or-self::nist:bibitem">false</xsl:when>
|
1155
|
+
<xsl:choose>
|
1153
1156
|
<xsl:when test="ancestor::nist:annex and $level >= 2">false</xsl:when>
|
1154
|
-
<xsl:when test="ancestor-or-self::nist:terms">false</xsl:when>
|
1155
1157
|
<xsl:when test="$level >= 3">false</xsl:when>
|
1156
1158
|
<xsl:otherwise>true</xsl:otherwise>
|
1157
1159
|
</xsl:choose>
|
1158
1160
|
</xsl:variable>
|
1159
1161
|
|
1160
1162
|
|
1161
|
-
<xsl:
|
1163
|
+
<xsl:variable name="skip">
|
1164
|
+
<xsl:choose>
|
1165
|
+
<xsl:when test="ancestor-or-self::nist:bibitem">true</xsl:when>
|
1166
|
+
<xsl:when test="ancestor-or-self::nist:terms">true</xsl:when>
|
1167
|
+
<xsl:otherwise>false</xsl:otherwise>
|
1168
|
+
</xsl:choose>
|
1169
|
+
</xsl:variable>
|
1170
|
+
|
1171
|
+
|
1172
|
+
<xsl:if test="$skip = 'false'">
|
1162
1173
|
|
1163
1174
|
<xsl:variable name="section">
|
1164
1175
|
<xsl:call-template name="getSection"/>
|
@@ -1172,16 +1183,18 @@
|
|
1172
1183
|
<xsl:value-of select="local-name()"/>
|
1173
1184
|
</xsl:variable>
|
1174
1185
|
|
1175
|
-
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
|
1186
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
1176
1187
|
<xsl:if test="$type = 'annex'">
|
1177
1188
|
<xsl:attribute name="annexnum">
|
1178
1189
|
<xsl:value-of select="substring-after(nist:title/@xref, ' ')"/>
|
1179
1190
|
</xsl:attribute>
|
1180
1191
|
</xsl:if>
|
1181
|
-
<
|
1192
|
+
<title>
|
1193
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
1194
|
+
</title>
|
1195
|
+
<xsl:apply-templates mode="contents"/>
|
1182
1196
|
</item>
|
1183
|
-
|
1184
|
-
</xsl:if>
|
1197
|
+
</xsl:if>
|
1185
1198
|
|
1186
1199
|
</xsl:template>
|
1187
1200
|
|
@@ -1510,7 +1523,12 @@
|
|
1510
1523
|
</xsl:variable>
|
1511
1524
|
<xsl:element name="{$element-name}">
|
1512
1525
|
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1513
|
-
<xsl:attribute name="font-size">
|
1526
|
+
<xsl:attribute name="font-size">
|
1527
|
+
<xsl:choose>
|
1528
|
+
<xsl:when test="ancestor::*[local-name()='note']">9pt</xsl:when>
|
1529
|
+
<xsl:otherwise>10pt</xsl:otherwise>
|
1530
|
+
</xsl:choose>
|
1531
|
+
</xsl:attribute>
|
1514
1532
|
<xsl:if test="not(ancestor::nist:td)">
|
1515
1533
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1516
1534
|
</xsl:if>
|
@@ -1616,7 +1634,7 @@
|
|
1616
1634
|
|
1617
1635
|
|
1618
1636
|
|
1619
|
-
<xsl:template match="nist:ul | nist:ol">
|
1637
|
+
<xsl:template match="nist:ul | nist:ol" mode="ul_ol">
|
1620
1638
|
<xsl:param name="margin"/>
|
1621
1639
|
<fo:list-block>
|
1622
1640
|
<xsl:attribute name="space-after">
|
@@ -1631,13 +1649,28 @@
|
|
1631
1649
|
</xsl:template>
|
1632
1650
|
|
1633
1651
|
<xsl:template match="nist:ul//nist:note | nist:ol//nist:note" priority="2"/>
|
1634
|
-
|
1652
|
+
|
1653
|
+
<xsl:template match="nist:ul//nist:note | nist:ol//nist:note" mode="process">
|
1654
|
+
<fo:block id="{@id}">
|
1655
|
+
<xsl:apply-templates mode="process"/>
|
1656
|
+
</fo:block>
|
1657
|
+
</xsl:template>
|
1658
|
+
|
1659
|
+
<xsl:template match="nist:ul//nist:note/nist:name | nist:ol//nist:note/nist:name" mode="process" priority="2"/>
|
1660
|
+
|
1661
|
+
<xsl:template match="nist:ul//nist:note/nist:p | nist:ol//nist:note/nist:p" mode="process" priority="2">
|
1635
1662
|
<fo:block font-size="11pt" margin-top="4pt">
|
1636
1663
|
<xsl:apply-templates select="../nist:name" mode="presentation"/>
|
1637
1664
|
<xsl:apply-templates/>
|
1638
1665
|
</fo:block>
|
1639
1666
|
</xsl:template>
|
1640
1667
|
|
1668
|
+
<xsl:template match="nist:ul//nist:note/* | nist:ol//nist:note/*" mode="process">
|
1669
|
+
<fo:block font-size="11pt">
|
1670
|
+
<xsl:apply-templates select="."/>
|
1671
|
+
</fo:block>
|
1672
|
+
</xsl:template>
|
1673
|
+
|
1641
1674
|
<xsl:template match="nist:li">
|
1642
1675
|
<xsl:variable name="level">
|
1643
1676
|
<xsl:variable name="numtmp">
|
@@ -1769,18 +1802,21 @@
|
|
1769
1802
|
</xsl:template>
|
1770
1803
|
|
1771
1804
|
<xsl:template match="mathml:math" priority="2">
|
1772
|
-
<fo:inline font-family="
|
1805
|
+
<fo:inline font-family="STIX Two Math">
|
1773
1806
|
<xsl:if test="ancestor::nist:table">
|
1774
1807
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1775
1808
|
</xsl:if>
|
1809
|
+
<xsl:variable name="mathml">
|
1810
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
1811
|
+
</xsl:variable>
|
1776
1812
|
<fo:instream-foreign-object fox:alt-text="Math">
|
1777
|
-
<xsl:copy-of select="."/>
|
1813
|
+
<!-- <xsl:copy-of select="."/> -->
|
1814
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
1778
1815
|
</fo:instream-foreign-object>
|
1779
1816
|
</fo:inline>
|
1780
1817
|
</xsl:template>
|
1781
1818
|
|
1782
1819
|
|
1783
|
-
|
1784
1820
|
<xsl:template match="nist:terms[nist:term[nist:preferred and nist:definition]]" priority="2">
|
1785
1821
|
<fo:block id="{@id}">
|
1786
1822
|
<fo:table width="100%" table-layout="fixed">
|
@@ -1819,10 +1855,23 @@
|
|
1819
1855
|
|
1820
1856
|
|
1821
1857
|
|
1822
|
-
<xsl:template match="nist:quote" priority="2">
|
1823
|
-
<fo:block-container margin-left="
|
1824
|
-
<xsl:
|
1825
|
-
|
1858
|
+
<xsl:template match="nist:quote" priority="2">
|
1859
|
+
<fo:block-container margin-left="0mm">
|
1860
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
1861
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
1862
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
1863
|
+
</xsl:if>
|
1864
|
+
</xsl:if>
|
1865
|
+
<fo:block-container margin-left="0mm">
|
1866
|
+
|
1867
|
+
<fo:block-container margin-left="7mm" margin-right="7mm">
|
1868
|
+
<fo:block>
|
1869
|
+
<xsl:apply-templates/>
|
1870
|
+
<xsl:apply-templates select="nist:author" mode="process"/>
|
1871
|
+
</fo:block>
|
1872
|
+
</fo:block-container>
|
1873
|
+
|
1874
|
+
</fo:block-container>
|
1826
1875
|
</fo:block-container>
|
1827
1876
|
</xsl:template>
|
1828
1877
|
|
@@ -2137,6 +2186,12 @@
|
|
2137
2186
|
|
2138
2187
|
</title-edition>
|
2139
2188
|
|
2189
|
+
<title-edition lang="fr">
|
2190
|
+
|
2191
|
+
<xsl:text>Édition </xsl:text>
|
2192
|
+
|
2193
|
+
</title-edition>
|
2194
|
+
|
2140
2195
|
|
2141
2196
|
<title-toc lang="en">
|
2142
2197
|
|
@@ -2145,7 +2200,12 @@
|
|
2145
2200
|
|
2146
2201
|
|
2147
2202
|
</title-toc>
|
2148
|
-
<title-toc lang="fr">
|
2203
|
+
<title-toc lang="fr">
|
2204
|
+
|
2205
|
+
<xsl:text>Sommaire</xsl:text>
|
2206
|
+
|
2207
|
+
|
2208
|
+
</title-toc>
|
2149
2209
|
|
2150
2210
|
<title-toc lang="zh">Contents</title-toc>
|
2151
2211
|
|
@@ -2179,7 +2239,12 @@
|
|
2179
2239
|
|
2180
2240
|
|
2181
2241
|
|
2182
|
-
<title-source lang="en">
|
2242
|
+
<title-source lang="en">
|
2243
|
+
|
2244
|
+
<xsl:text>SOURCE</xsl:text>
|
2245
|
+
|
2246
|
+
|
2247
|
+
</title-source>
|
2183
2248
|
|
2184
2249
|
<title-keywords lang="en">Keywords</title-keywords>
|
2185
2250
|
|
@@ -2222,12 +2287,25 @@
|
|
2222
2287
|
<title-warning lang="zh">警告</title-warning>
|
2223
2288
|
|
2224
2289
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
2290
|
+
|
2291
|
+
<title-continued lang="en">(continued)</title-continued>
|
2292
|
+
<title-continued lang="fr">(continué)</title-continued>
|
2293
|
+
|
2225
2294
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
2226
2295
|
<xsl:param name="name"/>
|
2227
|
-
<xsl:
|
2228
|
-
|
2296
|
+
<xsl:param name="lang"/>
|
2297
|
+
<xsl:variable name="lang_">
|
2298
|
+
<xsl:choose>
|
2299
|
+
<xsl:when test="$lang != ''">
|
2300
|
+
<xsl:value-of select="$lang"/>
|
2301
|
+
</xsl:when>
|
2302
|
+
<xsl:otherwise>
|
2303
|
+
<xsl:call-template name="getLang"/>
|
2304
|
+
</xsl:otherwise>
|
2305
|
+
</xsl:choose>
|
2229
2306
|
</xsl:variable>
|
2230
|
-
<xsl:variable name="
|
2307
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
2308
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
2231
2309
|
<xsl:choose>
|
2232
2310
|
<xsl:when test="normalize-space($title_) != ''">
|
2233
2311
|
<xsl:value-of select="$title_"/>
|
@@ -2236,7 +2314,10 @@
|
|
2236
2314
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
2237
2315
|
</xsl:otherwise>
|
2238
2316
|
</xsl:choose>
|
2239
|
-
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="
|
2317
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
2318
|
+
|
2319
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
2320
|
+
|
2240
2321
|
|
2241
2322
|
|
2242
2323
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
@@ -2247,14 +2328,14 @@
|
|
2247
2328
|
|
2248
2329
|
|
2249
2330
|
|
2250
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2251
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2331
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2252
2332
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
2253
2333
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2254
2334
|
|
2255
2335
|
|
2256
2336
|
|
2257
2337
|
|
2338
|
+
|
2258
2339
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
2259
2340
|
|
2260
2341
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -2300,6 +2381,7 @@
|
|
2300
2381
|
|
2301
2382
|
|
2302
2383
|
|
2384
|
+
|
2303
2385
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2304
2386
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2305
2387
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -2331,6 +2413,7 @@
|
|
2331
2413
|
|
2332
2414
|
|
2333
2415
|
|
2416
|
+
|
2334
2417
|
|
2335
2418
|
|
2336
2419
|
|
@@ -2373,6 +2456,7 @@
|
|
2373
2456
|
|
2374
2457
|
|
2375
2458
|
|
2459
|
+
|
2376
2460
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
2377
2461
|
|
2378
2462
|
|
@@ -2386,11 +2470,13 @@
|
|
2386
2470
|
|
2387
2471
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2388
2472
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2389
|
-
|
2473
|
+
|
2474
|
+
|
2390
2475
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
2391
2476
|
|
2392
2477
|
|
2393
2478
|
|
2479
|
+
|
2394
2480
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2395
2481
|
|
2396
2482
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
@@ -2411,8 +2497,10 @@
|
|
2411
2497
|
|
2412
2498
|
|
2413
2499
|
|
2500
|
+
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
2501
|
+
|
2502
|
+
|
2414
2503
|
|
2415
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
2416
2504
|
|
2417
2505
|
|
2418
2506
|
|
@@ -2421,7 +2509,6 @@
|
|
2421
2509
|
|
2422
2510
|
|
2423
2511
|
|
2424
|
-
|
2425
2512
|
|
2426
2513
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
2427
2514
|
|
@@ -2445,6 +2532,8 @@
|
|
2445
2532
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
2446
2533
|
|
2447
2534
|
|
2535
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2536
|
+
|
2448
2537
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2449
2538
|
|
2450
2539
|
|
@@ -2465,6 +2554,7 @@
|
|
2465
2554
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
2466
2555
|
|
2467
2556
|
|
2557
|
+
|
2468
2558
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
2469
2559
|
|
2470
2560
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -2474,6 +2564,7 @@
|
|
2474
2564
|
|
2475
2565
|
|
2476
2566
|
|
2567
|
+
|
2477
2568
|
|
2478
2569
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2479
2570
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -2515,11 +2606,14 @@
|
|
2515
2606
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
2516
2607
|
|
2517
2608
|
|
2609
|
+
|
2518
2610
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
2519
2611
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
2520
2612
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2521
2613
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2522
2614
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2615
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2616
|
+
|
2523
2617
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
2524
2618
|
|
2525
2619
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -2583,6 +2677,10 @@
|
|
2583
2677
|
|
2584
2678
|
|
2585
2679
|
|
2680
|
+
|
2681
|
+
|
2682
|
+
<!-- $namespace = 'iso' or -->
|
2683
|
+
|
2586
2684
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2587
2685
|
|
2588
2686
|
|
@@ -2616,6 +2714,7 @@
|
|
2616
2714
|
<xsl:with-param name="table" select="$simple-table"/>
|
2617
2715
|
</xsl:call-template>
|
2618
2716
|
</xsl:variable>
|
2717
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2619
2718
|
|
2620
2719
|
<!-- <xsl:variable name="colwidths2">
|
2621
2720
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2636,9 +2735,25 @@
|
|
2636
2735
|
|
2637
2736
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2638
2737
|
|
2738
|
+
|
2639
2739
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
2640
2740
|
|
2741
|
+
|
2742
|
+
|
2743
|
+
|
2744
|
+
|
2745
|
+
|
2746
|
+
<xsl:if test="ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface']">
|
2747
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2748
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2749
|
+
</xsl:if>
|
2750
|
+
<xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
|
2751
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2752
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
2753
|
+
</xsl:if>
|
2754
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2641
2755
|
|
2756
|
+
|
2642
2757
|
|
2643
2758
|
|
2644
2759
|
|
@@ -2646,28 +2761,36 @@
|
|
2646
2761
|
|
2647
2762
|
|
2648
2763
|
|
2649
|
-
<
|
2650
|
-
|
2651
|
-
|
2652
|
-
|
2653
|
-
|
2764
|
+
<xsl:variable name="table_attributes">
|
2765
|
+
<attribute name="table-layout">fixed</attribute>
|
2766
|
+
<attribute name="width">100%</attribute>
|
2767
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2768
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2654
2769
|
|
2655
2770
|
|
2656
|
-
<xsl:if test="ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface']">
|
2657
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2658
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2659
|
-
</xsl:if>
|
2660
|
-
<xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
|
2661
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2662
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
2663
|
-
</xsl:if>
|
2664
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2665
2771
|
|
2666
2772
|
|
2773
|
+
|
2774
|
+
|
2775
|
+
|
2667
2776
|
|
2777
|
+
|
2668
2778
|
|
2779
|
+
</xsl:variable>
|
2780
|
+
|
2781
|
+
|
2782
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2669
2783
|
|
2784
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2785
|
+
<xsl:attribute name="{@name}">
|
2786
|
+
<xsl:value-of select="."/>
|
2787
|
+
</xsl:attribute>
|
2788
|
+
</xsl:for-each>
|
2670
2789
|
|
2790
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2791
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2792
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2793
|
+
</xsl:if>
|
2671
2794
|
|
2672
2795
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2673
2796
|
<xsl:choose>
|
@@ -2691,6 +2814,33 @@
|
|
2691
2814
|
|
2692
2815
|
</fo:table>
|
2693
2816
|
|
2817
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2818
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2819
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2820
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2821
|
+
</xsl:call-template>
|
2822
|
+
</xsl:for-each>
|
2823
|
+
|
2824
|
+
<!-- insert footer as table -->
|
2825
|
+
<!-- <fo:table>
|
2826
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
2827
|
+
<xsl:attribute name="{@name}">
|
2828
|
+
<xsl:value-of select="."/>
|
2829
|
+
</xsl:attribute>
|
2830
|
+
</xsl:for-each>
|
2831
|
+
|
2832
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2833
|
+
<xsl:choose>
|
2834
|
+
<xsl:when test=". = 1 or . = 0">
|
2835
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2836
|
+
</xsl:when>
|
2837
|
+
<xsl:otherwise>
|
2838
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2839
|
+
</xsl:otherwise>
|
2840
|
+
</xsl:choose>
|
2841
|
+
</xsl:for-each>
|
2842
|
+
</fo:table>-->
|
2843
|
+
|
2694
2844
|
|
2695
2845
|
|
2696
2846
|
|
@@ -2699,8 +2849,9 @@
|
|
2699
2849
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
2700
2850
|
<xsl:if test="normalize-space() != ''">
|
2701
2851
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2702
|
-
|
2703
|
-
|
2852
|
+
|
2853
|
+
<xsl:apply-templates/>
|
2854
|
+
</fo:block>
|
2704
2855
|
</xsl:if>
|
2705
2856
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
2706
2857
|
<xsl:param name="table-row"/>
|
@@ -2754,6 +2905,13 @@
|
|
2754
2905
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
2755
2906
|
<xsl:variable name="td_text">
|
2756
2907
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2908
|
+
|
2909
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2910
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
2911
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
2912
|
+
</xsl:for-each>
|
2913
|
+
</xsl:if> -->
|
2914
|
+
|
2757
2915
|
</xsl:variable>
|
2758
2916
|
<xsl:variable name="words">
|
2759
2917
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -2813,13 +2971,31 @@
|
|
2813
2971
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
2814
2972
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
2815
2973
|
<xsl:value-of select="@target"/>
|
2974
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
2975
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
2976
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
2816
2977
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
2817
2978
|
<xsl:param name="cols-count"/>
|
2818
2979
|
<!-- font-weight="bold" -->
|
2819
|
-
<fo:table-header>
|
2980
|
+
<fo:table-header>
|
2820
2981
|
|
2821
2982
|
<xsl:apply-templates/>
|
2822
2983
|
</fo:table-header>
|
2984
|
+
</xsl:template><xsl:template name="table-header-title">
|
2985
|
+
<xsl:param name="cols-count"/>
|
2986
|
+
<!-- row for title -->
|
2987
|
+
<fo:table-row>
|
2988
|
+
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
2989
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
2990
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
2991
|
+
<xsl:call-template name="fn_name_display"/>
|
2992
|
+
</xsl:for-each>
|
2993
|
+
<fo:block text-align="right" font-style="italic">
|
2994
|
+
<xsl:text> </xsl:text>
|
2995
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
2996
|
+
</fo:block>
|
2997
|
+
</fo:table-cell>
|
2998
|
+
</fo:table-row>
|
2823
2999
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
2824
3000
|
<fo:table-body>
|
2825
3001
|
<xsl:apply-templates/>
|
@@ -2827,6 +3003,13 @@
|
|
2827
3003
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
2828
3004
|
<xsl:apply-templates/>
|
2829
3005
|
</xsl:template><xsl:template name="insertTableFooter">
|
3006
|
+
<xsl:param name="cols-count"/>
|
3007
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
3008
|
+
<fo:table-footer>
|
3009
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
3010
|
+
</fo:table-footer>
|
3011
|
+
</xsl:if>
|
3012
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
2830
3013
|
<xsl:param name="cols-count"/>
|
2831
3014
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2832
3015
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -2848,11 +3031,29 @@
|
|
2848
3031
|
<!-- fn will be processed inside 'note' processing -->
|
2849
3032
|
|
2850
3033
|
|
3034
|
+
|
3035
|
+
|
3036
|
+
|
3037
|
+
|
2851
3038
|
<!-- except gb -->
|
2852
3039
|
|
2853
3040
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2854
3041
|
|
2855
3042
|
|
3043
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
3044
|
+
<!-- empty, because notes show at page side in main sections -->
|
3045
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3046
|
+
<xsl:choose>
|
3047
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
3048
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3049
|
+
</xsl:when>
|
3050
|
+
<xsl:otherwise>
|
3051
|
+
<fo:block/>
|
3052
|
+
</xsl:otherwise>
|
3053
|
+
</xsl:choose>
|
3054
|
+
</xsl:if> -->
|
3055
|
+
|
3056
|
+
|
2856
3057
|
<!-- horizontal row separator -->
|
2857
3058
|
|
2858
3059
|
|
@@ -2866,6 +3067,88 @@
|
|
2866
3067
|
</fo:table-footer>
|
2867
3068
|
|
2868
3069
|
</xsl:if>
|
3070
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
3071
|
+
<xsl:param name="table_attributes"/>
|
3072
|
+
<xsl:param name="colwidths"/>
|
3073
|
+
|
3074
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3075
|
+
|
3076
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3077
|
+
|
3078
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
3079
|
+
|
3080
|
+
<fo:table keep-with-previous="always">
|
3081
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
3082
|
+
<xsl:choose>
|
3083
|
+
<xsl:when test="@name = 'border-top'">
|
3084
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
3085
|
+
</xsl:when>
|
3086
|
+
<xsl:when test="@name = 'border'">
|
3087
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
3088
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
3089
|
+
</xsl:when>
|
3090
|
+
<xsl:otherwise>
|
3091
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
3092
|
+
</xsl:otherwise>
|
3093
|
+
</xsl:choose>
|
3094
|
+
</xsl:for-each>
|
3095
|
+
|
3096
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
3097
|
+
<xsl:choose>
|
3098
|
+
<xsl:when test=". = 1 or . = 0">
|
3099
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
3100
|
+
</xsl:when>
|
3101
|
+
<xsl:otherwise>
|
3102
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
3103
|
+
</xsl:otherwise>
|
3104
|
+
</xsl:choose>
|
3105
|
+
</xsl:for-each>
|
3106
|
+
|
3107
|
+
<fo:table-body>
|
3108
|
+
<fo:table-row>
|
3109
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
3110
|
+
|
3111
|
+
|
3112
|
+
|
3113
|
+
<!-- fn will be processed inside 'note' processing -->
|
3114
|
+
|
3115
|
+
|
3116
|
+
|
3117
|
+
|
3118
|
+
|
3119
|
+
|
3120
|
+
|
3121
|
+
<!-- except gb -->
|
3122
|
+
|
3123
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3124
|
+
|
3125
|
+
|
3126
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3127
|
+
<xsl:choose>
|
3128
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
3129
|
+
show Note under table in preface (ex. abstract) sections
|
3130
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3131
|
+
</xsl:when>
|
3132
|
+
<xsl:otherwise>
|
3133
|
+
empty, because notes show at page side in main sections
|
3134
|
+
<fo:block/>
|
3135
|
+
</xsl:otherwise>
|
3136
|
+
</xsl:choose>
|
3137
|
+
</xsl:if> -->
|
3138
|
+
|
3139
|
+
|
3140
|
+
<!-- horizontal row separator -->
|
3141
|
+
|
3142
|
+
|
3143
|
+
<!-- fn processing -->
|
3144
|
+
<xsl:call-template name="fn_display"/>
|
3145
|
+
|
3146
|
+
</fo:table-cell>
|
3147
|
+
</fo:table-row>
|
3148
|
+
</fo:table-body>
|
3149
|
+
|
3150
|
+
</fo:table>
|
3151
|
+
</xsl:if>
|
2869
3152
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
2870
3153
|
|
2871
3154
|
<xsl:variable name="cols-count">
|
@@ -2883,6 +3166,8 @@
|
|
2883
3166
|
</xsl:choose>
|
2884
3167
|
</xsl:variable>
|
2885
3168
|
|
3169
|
+
|
3170
|
+
|
2886
3171
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
2887
3172
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2888
3173
|
</xsl:apply-templates>
|
@@ -2892,6 +3177,8 @@
|
|
2892
3177
|
</xsl:call-template>
|
2893
3178
|
|
2894
3179
|
<fo:table-body>
|
3180
|
+
|
3181
|
+
|
2895
3182
|
<xsl:apply-templates/>
|
2896
3183
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
2897
3184
|
|
@@ -2918,6 +3205,11 @@
|
|
2918
3205
|
</xsl:if>
|
2919
3206
|
|
2920
3207
|
|
3208
|
+
|
3209
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3210
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
3211
|
+
</xsl:if> -->
|
3212
|
+
|
2921
3213
|
<xsl:apply-templates/>
|
2922
3214
|
</fo:table-row>
|
2923
3215
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -2943,6 +3235,8 @@
|
|
2943
3235
|
|
2944
3236
|
|
2945
3237
|
|
3238
|
+
|
3239
|
+
|
2946
3240
|
<xsl:if test="@colspan">
|
2947
3241
|
<xsl:attribute name="number-columns-spanned">
|
2948
3242
|
<xsl:value-of select="@colspan"/>
|
@@ -2953,10 +3247,22 @@
|
|
2953
3247
|
<xsl:value-of select="@rowspan"/>
|
2954
3248
|
</xsl:attribute>
|
2955
3249
|
</xsl:if>
|
3250
|
+
<xsl:call-template name="display-align"/>
|
2956
3251
|
<fo:block>
|
2957
3252
|
<xsl:apply-templates/>
|
2958
3253
|
</fo:block>
|
2959
3254
|
</fo:table-cell>
|
3255
|
+
</xsl:template><xsl:template name="display-align">
|
3256
|
+
<xsl:if test="@valign">
|
3257
|
+
<xsl:attribute name="display-align">
|
3258
|
+
<xsl:choose>
|
3259
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
3260
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
3261
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
3262
|
+
<xsl:otherwise>before</xsl:otherwise>
|
3263
|
+
</xsl:choose>
|
3264
|
+
</xsl:attribute>
|
3265
|
+
</xsl:if>
|
2960
3266
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
2961
3267
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
2962
3268
|
<xsl:attribute name="text-align">
|
@@ -2970,7 +3276,8 @@
|
|
2970
3276
|
|
2971
3277
|
|
2972
3278
|
|
2973
|
-
|
3279
|
+
|
3280
|
+
|
2974
3281
|
|
2975
3282
|
|
2976
3283
|
|
@@ -2980,6 +3287,7 @@
|
|
2980
3287
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
2981
3288
|
</xsl:if>
|
2982
3289
|
|
3290
|
+
|
2983
3291
|
<xsl:if test="@colspan">
|
2984
3292
|
<xsl:attribute name="number-columns-spanned">
|
2985
3293
|
<xsl:value-of select="@colspan"/>
|
@@ -2990,8 +3298,8 @@
|
|
2990
3298
|
<xsl:value-of select="@rowspan"/>
|
2991
3299
|
</xsl:attribute>
|
2992
3300
|
</xsl:if>
|
2993
|
-
<
|
2994
|
-
|
3301
|
+
<xsl:call-template name="display-align"/>
|
3302
|
+
<fo:block>
|
2995
3303
|
<xsl:apply-templates/>
|
2996
3304
|
</fo:block>
|
2997
3305
|
</fo:table-cell>
|
@@ -3003,14 +3311,17 @@
|
|
3003
3311
|
|
3004
3312
|
|
3005
3313
|
|
3314
|
+
|
3315
|
+
|
3006
3316
|
<fo:inline padding-right="2mm">
|
3007
3317
|
|
3008
3318
|
|
3009
3319
|
|
3010
|
-
|
3320
|
+
|
3011
3321
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3012
3322
|
|
3013
3323
|
</fo:inline>
|
3324
|
+
|
3014
3325
|
<xsl:apply-templates mode="process"/>
|
3015
3326
|
</fo:block>
|
3016
3327
|
|
@@ -3034,6 +3345,7 @@
|
|
3034
3345
|
|
3035
3346
|
|
3036
3347
|
|
3348
|
+
|
3037
3349
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
3038
3350
|
|
3039
3351
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -3045,14 +3357,17 @@
|
|
3045
3357
|
|
3046
3358
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3047
3359
|
|
3360
|
+
|
3048
3361
|
<xsl:value-of select="@reference"/>
|
3049
3362
|
|
3363
|
+
|
3050
3364
|
</fo:inline>
|
3051
3365
|
<fo:inline>
|
3052
3366
|
|
3053
3367
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3054
3368
|
|
3055
|
-
<xsl:apply-templates/>
|
3369
|
+
<!-- <xsl:apply-templates /> -->
|
3370
|
+
<xsl:copy-of select="./node()"/>
|
3056
3371
|
</fo:inline>
|
3057
3372
|
</fo:block>
|
3058
3373
|
</xsl:if>
|
@@ -3089,7 +3404,20 @@
|
|
3089
3404
|
<xsl:variable name="following_dl_colwidths">
|
3090
3405
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
3091
3406
|
<xsl:variable name="html-table">
|
3092
|
-
<xsl:variable name="
|
3407
|
+
<xsl:variable name="doc_ns">
|
3408
|
+
|
3409
|
+
</xsl:variable>
|
3410
|
+
<xsl:variable name="ns">
|
3411
|
+
<xsl:choose>
|
3412
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
3413
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
3414
|
+
</xsl:when>
|
3415
|
+
<xsl:otherwise>
|
3416
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
3417
|
+
</xsl:otherwise>
|
3418
|
+
</xsl:choose>
|
3419
|
+
</xsl:variable>
|
3420
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3093
3421
|
<xsl:element name="{$ns}:table">
|
3094
3422
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
3095
3423
|
<tbody>
|
@@ -3154,7 +3482,8 @@
|
|
3154
3482
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3155
3483
|
</xsl:if>
|
3156
3484
|
|
3157
|
-
<xsl:apply-templates/>
|
3485
|
+
<!-- <xsl:apply-templates /> -->
|
3486
|
+
<xsl:copy-of select="./node()"/>
|
3158
3487
|
</fo:block>
|
3159
3488
|
</fo:table-cell>
|
3160
3489
|
</fo:table-row>
|
@@ -3171,15 +3500,19 @@
|
|
3171
3500
|
|
3172
3501
|
|
3173
3502
|
|
3503
|
+
|
3174
3504
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
3175
3505
|
<xsl:attribute name="color">blue</xsl:attribute>
|
3176
3506
|
|
3177
3507
|
|
3178
3508
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3179
3509
|
|
3510
|
+
|
3180
3511
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
3181
3512
|
|
3513
|
+
|
3182
3514
|
<xsl:value-of select="@reference"/>
|
3515
|
+
|
3183
3516
|
</fo:basic-link>
|
3184
3517
|
</fo:inline>
|
3185
3518
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -3187,123 +3520,150 @@
|
|
3187
3520
|
<xsl:apply-templates/>
|
3188
3521
|
</fo:inline>
|
3189
3522
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
3190
|
-
<
|
3191
|
-
|
3192
|
-
|
3193
|
-
|
3194
|
-
|
3195
|
-
|
3196
|
-
|
3197
|
-
|
3523
|
+
<fo:block-container margin-left="0mm">
|
3524
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3525
|
+
<xsl:attribute name="margin-left">
|
3526
|
+
<xsl:choose>
|
3527
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3528
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3529
|
+
</xsl:choose>
|
3530
|
+
</xsl:attribute>
|
3198
3531
|
|
3532
|
+
</xsl:if>
|
3533
|
+
<fo:block-container margin-left="0mm">
|
3534
|
+
|
3535
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
3199
3536
|
|
3200
|
-
|
3201
|
-
|
3202
|
-
|
3203
|
-
<xsl:call-template name="getTitle">
|
3204
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
3205
|
-
</xsl:call-template>
|
3206
|
-
</xsl:variable>
|
3207
|
-
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3208
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
3209
|
-
<xsl:text/>
|
3210
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
3211
|
-
</fo:block>
|
3212
|
-
|
3213
|
-
</xsl:when>
|
3214
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
3215
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3219
|
-
|
3220
|
-
<xsl:variable name="title-where">
|
3221
|
-
<xsl:call-template name="getTitle">
|
3222
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
3223
|
-
</xsl:call-template>
|
3224
|
-
</xsl:variable>
|
3225
|
-
<xsl:value-of select="$title-where"/>
|
3226
|
-
</fo:block>
|
3227
|
-
</xsl:when>
|
3228
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
3229
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
3230
|
-
|
3231
|
-
|
3232
|
-
|
3233
|
-
<xsl:variable name="title-key">
|
3234
|
-
<xsl:call-template name="getTitle">
|
3235
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
3236
|
-
</xsl:call-template>
|
3237
|
-
</xsl:variable>
|
3238
|
-
<xsl:value-of select="$title-key"/>
|
3239
|
-
</fo:block>
|
3240
|
-
</xsl:when>
|
3241
|
-
</xsl:choose>
|
3242
|
-
|
3243
|
-
<!-- a few components -->
|
3244
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
3245
|
-
<fo:block>
|
3246
|
-
|
3247
|
-
|
3248
|
-
|
3249
|
-
<xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
|
3250
|
-
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3251
|
-
</xsl:if>
|
3537
|
+
<xsl:variable name="key_iso">
|
3538
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
3539
|
+
</xsl:variable>
|
3252
3540
|
|
3541
|
+
<xsl:choose>
|
3542
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
3543
|
+
|
3544
|
+
|
3545
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
3546
|
+
|
3547
|
+
<xsl:variable name="title-where">
|
3548
|
+
<xsl:call-template name="getTitle">
|
3549
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3550
|
+
</xsl:call-template>
|
3551
|
+
</xsl:variable>
|
3552
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3553
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
3554
|
+
<xsl:text/>
|
3555
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
3556
|
+
</fo:block>
|
3557
|
+
|
3558
|
+
</xsl:when>
|
3559
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
3560
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
3561
|
+
|
3562
|
+
|
3563
|
+
|
3564
|
+
|
3565
|
+
<xsl:variable name="title-where">
|
3566
|
+
<xsl:call-template name="getTitle">
|
3567
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3568
|
+
</xsl:call-template>
|
3569
|
+
</xsl:variable>
|
3570
|
+
<xsl:value-of select="$title-where"/>
|
3571
|
+
</fo:block>
|
3572
|
+
</xsl:when>
|
3573
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
3574
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
3575
|
+
|
3576
|
+
|
3577
|
+
|
3578
|
+
<xsl:variable name="title-key">
|
3579
|
+
<xsl:call-template name="getTitle">
|
3580
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
3581
|
+
</xsl:call-template>
|
3582
|
+
</xsl:variable>
|
3583
|
+
<xsl:value-of select="$title-key"/>
|
3584
|
+
</fo:block>
|
3585
|
+
</xsl:when>
|
3586
|
+
</xsl:choose>
|
3253
3587
|
|
3254
|
-
|
3255
|
-
|
3256
|
-
|
3257
|
-
<xsl:attribute name="margin-left">-2.5mm</xsl:attribute>
|
3258
|
-
</xsl:if>
|
3259
|
-
|
3260
|
-
|
3261
|
-
|
3262
|
-
|
3263
|
-
<fo:table width="95%" table-layout="fixed">
|
3588
|
+
<!-- a few components -->
|
3589
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
3590
|
+
<fo:block>
|
3264
3591
|
|
3265
|
-
|
3266
|
-
|
3267
|
-
|
3268
|
-
|
3269
|
-
|
3270
|
-
|
3592
|
+
|
3593
|
+
|
3594
|
+
<xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
|
3595
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3596
|
+
</xsl:if>
|
3597
|
+
|
3598
|
+
|
3599
|
+
<fo:block>
|
3600
|
+
|
3601
|
+
<xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
|
3602
|
+
<xsl:attribute name="margin-left">-2.5mm</xsl:attribute>
|
3603
|
+
</xsl:if>
|
3604
|
+
|
3605
|
+
|
3606
|
+
|
3607
|
+
|
3608
|
+
<fo:table width="95%" table-layout="fixed">
|
3271
3609
|
|
3272
|
-
|
3273
|
-
|
3274
|
-
|
3275
|
-
|
3276
|
-
|
3277
|
-
|
3278
|
-
|
3279
|
-
|
3280
|
-
</
|
3281
|
-
|
3282
|
-
|
3283
|
-
|
3284
|
-
|
3285
|
-
|
3286
|
-
|
3287
|
-
|
3288
|
-
|
3289
|
-
|
3290
|
-
|
3291
|
-
|
3292
|
-
|
3293
|
-
|
3294
|
-
|
3295
|
-
|
3296
|
-
|
3297
|
-
|
3298
|
-
|
3299
|
-
|
3300
|
-
|
3301
|
-
|
3302
|
-
|
3303
|
-
|
3304
|
-
|
3305
|
-
|
3306
|
-
|
3610
|
+
<xsl:choose>
|
3611
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
3612
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
3613
|
+
</xsl:when>
|
3614
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
3615
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3616
|
+
|
3617
|
+
</xsl:when>
|
3618
|
+
</xsl:choose>
|
3619
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
3620
|
+
<xsl:variable name="html-table">
|
3621
|
+
<xsl:variable name="doc_ns">
|
3622
|
+
|
3623
|
+
</xsl:variable>
|
3624
|
+
<xsl:variable name="ns">
|
3625
|
+
<xsl:choose>
|
3626
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
3627
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
3628
|
+
</xsl:when>
|
3629
|
+
<xsl:otherwise>
|
3630
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
3631
|
+
</xsl:otherwise>
|
3632
|
+
</xsl:choose>
|
3633
|
+
</xsl:variable>
|
3634
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3635
|
+
<xsl:element name="{$ns}:table">
|
3636
|
+
<tbody>
|
3637
|
+
<xsl:apply-templates mode="dl"/>
|
3638
|
+
</tbody>
|
3639
|
+
</xsl:element>
|
3640
|
+
</xsl:variable>
|
3641
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
3642
|
+
<xsl:variable name="colwidths">
|
3643
|
+
<xsl:call-template name="calculate-column-widths">
|
3644
|
+
<xsl:with-param name="cols-count" select="2"/>
|
3645
|
+
<xsl:with-param name="table" select="$html-table"/>
|
3646
|
+
</xsl:call-template>
|
3647
|
+
</xsl:variable>
|
3648
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
3649
|
+
<xsl:variable name="maxlength_dt">
|
3650
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
3651
|
+
</xsl:variable>
|
3652
|
+
<xsl:call-template name="setColumnWidth_dl">
|
3653
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
3654
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
3655
|
+
</xsl:call-template>
|
3656
|
+
<fo:table-body>
|
3657
|
+
<xsl:apply-templates>
|
3658
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
3659
|
+
</xsl:apply-templates>
|
3660
|
+
</fo:table-body>
|
3661
|
+
</fo:table>
|
3662
|
+
</fo:block>
|
3663
|
+
</fo:block>
|
3664
|
+
</xsl:if>
|
3665
|
+
</fo:block-container>
|
3666
|
+
</fo:block-container>
|
3307
3667
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
3308
3668
|
<xsl:param name="colwidths"/>
|
3309
3669
|
<xsl:param name="maxlength_dt"/>
|
@@ -3413,6 +3773,7 @@
|
|
3413
3773
|
<xsl:param name="key_iso"/>
|
3414
3774
|
|
3415
3775
|
<fo:table-row>
|
3776
|
+
|
3416
3777
|
<fo:table-cell>
|
3417
3778
|
|
3418
3779
|
<fo:block margin-top="6pt">
|
@@ -3430,6 +3791,7 @@
|
|
3430
3791
|
|
3431
3792
|
|
3432
3793
|
|
3794
|
+
|
3433
3795
|
<xsl:apply-templates/>
|
3434
3796
|
<!-- <xsl:if test="$namespace = 'gb'">
|
3435
3797
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -3495,6 +3857,31 @@
|
|
3495
3857
|
</fo:inline>
|
3496
3858
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
3497
3859
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
3860
|
+
<xsl:variable name="_font-size">
|
3861
|
+
|
3862
|
+
|
3863
|
+
|
3864
|
+
|
3865
|
+
|
3866
|
+
|
3867
|
+
|
3868
|
+
|
3869
|
+
|
3870
|
+
|
3871
|
+
|
3872
|
+
|
3873
|
+
|
3874
|
+
|
3875
|
+
</xsl:variable>
|
3876
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3877
|
+
<xsl:if test="$font-size != ''">
|
3878
|
+
<xsl:attribute name="font-size">
|
3879
|
+
<xsl:choose>
|
3880
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3881
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3882
|
+
</xsl:choose>
|
3883
|
+
</xsl:attribute>
|
3884
|
+
</xsl:if>
|
3498
3885
|
<xsl:apply-templates/>
|
3499
3886
|
</fo:inline>
|
3500
3887
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -3820,11 +4207,24 @@
|
|
3820
4207
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3821
4208
|
<xsl:value-of select="substring($str, 2)"/>
|
3822
4209
|
</xsl:template><xsl:template match="mathml:math">
|
3823
|
-
<fo:inline font-family="
|
3824
|
-
<
|
3825
|
-
<xsl:
|
3826
|
-
</
|
4210
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
4211
|
+
<xsl:variable name="mathml">
|
4212
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
4213
|
+
</xsl:variable>
|
4214
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
4215
|
+
<!-- <xsl:copy-of select="."/> -->
|
4216
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
4217
|
+
</fo:instream-foreign-object>
|
3827
4218
|
</fo:inline>
|
4219
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
4220
|
+
<xsl:copy>
|
4221
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
4222
|
+
</xsl:copy>
|
4223
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
4224
|
+
<xsl:copy>
|
4225
|
+
<!-- replace start and end spaces to non-break space -->
|
4226
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
4227
|
+
</xsl:copy>
|
3828
4228
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3829
4229
|
<xsl:variable name="target">
|
3830
4230
|
<xsl:choose>
|
@@ -3901,13 +4301,26 @@
|
|
3901
4301
|
<xsl:apply-templates/>
|
3902
4302
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3903
4303
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3904
|
-
|
4304
|
+
|
3905
4305
|
<xsl:apply-templates/>
|
3906
4306
|
</fo:basic-link>
|
3907
4307
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
3908
|
-
<fo:block
|
3909
|
-
<xsl:
|
3910
|
-
|
4308
|
+
<fo:block-container margin-left="0mm">
|
4309
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4310
|
+
<xsl:attribute name="margin-left">
|
4311
|
+
<xsl:choose>
|
4312
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4313
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4314
|
+
</xsl:choose>
|
4315
|
+
</xsl:attribute>
|
4316
|
+
|
4317
|
+
</xsl:if>
|
4318
|
+
<fo:block-container margin-left="0mm">
|
4319
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
4320
|
+
<xsl:apply-templates/>
|
4321
|
+
</fo:block>
|
4322
|
+
</fo:block-container>
|
4323
|
+
</fo:block-container>
|
3911
4324
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
3912
4325
|
<fo:inline>
|
3913
4326
|
<xsl:apply-templates/>
|
@@ -3941,6 +4354,8 @@
|
|
3941
4354
|
|
3942
4355
|
|
3943
4356
|
|
4357
|
+
|
4358
|
+
|
3944
4359
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3945
4360
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3946
4361
|
</fo:inline>
|
@@ -3967,7 +4382,9 @@
|
|
3967
4382
|
</xsl:choose>
|
3968
4383
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3969
4384
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3970
|
-
<xsl:
|
4385
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
4386
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4387
|
+
</fo:inline>
|
3971
4388
|
<xsl:apply-templates/>
|
3972
4389
|
</fo:block>
|
3973
4390
|
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
|
@@ -4066,19 +4483,140 @@
|
|
4066
4483
|
|
4067
4484
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
4068
4485
|
</fo:block>
|
4069
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
4486
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
4070
4487
|
<xsl:apply-templates mode="contents"/>
|
4071
4488
|
<xsl:text> </xsl:text>
|
4072
|
-
</xsl:template><xsl:template match="
|
4489
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
4490
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4491
|
+
<xsl:text> </xsl:text>
|
4492
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4073
4493
|
<xsl:value-of select="."/>
|
4074
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
4494
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
4495
|
+
<xsl:value-of select="."/>
|
4496
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
4497
|
+
<xsl:apply-templates mode="contents"/>
|
4498
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
4499
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4500
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
4501
|
+
<xsl:apply-templates select="."/>
|
4502
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4503
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4504
|
+
</xsl:template><xsl:template name="addBookmarks">
|
4505
|
+
<xsl:param name="contents"/>
|
4506
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
4507
|
+
<fo:bookmark-tree>
|
4508
|
+
<xsl:choose>
|
4509
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
4510
|
+
<xsl:choose>
|
4511
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
4512
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4513
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
4514
|
+
<fo:bookmark-title>
|
4515
|
+
<xsl:variable name="bookmark-title_">
|
4516
|
+
<xsl:call-template name="getLangVersion">
|
4517
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4518
|
+
</xsl:call-template>
|
4519
|
+
</xsl:variable>
|
4520
|
+
<xsl:choose>
|
4521
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
4522
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
4523
|
+
</xsl:when>
|
4524
|
+
<xsl:otherwise>
|
4525
|
+
<xsl:choose>
|
4526
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
4527
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
4528
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
4529
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
4530
|
+
</xsl:choose>
|
4531
|
+
</xsl:otherwise>
|
4532
|
+
</xsl:choose>
|
4533
|
+
</fo:bookmark-title>
|
4534
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4535
|
+
</fo:bookmark>
|
4536
|
+
|
4537
|
+
</xsl:for-each>
|
4538
|
+
</xsl:when>
|
4539
|
+
<xsl:otherwise>
|
4540
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4541
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4542
|
+
</xsl:for-each>
|
4543
|
+
</xsl:otherwise>
|
4544
|
+
</xsl:choose>
|
4545
|
+
</xsl:when>
|
4546
|
+
<xsl:otherwise>
|
4547
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
4548
|
+
</xsl:otherwise>
|
4549
|
+
</xsl:choose>
|
4550
|
+
|
4551
|
+
|
4552
|
+
|
4553
|
+
<xsl:if test="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
|
4554
|
+
<fo:bookmark internal-destination="{//*[local-name() = 'figure'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
|
4555
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
4556
|
+
<xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
|
4557
|
+
<fo:bookmark internal-destination="{@id}">
|
4558
|
+
<fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']/text()" mode="bookmarks"/></fo:bookmark-title>
|
4559
|
+
</fo:bookmark>
|
4560
|
+
</xsl:for-each>
|
4561
|
+
</fo:bookmark>
|
4562
|
+
</xsl:if>
|
4563
|
+
|
4564
|
+
|
4565
|
+
|
4566
|
+
<xsl:if test="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
|
4567
|
+
<fo:bookmark internal-destination="{//*[local-name() = 'table'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
|
4568
|
+
<fo:bookmark-title>
|
4569
|
+
<xsl:choose>
|
4570
|
+
<xsl:when test="@lang = 'fr'">Tableaux</xsl:when>
|
4571
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
4572
|
+
</xsl:choose>
|
4573
|
+
</fo:bookmark-title>
|
4574
|
+
<xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
|
4575
|
+
<fo:bookmark internal-destination="{@id}">
|
4576
|
+
<fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']//text()" mode="bookmarks"/></fo:bookmark-title>
|
4577
|
+
</fo:bookmark>
|
4578
|
+
</xsl:for-each>
|
4579
|
+
</fo:bookmark>
|
4580
|
+
</xsl:if>
|
4581
|
+
|
4582
|
+
|
4583
|
+
|
4584
|
+
|
4585
|
+
</fo:bookmark-tree>
|
4586
|
+
</xsl:if>
|
4587
|
+
</xsl:template><xsl:template name="getLangVersion">
|
4588
|
+
<xsl:param name="lang"/>
|
4589
|
+
<xsl:choose>
|
4590
|
+
<xsl:when test="$lang = 'en'">
|
4591
|
+
|
4592
|
+
|
4593
|
+
</xsl:when>
|
4594
|
+
<xsl:when test="$lang = 'fr'">
|
4595
|
+
|
4596
|
+
|
4597
|
+
</xsl:when>
|
4598
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
4599
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
4600
|
+
</xsl:choose>
|
4601
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
4602
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
4603
|
+
<fo:bookmark-title>
|
4604
|
+
<xsl:if test="@section != ''">
|
4605
|
+
<xsl:value-of select="@section"/>
|
4606
|
+
<xsl:text> </xsl:text>
|
4607
|
+
</xsl:if>
|
4608
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4609
|
+
</fo:bookmark-title>
|
4610
|
+
<xsl:apply-templates mode="bookmark"/>
|
4611
|
+
</fo:bookmark>
|
4612
|
+
</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">
|
4075
4613
|
<xsl:if test="normalize-space() != ''">
|
4076
4614
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
4077
4615
|
|
4078
4616
|
<xsl:if test="nist:dl">
|
4079
4617
|
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
4080
4618
|
</xsl:if>
|
4081
|
-
|
4619
|
+
|
4082
4620
|
<xsl:apply-templates/>
|
4083
4621
|
</fo:block>
|
4084
4622
|
</xsl:if>
|
@@ -4133,7 +4671,7 @@
|
|
4133
4671
|
<xsl:apply-templates/>
|
4134
4672
|
</xsl:otherwise>
|
4135
4673
|
</xsl:choose>
|
4136
|
-
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
4674
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
4137
4675
|
<xsl:text> </xsl:text>
|
4138
4676
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
4139
4677
|
<xsl:copy>
|
@@ -4142,21 +4680,61 @@
|
|
4142
4680
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4143
4681
|
<xsl:text> </xsl:text>
|
4144
4682
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4145
|
-
|
4146
|
-
|
4147
|
-
|
4148
|
-
|
4149
|
-
|
4683
|
+
|
4684
|
+
<fo:block-container margin-left="0mm">
|
4685
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4686
|
+
<xsl:attribute name="margin-left">
|
4687
|
+
<xsl:choose>
|
4688
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4689
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4690
|
+
</xsl:choose>
|
4691
|
+
</xsl:attribute>
|
4692
|
+
|
4693
|
+
</xsl:if>
|
4694
|
+
<fo:block-container margin-left="0mm">
|
4695
|
+
|
4696
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
4697
|
+
<xsl:variable name="_font-size">
|
4698
|
+
|
4699
|
+
|
4700
|
+
|
4701
|
+
|
4702
|
+
|
4703
|
+
|
4704
|
+
|
4705
|
+
|
4706
|
+
|
4707
|
+
10
|
4708
|
+
|
4709
|
+
|
4710
|
+
|
4711
|
+
|
4712
|
+
</xsl:variable>
|
4713
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
4714
|
+
<xsl:if test="$font-size != ''">
|
4715
|
+
<xsl:attribute name="font-size">
|
4716
|
+
<xsl:choose>
|
4717
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4718
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4719
|
+
</xsl:choose>
|
4720
|
+
</xsl:attribute>
|
4721
|
+
</xsl:if>
|
4722
|
+
<xsl:apply-templates/>
|
4723
|
+
</fo:block>
|
4724
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4725
|
+
|
4726
|
+
</fo:block-container>
|
4727
|
+
</fo:block-container>
|
4728
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
4150
4729
|
<xsl:variable name="text">
|
4151
4730
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
4152
4731
|
</xsl:variable>
|
4153
|
-
<xsl:call-template name="add-zero-spaces">
|
4732
|
+
<xsl:call-template name="add-zero-spaces-java">
|
4154
4733
|
<xsl:with-param name="text" select="$text"/>
|
4155
4734
|
</xsl:call-template>
|
4156
4735
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
4157
4736
|
<xsl:if test="normalize-space() != ''">
|
4158
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4159
|
-
|
4737
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4160
4738
|
<xsl:apply-templates/>
|
4161
4739
|
</fo:block>
|
4162
4740
|
</xsl:if>
|
@@ -4232,9 +4810,9 @@
|
|
4232
4810
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
4233
4811
|
</xsl:if>
|
4234
4812
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
4235
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black"
|
4813
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
4236
4814
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4237
|
-
<xsl:attribute name="border">0.5pt solid black</xsl:attribute>
|
4815
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
4238
4816
|
</xsl:if>
|
4239
4817
|
<xsl:variable name="simple-table">
|
4240
4818
|
<xsl:call-template name="getSimpleTable"/>
|
@@ -4243,8 +4821,8 @@
|
|
4243
4821
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
4244
4822
|
<!-- <fo:table-column column-width="35mm"/>
|
4245
4823
|
<fo:table-column column-width="115mm"/> -->
|
4246
|
-
<fo:table-column column-width="
|
4247
|
-
<fo:table-column column-width="
|
4824
|
+
<fo:table-column column-width="30%"/>
|
4825
|
+
<fo:table-column column-width="70%"/>
|
4248
4826
|
</xsl:if>
|
4249
4827
|
<xsl:apply-templates mode="requirement"/>
|
4250
4828
|
</fo:table>
|
@@ -4267,14 +4845,21 @@
|
|
4267
4845
|
<xsl:apply-templates mode="requirement"/>
|
4268
4846
|
</fo:table-body>
|
4269
4847
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
4270
|
-
<fo:table-row height="7mm">
|
4271
|
-
<xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])
|
4272
|
-
<xsl:attribute name="border">1pt solid black</xsl:attribute>
|
4848
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
4849
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
4850
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
4851
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
4852
|
+
</xsl:if>
|
4853
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
4854
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
4855
|
+
</xsl:if>
|
4856
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
4857
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
4273
4858
|
</xsl:if>
|
4274
4859
|
<xsl:apply-templates mode="requirement"/>
|
4275
4860
|
</fo:table-row>
|
4276
4861
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
4277
|
-
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black"
|
4862
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
4278
4863
|
<xsl:attribute name="text-align">
|
4279
4864
|
<xsl:choose>
|
4280
4865
|
<xsl:when test="@align">
|
@@ -4293,6 +4878,7 @@
|
|
4293
4878
|
<xsl:value-of select="@rowspan"/>
|
4294
4879
|
</xsl:attribute>
|
4295
4880
|
</xsl:if>
|
4881
|
+
<xsl:call-template name="display-align"/>
|
4296
4882
|
|
4297
4883
|
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4298
4884
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
@@ -4308,7 +4894,7 @@
|
|
4308
4894
|
</fo:block>
|
4309
4895
|
</fo:table-cell>
|
4310
4896
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
4311
|
-
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black"
|
4897
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
4312
4898
|
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4313
4899
|
<xsl:attribute name="padding">0mm</xsl:attribute>
|
4314
4900
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -4321,6 +4907,9 @@
|
|
4321
4907
|
<xsl:otherwise>left</xsl:otherwise>
|
4322
4908
|
</xsl:choose>
|
4323
4909
|
</xsl:attribute>
|
4910
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
4911
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4912
|
+
</xsl:if>
|
4324
4913
|
<xsl:if test="@colspan">
|
4325
4914
|
<xsl:attribute name="number-columns-spanned">
|
4326
4915
|
<xsl:value-of select="@colspan"/>
|
@@ -4331,6 +4920,7 @@
|
|
4331
4920
|
<xsl:value-of select="@rowspan"/>
|
4332
4921
|
</xsl:attribute>
|
4333
4922
|
</xsl:if>
|
4923
|
+
<xsl:call-template name="display-align"/>
|
4334
4924
|
|
4335
4925
|
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4336
4926
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
@@ -4346,7 +4936,7 @@
|
|
4346
4936
|
</fo:block>
|
4347
4937
|
</fo:table-cell>
|
4348
4938
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
4349
|
-
<fo:block font-size="11pt" font-weight="bold"
|
4939
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
4350
4940
|
<xsl:apply-templates/>
|
4351
4941
|
</fo:block>
|
4352
4942
|
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
@@ -4372,12 +4962,13 @@
|
|
4372
4962
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4373
4963
|
|
4374
4964
|
<xsl:variable name="element">
|
4375
|
-
block
|
4965
|
+
block
|
4376
4966
|
|
4967
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
4377
4968
|
</xsl:variable>
|
4378
4969
|
|
4379
4970
|
<xsl:choose>
|
4380
|
-
<xsl:when test="normalize-space($element)
|
4971
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
4381
4972
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
4382
4973
|
<xsl:apply-templates/>
|
4383
4974
|
</fo:block>
|
@@ -4414,25 +5005,44 @@
|
|
4414
5005
|
</xsl:otherwise>
|
4415
5006
|
</xsl:choose>
|
4416
5007
|
|
4417
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
4418
|
-
|
5008
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
5009
|
+
|
5010
|
+
<xsl:variable name="element">
|
5011
|
+
block
|
4419
5012
|
|
4420
|
-
|
4421
|
-
|
5013
|
+
</xsl:variable>
|
5014
|
+
<xsl:choose>
|
5015
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
5016
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
5017
|
+
|
5018
|
+
<xsl:apply-templates/>
|
5019
|
+
</fo:block>
|
5020
|
+
</xsl:when>
|
5021
|
+
<xsl:otherwise>
|
5022
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
5023
|
+
<xsl:apply-templates/>
|
5024
|
+
</fo:inline>
|
5025
|
+
</xsl:otherwise>
|
5026
|
+
</xsl:choose>
|
4422
5027
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4423
5028
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4424
5029
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4425
5030
|
<xsl:variable name="termsource_text">
|
4426
5031
|
<xsl:apply-templates/>
|
4427
5032
|
</xsl:variable>
|
5033
|
+
|
4428
5034
|
<xsl:choose>
|
4429
5035
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4430
5036
|
<xsl:apply-templates/>
|
4431
5037
|
</xsl:when>
|
4432
|
-
<xsl:otherwise>
|
4433
|
-
|
4434
|
-
|
4435
|
-
|
5038
|
+
<xsl:otherwise>
|
5039
|
+
|
5040
|
+
<xsl:text>[</xsl:text>
|
5041
|
+
|
5042
|
+
<xsl:apply-templates/>
|
5043
|
+
|
5044
|
+
<xsl:text>]</xsl:text>
|
5045
|
+
|
4436
5046
|
</xsl:otherwise>
|
4437
5047
|
</xsl:choose>
|
4438
5048
|
</fo:block>
|
@@ -4453,18 +5063,29 @@
|
|
4453
5063
|
<xsl:if test="normalize-space() != ''">
|
4454
5064
|
<xsl:value-of select="."/>
|
4455
5065
|
</xsl:if>
|
4456
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
5066
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
5067
|
+
<fo:block-container margin-left="0mm">
|
5068
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
5069
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
5070
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
5071
|
+
</xsl:if>
|
5072
|
+
</xsl:if>
|
5073
|
+
|
5074
|
+
<fo:block-container margin-left="0mm">
|
4457
5075
|
|
4458
|
-
|
4459
|
-
|
4460
|
-
|
4461
|
-
|
4462
|
-
|
4463
|
-
|
4464
|
-
|
4465
|
-
|
4466
|
-
|
4467
|
-
|
5076
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
5077
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
5078
|
+
</fo:block>
|
5079
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
5080
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
5081
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
5082
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
5083
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
5084
|
+
</fo:block>
|
5085
|
+
</xsl:if>
|
5086
|
+
|
5087
|
+
</fo:block-container>
|
5088
|
+
</fo:block-container>
|
4468
5089
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
4469
5090
|
<xsl:if test="../*[local-name() = 'author']">
|
4470
5091
|
<xsl:text>, </xsl:text>
|
@@ -4492,6 +5113,7 @@
|
|
4492
5113
|
<xsl:if test="@type = 'inline'">
|
4493
5114
|
|
4494
5115
|
|
5116
|
+
|
4495
5117
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
4496
5118
|
|
4497
5119
|
</xsl:if>
|
@@ -4532,6 +5154,7 @@
|
|
4532
5154
|
|
4533
5155
|
|
4534
5156
|
|
5157
|
+
|
4535
5158
|
</xsl:variable>
|
4536
5159
|
|
4537
5160
|
<xsl:variable name="padding-right">
|
@@ -4626,6 +5249,7 @@
|
|
4626
5249
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
4627
5250
|
<fo:block>
|
4628
5251
|
<xsl:call-template name="setId"/>
|
5252
|
+
|
4629
5253
|
<xsl:apply-templates/>
|
4630
5254
|
</fo:block>
|
4631
5255
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -4652,6 +5276,31 @@
|
|
4652
5276
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
4653
5277
|
<!-- 0xA0 to space replacement -->
|
4654
5278
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
5279
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
5280
|
+
<xsl:choose>
|
5281
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
5282
|
+
<fo:block-container>
|
5283
|
+
<xsl:attribute name="margin-left">
|
5284
|
+
<xsl:choose>
|
5285
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
5286
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
5287
|
+
</xsl:choose>
|
5288
|
+
</xsl:attribute>
|
5289
|
+
|
5290
|
+
|
5291
|
+
<fo:block-container margin-left="0mm">
|
5292
|
+
<fo:block>
|
5293
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
5294
|
+
</fo:block>
|
5295
|
+
</fo:block-container>
|
5296
|
+
</fo:block-container>
|
5297
|
+
</xsl:when>
|
5298
|
+
<xsl:otherwise>
|
5299
|
+
<fo:block>
|
5300
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
5301
|
+
</fo:block>
|
5302
|
+
</xsl:otherwise>
|
5303
|
+
</xsl:choose>
|
4655
5304
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4656
5305
|
<!-- <row>
|
4657
5306
|
<date>05-07-2013</date>
|
@@ -4684,7 +5333,28 @@
|
|
4684
5333
|
<fo:block><xsl:apply-templates/></fo:block>
|
4685
5334
|
</fo:table-cell>
|
4686
5335
|
</xsl:template><xsl:template name="processBibitem">
|
5336
|
+
|
4687
5337
|
|
5338
|
+
|
5339
|
+
|
5340
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
5341
|
+
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
5342
|
+
<xsl:choose>
|
5343
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
5344
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
5345
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
5346
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
5347
|
+
</xsl:if>
|
5348
|
+
<xsl:value-of select="$_doc_ident"/>
|
5349
|
+
</xsl:when>
|
5350
|
+
<xsl:otherwise>
|
5351
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
5352
|
+
<xsl:if test="$type != ''">
|
5353
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
5354
|
+
</xsl:if>
|
5355
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
5356
|
+
</xsl:otherwise>
|
5357
|
+
</xsl:choose>
|
4688
5358
|
</xsl:template><xsl:template name="processPersonalAuthor">
|
4689
5359
|
<xsl:choose>
|
4690
5360
|
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
@@ -4803,6 +5473,7 @@
|
|
4803
5473
|
|
4804
5474
|
|
4805
5475
|
|
5476
|
+
|
4806
5477
|
|
4807
5478
|
</xsl:variable>
|
4808
5479
|
<xsl:choose>
|
@@ -4817,6 +5488,7 @@
|
|
4817
5488
|
<dc:creator>
|
4818
5489
|
|
4819
5490
|
|
5491
|
+
|
4820
5492
|
<xsl:for-each select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
4821
5493
|
<xsl:value-of select="*[local-name() = 'person']/*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
4822
5494
|
<xsl:if test="position() != last()">; </xsl:if>
|
@@ -4831,6 +5503,7 @@
|
|
4831
5503
|
<xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
4832
5504
|
|
4833
5505
|
|
5506
|
+
|
4834
5507
|
</xsl:variable>
|
4835
5508
|
<xsl:value-of select="normalize-space($abstract)"/>
|
4836
5509
|
</dc:description>
|
@@ -4931,6 +5604,7 @@
|
|
4931
5604
|
|
4932
5605
|
|
4933
5606
|
|
5607
|
+
|
4934
5608
|
</xsl:variable>
|
4935
5609
|
<xsl:if test="$documentNS != $XSLNS">
|
4936
5610
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -4956,4 +5630,21 @@
|
|
4956
5630
|
</xsl:otherwise>
|
4957
5631
|
</xsl:choose>
|
4958
5632
|
</xsl:attribute>
|
5633
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
5634
|
+
<xsl:param name="text"/>
|
5635
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
5636
|
+
<xsl:if test="string-length($text) > 0">
|
5637
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
5638
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
5639
|
+
<xsl:if test="$char = '®'">
|
5640
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
5641
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
5642
|
+
</xsl:if>
|
5643
|
+
<xsl:value-of select="$char"/>
|
5644
|
+
</fo:inline>
|
5645
|
+
<xsl:call-template name="add-letter-spacing">
|
5646
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
5647
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
5648
|
+
</xsl:call-template>
|
5649
|
+
</xsl:if>
|
4959
5650
|
</xsl:template></xsl:stylesheet>
|