metanorma-nist 1.2.1 → 1.2.6
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 +44 -0
- data/README.adoc +14 -0
- data/lib/asciidoctor/nist/basicdoc.rng +23 -0
- data/lib/asciidoctor/nist/converter.rb +13 -2
- data/lib/asciidoctor/nist/front.rb +0 -4
- data/lib/asciidoctor/nist/isodoc.rng +125 -58
- data/lib/asciidoctor/nist/nist.rng +26 -1
- data/lib/isodoc/nist/base_convert.rb +26 -15
- data/lib/isodoc/nist/html/htmlstyle.css +5 -1
- data/lib/isodoc/nist/html/nist.css +22 -10
- data/lib/isodoc/nist/html/nist.scss +24 -10
- data/lib/isodoc/nist/html/nist_cswp.css +21 -9
- data/lib/isodoc/nist/html/nist_cswp.scss +23 -9
- data/lib/isodoc/nist/html/wordstyle.css +83 -3
- data/lib/isodoc/nist/html/wordstyle.scss +74 -3
- data/lib/isodoc/nist/html/wordstyle_cswp.css +77 -2
- data/lib/isodoc/nist/html/wordstyle_cswp.scss +68 -2
- data/lib/isodoc/nist/html_convert.rb +1 -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 +951 -231
- data/lib/isodoc/nist/nist.sp.xsl +991 -240
- data/lib/isodoc/nist/render.rb +0 -4
- data/lib/isodoc/nist/render_contributors.rb +1 -1
- data/lib/isodoc/nist/section.rb +19 -8
- data/lib/isodoc/nist/word_convert.rb +41 -0
- data/lib/metanorma/nist/version.rb +1 -1
- data/metanorma-nist.gemspec +1 -1
- metadata +5 -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">
|
@@ -1656,6 +1689,9 @@
|
|
1656
1689
|
<xsl:when test="local-name(..) = 'ul'">•</xsl:when>
|
1657
1690
|
<xsl:otherwise> <!-- for ordered lists -->
|
1658
1691
|
<xsl:choose>
|
1692
|
+
<xsl:when test="../@class = 'steps'">
|
1693
|
+
<xsl:number format="1."/>
|
1694
|
+
</xsl:when>
|
1659
1695
|
<xsl:when test="../@type = 'arabic'">
|
1660
1696
|
<xsl:number format="a)"/>
|
1661
1697
|
</xsl:when>
|
@@ -1766,18 +1802,21 @@
|
|
1766
1802
|
</xsl:template>
|
1767
1803
|
|
1768
1804
|
<xsl:template match="mathml:math" priority="2">
|
1769
|
-
<fo:inline font-family="
|
1805
|
+
<fo:inline font-family="STIX Two Math">
|
1770
1806
|
<xsl:if test="ancestor::nist:table">
|
1771
1807
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1772
1808
|
</xsl:if>
|
1809
|
+
<xsl:variable name="mathml">
|
1810
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
1811
|
+
</xsl:variable>
|
1773
1812
|
<fo:instream-foreign-object fox:alt-text="Math">
|
1774
|
-
<xsl:copy-of select="."/>
|
1813
|
+
<!-- <xsl:copy-of select="."/> -->
|
1814
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
1775
1815
|
</fo:instream-foreign-object>
|
1776
1816
|
</fo:inline>
|
1777
1817
|
</xsl:template>
|
1778
1818
|
|
1779
1819
|
|
1780
|
-
|
1781
1820
|
<xsl:template match="nist:terms[nist:term[nist:preferred and nist:definition]]" priority="2">
|
1782
1821
|
<fo:block id="{@id}">
|
1783
1822
|
<fo:table width="100%" table-layout="fixed">
|
@@ -1816,10 +1855,23 @@
|
|
1816
1855
|
|
1817
1856
|
|
1818
1857
|
|
1819
|
-
<xsl:template match="nist:quote" priority="2">
|
1820
|
-
<fo:block-container margin-left="
|
1821
|
-
<xsl:
|
1822
|
-
|
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>
|
1823
1875
|
</fo:block-container>
|
1824
1876
|
</xsl:template>
|
1825
1877
|
|
@@ -1843,27 +1895,26 @@
|
|
1843
1895
|
</xsl:template>
|
1844
1896
|
|
1845
1897
|
<xsl:template match="nist:references">
|
1846
|
-
<fo:block break-after="page"/>
|
1847
1898
|
<fo:block id="{@id}">
|
1848
1899
|
<xsl:apply-templates/>
|
1849
1900
|
</fo:block>
|
1850
1901
|
</xsl:template>
|
1851
1902
|
|
1852
|
-
<xsl:template match="nist:dl[@type = 'glossary']" priority="2">
|
1853
|
-
<xsl:apply-templates/>
|
1903
|
+
<!-- <xsl:template match="nist:dl[@type = 'glossary']" priority="2">
|
1904
|
+
<xsl:apply-templates />
|
1854
1905
|
</xsl:template>
|
1855
1906
|
|
1856
|
-
<xsl:template match="nist:dt[../@type = 'glossary']"
|
1907
|
+
<xsl:template match="nist:dt[../@type = 'glossary']" priority="2">
|
1857
1908
|
<fo:block margin-bottom="12pt">
|
1858
|
-
<xsl:apply-templates/>
|
1909
|
+
<xsl:apply-templates />
|
1859
1910
|
</fo:block>
|
1860
1911
|
</xsl:template>
|
1861
1912
|
|
1862
|
-
<xsl:template match="nist:dd[../@type = 'glossary']"
|
1913
|
+
<xsl:template match="nist:dd[../@type = 'glossary']" priority="2">
|
1863
1914
|
<fo:block margin-bottom="12pt" margin-left="12.7mm">
|
1864
|
-
<xsl:apply-templates/>
|
1915
|
+
<xsl:apply-templates />
|
1865
1916
|
</fo:block>
|
1866
|
-
</xsl:template>
|
1917
|
+
</xsl:template> -->
|
1867
1918
|
|
1868
1919
|
<xsl:template name="insertHeaderFooter">
|
1869
1920
|
<xsl:call-template name="insertHeader"/>
|
@@ -2135,6 +2186,12 @@
|
|
2135
2186
|
|
2136
2187
|
</title-edition>
|
2137
2188
|
|
2189
|
+
<title-edition lang="fr">
|
2190
|
+
|
2191
|
+
<xsl:text>Édition </xsl:text>
|
2192
|
+
|
2193
|
+
</title-edition>
|
2194
|
+
|
2138
2195
|
|
2139
2196
|
<title-toc lang="en">
|
2140
2197
|
|
@@ -2143,7 +2200,12 @@
|
|
2143
2200
|
|
2144
2201
|
|
2145
2202
|
</title-toc>
|
2146
|
-
<title-toc lang="fr">
|
2203
|
+
<title-toc lang="fr">
|
2204
|
+
|
2205
|
+
<xsl:text>Sommaire</xsl:text>
|
2206
|
+
|
2207
|
+
|
2208
|
+
</title-toc>
|
2147
2209
|
|
2148
2210
|
<title-toc lang="zh">Contents</title-toc>
|
2149
2211
|
|
@@ -2177,7 +2239,12 @@
|
|
2177
2239
|
|
2178
2240
|
|
2179
2241
|
|
2180
|
-
<title-source lang="en">
|
2242
|
+
<title-source lang="en">
|
2243
|
+
|
2244
|
+
<xsl:text>SOURCE</xsl:text>
|
2245
|
+
|
2246
|
+
|
2247
|
+
</title-source>
|
2181
2248
|
|
2182
2249
|
<title-keywords lang="en">Keywords</title-keywords>
|
2183
2250
|
|
@@ -2220,12 +2287,25 @@
|
|
2220
2287
|
<title-warning lang="zh">警告</title-warning>
|
2221
2288
|
|
2222
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
|
+
|
2223
2294
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
2224
2295
|
<xsl:param name="name"/>
|
2225
|
-
<xsl:
|
2226
|
-
|
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>
|
2227
2306
|
</xsl:variable>
|
2228
|
-
<xsl:variable name="
|
2307
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
2308
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
2229
2309
|
<xsl:choose>
|
2230
2310
|
<xsl:when test="normalize-space($title_) != ''">
|
2231
2311
|
<xsl:value-of select="$title_"/>
|
@@ -2234,7 +2314,10 @@
|
|
2234
2314
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
2235
2315
|
</xsl:otherwise>
|
2236
2316
|
</xsl:choose>
|
2237
|
-
</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
|
+
|
2238
2321
|
|
2239
2322
|
|
2240
2323
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
@@ -2245,14 +2328,14 @@
|
|
2245
2328
|
|
2246
2329
|
|
2247
2330
|
|
2248
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2249
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2331
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2250
2332
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
2251
2333
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2252
2334
|
|
2253
2335
|
|
2254
2336
|
|
2255
2337
|
|
2338
|
+
|
2256
2339
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
2257
2340
|
|
2258
2341
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -2298,6 +2381,7 @@
|
|
2298
2381
|
|
2299
2382
|
|
2300
2383
|
|
2384
|
+
|
2301
2385
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2302
2386
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2303
2387
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -2329,6 +2413,7 @@
|
|
2329
2413
|
|
2330
2414
|
|
2331
2415
|
|
2416
|
+
|
2332
2417
|
|
2333
2418
|
|
2334
2419
|
|
@@ -2371,6 +2456,7 @@
|
|
2371
2456
|
|
2372
2457
|
|
2373
2458
|
|
2459
|
+
|
2374
2460
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
2375
2461
|
|
2376
2462
|
|
@@ -2384,11 +2470,13 @@
|
|
2384
2470
|
|
2385
2471
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2386
2472
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2387
|
-
|
2473
|
+
|
2474
|
+
|
2388
2475
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
2389
2476
|
|
2390
2477
|
|
2391
2478
|
|
2479
|
+
|
2392
2480
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2393
2481
|
|
2394
2482
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
@@ -2409,8 +2497,10 @@
|
|
2409
2497
|
|
2410
2498
|
|
2411
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
|
+
|
2412
2503
|
|
2413
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
2414
2504
|
|
2415
2505
|
|
2416
2506
|
|
@@ -2419,7 +2509,6 @@
|
|
2419
2509
|
|
2420
2510
|
|
2421
2511
|
|
2422
|
-
|
2423
2512
|
|
2424
2513
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
2425
2514
|
|
@@ -2443,6 +2532,8 @@
|
|
2443
2532
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
2444
2533
|
|
2445
2534
|
|
2535
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2536
|
+
|
2446
2537
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2447
2538
|
|
2448
2539
|
|
@@ -2463,6 +2554,7 @@
|
|
2463
2554
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
2464
2555
|
|
2465
2556
|
|
2557
|
+
|
2466
2558
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
2467
2559
|
|
2468
2560
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -2472,6 +2564,7 @@
|
|
2472
2564
|
|
2473
2565
|
|
2474
2566
|
|
2567
|
+
|
2475
2568
|
|
2476
2569
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2477
2570
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -2513,11 +2606,14 @@
|
|
2513
2606
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
2514
2607
|
|
2515
2608
|
|
2609
|
+
|
2516
2610
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
2517
2611
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
2518
2612
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2519
2613
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2520
2614
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2615
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2616
|
+
|
2521
2617
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
2522
2618
|
|
2523
2619
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -2581,6 +2677,10 @@
|
|
2581
2677
|
|
2582
2678
|
|
2583
2679
|
|
2680
|
+
|
2681
|
+
|
2682
|
+
<!-- $namespace = 'iso' or -->
|
2683
|
+
|
2584
2684
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2585
2685
|
|
2586
2686
|
|
@@ -2614,6 +2714,7 @@
|
|
2614
2714
|
<xsl:with-param name="table" select="$simple-table"/>
|
2615
2715
|
</xsl:call-template>
|
2616
2716
|
</xsl:variable>
|
2717
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2617
2718
|
|
2618
2719
|
<!-- <xsl:variable name="colwidths2">
|
2619
2720
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2634,9 +2735,25 @@
|
|
2634
2735
|
|
2635
2736
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2636
2737
|
|
2738
|
+
|
2637
2739
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
2638
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>
|
2639
2755
|
|
2756
|
+
|
2640
2757
|
|
2641
2758
|
|
2642
2759
|
|
@@ -2644,28 +2761,36 @@
|
|
2644
2761
|
|
2645
2762
|
|
2646
2763
|
|
2647
|
-
<
|
2648
|
-
|
2649
|
-
|
2650
|
-
|
2651
|
-
|
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>
|
2652
2769
|
|
2653
2770
|
|
2654
|
-
<xsl:if test="ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface']">
|
2655
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2656
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2657
|
-
</xsl:if>
|
2658
|
-
<xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
|
2659
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2660
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
2661
|
-
</xsl:if>
|
2662
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2663
2771
|
|
2664
2772
|
|
2773
|
+
|
2774
|
+
|
2775
|
+
|
2665
2776
|
|
2777
|
+
|
2666
2778
|
|
2779
|
+
</xsl:variable>
|
2780
|
+
|
2781
|
+
|
2782
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2667
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>
|
2668
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>
|
2669
2794
|
|
2670
2795
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2671
2796
|
<xsl:choose>
|
@@ -2689,6 +2814,33 @@
|
|
2689
2814
|
|
2690
2815
|
</fo:table>
|
2691
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
|
+
|
2692
2844
|
|
2693
2845
|
|
2694
2846
|
|
@@ -2697,8 +2849,9 @@
|
|
2697
2849
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
2698
2850
|
<xsl:if test="normalize-space() != ''">
|
2699
2851
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2700
|
-
|
2701
|
-
|
2852
|
+
|
2853
|
+
<xsl:apply-templates/>
|
2854
|
+
</fo:block>
|
2702
2855
|
</xsl:if>
|
2703
2856
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
2704
2857
|
<xsl:param name="table-row"/>
|
@@ -2752,6 +2905,13 @@
|
|
2752
2905
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
2753
2906
|
<xsl:variable name="td_text">
|
2754
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
|
+
|
2755
2915
|
</xsl:variable>
|
2756
2916
|
<xsl:variable name="words">
|
2757
2917
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -2811,13 +2971,31 @@
|
|
2811
2971
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
2812
2972
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
2813
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 -->
|
2814
2977
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
2815
2978
|
<xsl:param name="cols-count"/>
|
2816
2979
|
<!-- font-weight="bold" -->
|
2817
|
-
<fo:table-header>
|
2980
|
+
<fo:table-header>
|
2818
2981
|
|
2819
2982
|
<xsl:apply-templates/>
|
2820
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>
|
2821
2999
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
2822
3000
|
<fo:table-body>
|
2823
3001
|
<xsl:apply-templates/>
|
@@ -2825,6 +3003,13 @@
|
|
2825
3003
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
2826
3004
|
<xsl:apply-templates/>
|
2827
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">
|
2828
3013
|
<xsl:param name="cols-count"/>
|
2829
3014
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2830
3015
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -2846,11 +3031,29 @@
|
|
2846
3031
|
<!-- fn will be processed inside 'note' processing -->
|
2847
3032
|
|
2848
3033
|
|
3034
|
+
|
3035
|
+
|
3036
|
+
|
3037
|
+
|
2849
3038
|
<!-- except gb -->
|
2850
3039
|
|
2851
3040
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2852
3041
|
|
2853
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
|
+
|
2854
3057
|
<!-- horizontal row separator -->
|
2855
3058
|
|
2856
3059
|
|
@@ -2864,6 +3067,88 @@
|
|
2864
3067
|
</fo:table-footer>
|
2865
3068
|
|
2866
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>
|
2867
3152
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
2868
3153
|
|
2869
3154
|
<xsl:variable name="cols-count">
|
@@ -2881,6 +3166,8 @@
|
|
2881
3166
|
</xsl:choose>
|
2882
3167
|
</xsl:variable>
|
2883
3168
|
|
3169
|
+
|
3170
|
+
|
2884
3171
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
2885
3172
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2886
3173
|
</xsl:apply-templates>
|
@@ -2890,6 +3177,8 @@
|
|
2890
3177
|
</xsl:call-template>
|
2891
3178
|
|
2892
3179
|
<fo:table-body>
|
3180
|
+
|
3181
|
+
|
2893
3182
|
<xsl:apply-templates/>
|
2894
3183
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
2895
3184
|
|
@@ -2916,6 +3205,11 @@
|
|
2916
3205
|
</xsl:if>
|
2917
3206
|
|
2918
3207
|
|
3208
|
+
|
3209
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3210
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
3211
|
+
</xsl:if> -->
|
3212
|
+
|
2919
3213
|
<xsl:apply-templates/>
|
2920
3214
|
</fo:table-row>
|
2921
3215
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -2941,6 +3235,8 @@
|
|
2941
3235
|
|
2942
3236
|
|
2943
3237
|
|
3238
|
+
|
3239
|
+
|
2944
3240
|
<xsl:if test="@colspan">
|
2945
3241
|
<xsl:attribute name="number-columns-spanned">
|
2946
3242
|
<xsl:value-of select="@colspan"/>
|
@@ -2951,10 +3247,22 @@
|
|
2951
3247
|
<xsl:value-of select="@rowspan"/>
|
2952
3248
|
</xsl:attribute>
|
2953
3249
|
</xsl:if>
|
3250
|
+
<xsl:call-template name="display-align"/>
|
2954
3251
|
<fo:block>
|
2955
3252
|
<xsl:apply-templates/>
|
2956
3253
|
</fo:block>
|
2957
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>
|
2958
3266
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
2959
3267
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
2960
3268
|
<xsl:attribute name="text-align">
|
@@ -2968,7 +3276,8 @@
|
|
2968
3276
|
|
2969
3277
|
|
2970
3278
|
|
2971
|
-
|
3279
|
+
|
3280
|
+
|
2972
3281
|
|
2973
3282
|
|
2974
3283
|
|
@@ -2978,6 +3287,7 @@
|
|
2978
3287
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
2979
3288
|
</xsl:if>
|
2980
3289
|
|
3290
|
+
|
2981
3291
|
<xsl:if test="@colspan">
|
2982
3292
|
<xsl:attribute name="number-columns-spanned">
|
2983
3293
|
<xsl:value-of select="@colspan"/>
|
@@ -2988,8 +3298,8 @@
|
|
2988
3298
|
<xsl:value-of select="@rowspan"/>
|
2989
3299
|
</xsl:attribute>
|
2990
3300
|
</xsl:if>
|
2991
|
-
<
|
2992
|
-
|
3301
|
+
<xsl:call-template name="display-align"/>
|
3302
|
+
<fo:block>
|
2993
3303
|
<xsl:apply-templates/>
|
2994
3304
|
</fo:block>
|
2995
3305
|
</fo:table-cell>
|
@@ -3001,14 +3311,17 @@
|
|
3001
3311
|
|
3002
3312
|
|
3003
3313
|
|
3314
|
+
|
3315
|
+
|
3004
3316
|
<fo:inline padding-right="2mm">
|
3005
3317
|
|
3006
3318
|
|
3007
3319
|
|
3008
|
-
|
3320
|
+
|
3009
3321
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3010
3322
|
|
3011
3323
|
</fo:inline>
|
3324
|
+
|
3012
3325
|
<xsl:apply-templates mode="process"/>
|
3013
3326
|
</fo:block>
|
3014
3327
|
|
@@ -3032,6 +3345,7 @@
|
|
3032
3345
|
|
3033
3346
|
|
3034
3347
|
|
3348
|
+
|
3035
3349
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
3036
3350
|
|
3037
3351
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -3043,14 +3357,17 @@
|
|
3043
3357
|
|
3044
3358
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3045
3359
|
|
3360
|
+
|
3046
3361
|
<xsl:value-of select="@reference"/>
|
3047
3362
|
|
3363
|
+
|
3048
3364
|
</fo:inline>
|
3049
3365
|
<fo:inline>
|
3050
3366
|
|
3051
3367
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3052
3368
|
|
3053
|
-
<xsl:apply-templates/>
|
3369
|
+
<!-- <xsl:apply-templates /> -->
|
3370
|
+
<xsl:copy-of select="./node()"/>
|
3054
3371
|
</fo:inline>
|
3055
3372
|
</fo:block>
|
3056
3373
|
</xsl:if>
|
@@ -3087,7 +3404,20 @@
|
|
3087
3404
|
<xsl:variable name="following_dl_colwidths">
|
3088
3405
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
3089
3406
|
<xsl:variable name="html-table">
|
3090
|
-
<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(/*), '-')"/> -->
|
3091
3421
|
<xsl:element name="{$ns}:table">
|
3092
3422
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
3093
3423
|
<tbody>
|
@@ -3152,7 +3482,8 @@
|
|
3152
3482
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3153
3483
|
</xsl:if>
|
3154
3484
|
|
3155
|
-
<xsl:apply-templates/>
|
3485
|
+
<!-- <xsl:apply-templates /> -->
|
3486
|
+
<xsl:copy-of select="./node()"/>
|
3156
3487
|
</fo:block>
|
3157
3488
|
</fo:table-cell>
|
3158
3489
|
</fo:table-row>
|
@@ -3169,15 +3500,19 @@
|
|
3169
3500
|
|
3170
3501
|
|
3171
3502
|
|
3503
|
+
|
3172
3504
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
3173
3505
|
<xsl:attribute name="color">blue</xsl:attribute>
|
3174
3506
|
|
3175
3507
|
|
3176
3508
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3177
3509
|
|
3510
|
+
|
3178
3511
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
3179
3512
|
|
3513
|
+
|
3180
3514
|
<xsl:value-of select="@reference"/>
|
3515
|
+
|
3181
3516
|
</fo:basic-link>
|
3182
3517
|
</fo:inline>
|
3183
3518
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -3185,123 +3520,150 @@
|
|
3185
3520
|
<xsl:apply-templates/>
|
3186
3521
|
</fo:inline>
|
3187
3522
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
3188
|
-
<
|
3189
|
-
|
3190
|
-
|
3191
|
-
|
3192
|
-
|
3193
|
-
|
3194
|
-
|
3195
|
-
|
3196
|
-
|
3197
|
-
|
3198
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
3199
|
-
|
3200
|
-
<xsl:variable name="title-where">
|
3201
|
-
<xsl:call-template name="getTitle">
|
3202
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
3203
|
-
</xsl:call-template>
|
3204
|
-
</xsl:variable>
|
3205
|
-
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3206
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
3207
|
-
<xsl:text/>
|
3208
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
3209
|
-
</fo:block>
|
3210
|
-
|
3211
|
-
</xsl:when>
|
3212
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
3213
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
3214
|
-
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
<xsl:variable name="title-where">
|
3219
|
-
<xsl:call-template name="getTitle">
|
3220
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
3221
|
-
</xsl:call-template>
|
3222
|
-
</xsl:variable>
|
3223
|
-
<xsl:value-of select="$title-where"/>
|
3224
|
-
</fo:block>
|
3225
|
-
</xsl:when>
|
3226
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
3227
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
3228
|
-
|
3229
|
-
|
3230
|
-
|
3231
|
-
<xsl:variable name="title-key">
|
3232
|
-
<xsl:call-template name="getTitle">
|
3233
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
3234
|
-
</xsl:call-template>
|
3235
|
-
</xsl:variable>
|
3236
|
-
<xsl:value-of select="$title-key"/>
|
3237
|
-
</fo:block>
|
3238
|
-
</xsl:when>
|
3239
|
-
</xsl:choose>
|
3240
|
-
|
3241
|
-
<!-- a few components -->
|
3242
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
3243
|
-
<fo:block>
|
3244
|
-
|
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>
|
3245
3531
|
|
3532
|
+
</xsl:if>
|
3533
|
+
<fo:block-container margin-left="0mm">
|
3534
|
+
|
3535
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
3246
3536
|
|
3247
|
-
|
3248
|
-
|
3249
|
-
|
3537
|
+
<xsl:variable name="key_iso">
|
3538
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
3539
|
+
</xsl:variable>
|
3250
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>
|
3251
3587
|
|
3252
|
-
|
3253
|
-
|
3254
|
-
|
3255
|
-
<xsl:attribute name="margin-left">-2.5mm</xsl:attribute>
|
3256
|
-
</xsl:if>
|
3257
|
-
|
3258
|
-
|
3259
|
-
|
3260
|
-
|
3261
|
-
<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>
|
3262
3591
|
|
3263
|
-
|
3264
|
-
|
3265
|
-
|
3266
|
-
|
3267
|
-
|
3268
|
-
|
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">
|
3269
3609
|
|
3270
|
-
|
3271
|
-
|
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
|
-
|
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>
|
3305
3667
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
3306
3668
|
<xsl:param name="colwidths"/>
|
3307
3669
|
<xsl:param name="maxlength_dt"/>
|
@@ -3411,6 +3773,7 @@
|
|
3411
3773
|
<xsl:param name="key_iso"/>
|
3412
3774
|
|
3413
3775
|
<fo:table-row>
|
3776
|
+
|
3414
3777
|
<fo:table-cell>
|
3415
3778
|
|
3416
3779
|
<fo:block margin-top="6pt">
|
@@ -3428,6 +3791,7 @@
|
|
3428
3791
|
|
3429
3792
|
|
3430
3793
|
|
3794
|
+
|
3431
3795
|
<xsl:apply-templates/>
|
3432
3796
|
<!-- <xsl:if test="$namespace = 'gb'">
|
3433
3797
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -3439,16 +3803,18 @@
|
|
3439
3803
|
<fo:table-cell>
|
3440
3804
|
<fo:block>
|
3441
3805
|
|
3442
|
-
|
3806
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
3443
3807
|
<xsl:if test="local-name(*[1]) != 'stem'">
|
3444
3808
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
3445
3809
|
</xsl:if>
|
3810
|
+
</xsl:if> -->
|
3446
3811
|
|
3812
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
3447
3813
|
|
3448
3814
|
</fo:block>
|
3449
3815
|
</fo:table-cell>
|
3450
3816
|
</fo:table-row>
|
3451
|
-
|
3817
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
3452
3818
|
<xsl:if test="local-name(*[1]) = 'stem'">
|
3453
3819
|
<fo:table-row>
|
3454
3820
|
<fo:table-cell>
|
@@ -3456,7 +3822,7 @@
|
|
3456
3822
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
3457
3823
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
3458
3824
|
</xsl:if>
|
3459
|
-
<xsl:text
|
3825
|
+
<xsl:text> </xsl:text>
|
3460
3826
|
</fo:block>
|
3461
3827
|
</fo:table-cell>
|
3462
3828
|
<fo:table-cell>
|
@@ -3466,7 +3832,7 @@
|
|
3466
3832
|
</fo:table-cell>
|
3467
3833
|
</fo:table-row>
|
3468
3834
|
</xsl:if>
|
3469
|
-
|
3835
|
+
</xsl:if> -->
|
3470
3836
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
3471
3837
|
<xsl:apply-templates/>
|
3472
3838
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -3491,6 +3857,31 @@
|
|
3491
3857
|
</fo:inline>
|
3492
3858
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
3493
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>
|
3494
3885
|
<xsl:apply-templates/>
|
3495
3886
|
</fo:inline>
|
3496
3887
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -3816,11 +4207,24 @@
|
|
3816
4207
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3817
4208
|
<xsl:value-of select="substring($str, 2)"/>
|
3818
4209
|
</xsl:template><xsl:template match="mathml:math">
|
3819
|
-
<fo:inline font-family="
|
3820
|
-
<
|
3821
|
-
<xsl:
|
3822
|
-
</
|
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>
|
3823
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>
|
3824
4228
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3825
4229
|
<xsl:variable name="target">
|
3826
4230
|
<xsl:choose>
|
@@ -3897,13 +4301,26 @@
|
|
3897
4301
|
<xsl:apply-templates/>
|
3898
4302
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3899
4303
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3900
|
-
|
4304
|
+
|
3901
4305
|
<xsl:apply-templates/>
|
3902
4306
|
</fo:basic-link>
|
3903
4307
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
3904
|
-
<fo:block
|
3905
|
-
<xsl:
|
3906
|
-
|
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>
|
3907
4324
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
3908
4325
|
<fo:inline>
|
3909
4326
|
<xsl:apply-templates/>
|
@@ -3937,6 +4354,8 @@
|
|
3937
4354
|
|
3938
4355
|
|
3939
4356
|
|
4357
|
+
|
4358
|
+
|
3940
4359
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3941
4360
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3942
4361
|
</fo:inline>
|
@@ -3963,7 +4382,9 @@
|
|
3963
4382
|
</xsl:choose>
|
3964
4383
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3965
4384
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3966
|
-
<xsl:
|
4385
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
4386
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4387
|
+
</fo:inline>
|
3967
4388
|
<xsl:apply-templates/>
|
3968
4389
|
</fo:block>
|
3969
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">
|
@@ -4062,19 +4483,140 @@
|
|
4062
4483
|
|
4063
4484
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
4064
4485
|
</fo:block>
|
4065
|
-
</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">
|
4066
4487
|
<xsl:apply-templates mode="contents"/>
|
4067
4488
|
<xsl:text> </xsl:text>
|
4068
|
-
</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">
|
4493
|
+
<xsl:value-of select="."/>
|
4494
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
4069
4495
|
<xsl:value-of select="."/>
|
4070
|
-
</xsl:template><xsl:template match="
|
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">
|
4071
4613
|
<xsl:if test="normalize-space() != ''">
|
4072
4614
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
4073
4615
|
|
4074
4616
|
<xsl:if test="nist:dl">
|
4075
4617
|
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
4076
4618
|
</xsl:if>
|
4077
|
-
|
4619
|
+
|
4078
4620
|
<xsl:apply-templates/>
|
4079
4621
|
</fo:block>
|
4080
4622
|
</xsl:if>
|
@@ -4129,7 +4671,7 @@
|
|
4129
4671
|
<xsl:apply-templates/>
|
4130
4672
|
</xsl:otherwise>
|
4131
4673
|
</xsl:choose>
|
4132
|
-
</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">
|
4133
4675
|
<xsl:text> </xsl:text>
|
4134
4676
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
4135
4677
|
<xsl:copy>
|
@@ -4138,21 +4680,61 @@
|
|
4138
4680
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4139
4681
|
<xsl:text> </xsl:text>
|
4140
4682
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4141
|
-
|
4142
|
-
|
4143
|
-
|
4144
|
-
|
4145
|
-
|
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">
|
4146
4729
|
<xsl:variable name="text">
|
4147
4730
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
4148
4731
|
</xsl:variable>
|
4149
|
-
<xsl:call-template name="add-zero-spaces">
|
4732
|
+
<xsl:call-template name="add-zero-spaces-java">
|
4150
4733
|
<xsl:with-param name="text" select="$text"/>
|
4151
4734
|
</xsl:call-template>
|
4152
4735
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
4153
4736
|
<xsl:if test="normalize-space() != ''">
|
4154
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4155
|
-
|
4737
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4156
4738
|
<xsl:apply-templates/>
|
4157
4739
|
</fo:block>
|
4158
4740
|
</xsl:if>
|
@@ -4224,22 +4806,30 @@
|
|
4224
4806
|
</fo:block>
|
4225
4807
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4226
4808
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
4809
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4810
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
4811
|
+
</xsl:if>
|
4227
4812
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
4228
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="
|
4813
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
4814
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4815
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
4816
|
+
</xsl:if>
|
4229
4817
|
<xsl:variable name="simple-table">
|
4230
4818
|
<xsl:call-template name="getSimpleTable"/>
|
4231
4819
|
</xsl:variable>
|
4232
4820
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
4233
4821
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
4234
|
-
<fo:table-column column-width="35mm"/>
|
4235
|
-
<fo:table-column column-width="115mm"/>
|
4822
|
+
<!-- <fo:table-column column-width="35mm"/>
|
4823
|
+
<fo:table-column column-width="115mm"/> -->
|
4824
|
+
<fo:table-column column-width="30%"/>
|
4825
|
+
<fo:table-column column-width="70%"/>
|
4236
4826
|
</xsl:if>
|
4237
4827
|
<xsl:apply-templates mode="requirement"/>
|
4238
4828
|
</fo:table>
|
4239
4829
|
<!-- fn processing -->
|
4240
4830
|
<xsl:if test=".//*[local-name() = 'fn']">
|
4241
4831
|
<xsl:for-each select="*[local-name() = 'tbody']">
|
4242
|
-
<fo:block font-size="90%" border-bottom="
|
4832
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
4243
4833
|
<xsl:call-template name="fn_display"/>
|
4244
4834
|
</fo:block>
|
4245
4835
|
</xsl:for-each>
|
@@ -4255,17 +4845,27 @@
|
|
4255
4845
|
<xsl:apply-templates mode="requirement"/>
|
4256
4846
|
</fo:table-body>
|
4257
4847
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
4258
|
-
<fo:table-row>
|
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>
|
4858
|
+
</xsl:if>
|
4259
4859
|
<xsl:apply-templates mode="requirement"/>
|
4260
4860
|
</fo:table-row>
|
4261
4861
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
4262
|
-
<fo:table-cell text-align="{@align}">
|
4862
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
4263
4863
|
<xsl:attribute name="text-align">
|
4264
4864
|
<xsl:choose>
|
4265
4865
|
<xsl:when test="@align">
|
4266
4866
|
<xsl:value-of select="@align"/>
|
4267
4867
|
</xsl:when>
|
4268
|
-
<xsl:otherwise>
|
4868
|
+
<xsl:otherwise>left</xsl:otherwise>
|
4269
4869
|
</xsl:choose>
|
4270
4870
|
</xsl:attribute>
|
4271
4871
|
<xsl:if test="@colspan">
|
@@ -4278,22 +4878,27 @@
|
|
4278
4878
|
<xsl:value-of select="@rowspan"/>
|
4279
4879
|
</xsl:attribute>
|
4280
4880
|
</xsl:if>
|
4881
|
+
<xsl:call-template name="display-align"/>
|
4281
4882
|
|
4282
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4883
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4283
4884
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4284
4885
|
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
4285
4886
|
</xsl:if>
|
4286
4887
|
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
4287
4888
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4288
4889
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
4289
|
-
</xsl:if>
|
4890
|
+
</xsl:if> -->
|
4290
4891
|
|
4291
4892
|
<fo:block>
|
4292
4893
|
<xsl:apply-templates/>
|
4293
4894
|
</fo:block>
|
4294
4895
|
</fo:table-cell>
|
4295
4896
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
4296
|
-
<fo:table-cell text-align="{@align}">
|
4897
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
4898
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4899
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
4900
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
4901
|
+
</xsl:if>
|
4297
4902
|
<xsl:attribute name="text-align">
|
4298
4903
|
<xsl:choose>
|
4299
4904
|
<xsl:when test="@align">
|
@@ -4302,6 +4907,9 @@
|
|
4302
4907
|
<xsl:otherwise>left</xsl:otherwise>
|
4303
4908
|
</xsl:choose>
|
4304
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>
|
4305
4913
|
<xsl:if test="@colspan">
|
4306
4914
|
<xsl:attribute name="number-columns-spanned">
|
4307
4915
|
<xsl:value-of select="@colspan"/>
|
@@ -4312,25 +4920,27 @@
|
|
4312
4920
|
<xsl:value-of select="@rowspan"/>
|
4313
4921
|
</xsl:attribute>
|
4314
4922
|
</xsl:if>
|
4923
|
+
<xsl:call-template name="display-align"/>
|
4315
4924
|
|
4316
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4925
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4317
4926
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
4318
|
-
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4319
|
-
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
4927
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4928
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
4320
4929
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
4321
4930
|
</xsl:if>
|
4322
|
-
</xsl:if>
|
4931
|
+
</xsl:if> -->
|
4932
|
+
<!-- 2nd line and below -->
|
4323
4933
|
|
4324
4934
|
<fo:block>
|
4325
4935
|
<xsl:apply-templates/>
|
4326
4936
|
</fo:block>
|
4327
4937
|
</fo:table-cell>
|
4328
4938
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
4329
|
-
<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" -->
|
4330
4940
|
<xsl:apply-templates/>
|
4331
4941
|
</fo:block>
|
4332
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
4333
|
-
<fo:block margin-bottom="10pt"
|
4942
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
4943
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
4334
4944
|
<xsl:apply-templates/>
|
4335
4945
|
</fo:block>
|
4336
4946
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
@@ -4352,12 +4962,13 @@
|
|
4352
4962
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4353
4963
|
|
4354
4964
|
<xsl:variable name="element">
|
4355
|
-
block
|
4965
|
+
block
|
4356
4966
|
|
4967
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
4357
4968
|
</xsl:variable>
|
4358
4969
|
|
4359
4970
|
<xsl:choose>
|
4360
|
-
<xsl:when test="normalize-space($element)
|
4971
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
4361
4972
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
4362
4973
|
<xsl:apply-templates/>
|
4363
4974
|
</fo:block>
|
@@ -4394,25 +5005,44 @@
|
|
4394
5005
|
</xsl:otherwise>
|
4395
5006
|
</xsl:choose>
|
4396
5007
|
|
4397
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
4398
|
-
|
5008
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
5009
|
+
|
5010
|
+
<xsl:variable name="element">
|
5011
|
+
block
|
4399
5012
|
|
4400
|
-
|
4401
|
-
|
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>
|
4402
5027
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4403
5028
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4404
5029
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4405
5030
|
<xsl:variable name="termsource_text">
|
4406
5031
|
<xsl:apply-templates/>
|
4407
5032
|
</xsl:variable>
|
5033
|
+
|
4408
5034
|
<xsl:choose>
|
4409
5035
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4410
5036
|
<xsl:apply-templates/>
|
4411
5037
|
</xsl:when>
|
4412
|
-
<xsl:otherwise>
|
4413
|
-
|
4414
|
-
|
4415
|
-
|
5038
|
+
<xsl:otherwise>
|
5039
|
+
|
5040
|
+
<xsl:text>[</xsl:text>
|
5041
|
+
|
5042
|
+
<xsl:apply-templates/>
|
5043
|
+
|
5044
|
+
<xsl:text>]</xsl:text>
|
5045
|
+
|
4416
5046
|
</xsl:otherwise>
|
4417
5047
|
</xsl:choose>
|
4418
5048
|
</fo:block>
|
@@ -4433,18 +5063,29 @@
|
|
4433
5063
|
<xsl:if test="normalize-space() != ''">
|
4434
5064
|
<xsl:value-of select="."/>
|
4435
5065
|
</xsl:if>
|
4436
|
-
</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">
|
4437
5075
|
|
4438
|
-
|
4439
|
-
|
4440
|
-
|
4441
|
-
|
4442
|
-
|
4443
|
-
|
4444
|
-
|
4445
|
-
|
4446
|
-
|
4447
|
-
|
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>
|
4448
5089
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
4449
5090
|
<xsl:if test="../*[local-name() = 'author']">
|
4450
5091
|
<xsl:text>, </xsl:text>
|
@@ -4472,6 +5113,7 @@
|
|
4472
5113
|
<xsl:if test="@type = 'inline'">
|
4473
5114
|
|
4474
5115
|
|
5116
|
+
|
4475
5117
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
4476
5118
|
|
4477
5119
|
</xsl:if>
|
@@ -4512,6 +5154,7 @@
|
|
4512
5154
|
|
4513
5155
|
|
4514
5156
|
|
5157
|
+
|
4515
5158
|
</xsl:variable>
|
4516
5159
|
|
4517
5160
|
<xsl:variable name="padding-right">
|
@@ -4606,6 +5249,7 @@
|
|
4606
5249
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
4607
5250
|
<fo:block>
|
4608
5251
|
<xsl:call-template name="setId"/>
|
5252
|
+
|
4609
5253
|
<xsl:apply-templates/>
|
4610
5254
|
</fo:block>
|
4611
5255
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -4614,6 +5258,8 @@
|
|
4614
5258
|
</fo:block>
|
4615
5259
|
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
4616
5260
|
|
5261
|
+
<fo:block break-after="page"/>
|
5262
|
+
|
4617
5263
|
<fo:block id="{@id}">
|
4618
5264
|
<xsl:apply-templates/>
|
4619
5265
|
</fo:block>
|
@@ -4630,6 +5276,31 @@
|
|
4630
5276
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
4631
5277
|
<!-- 0xA0 to space replacement -->
|
4632
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>
|
4633
5304
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4634
5305
|
<!-- <row>
|
4635
5306
|
<date>05-07-2013</date>
|
@@ -4661,6 +5332,65 @@
|
|
4661
5332
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
4662
5333
|
<fo:block><xsl:apply-templates/></fo:block>
|
4663
5334
|
</fo:table-cell>
|
5335
|
+
</xsl:template><xsl:template name="processBibitem">
|
5336
|
+
|
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>
|
5358
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
5359
|
+
<xsl:choose>
|
5360
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
5361
|
+
<author>
|
5362
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
5363
|
+
</author>
|
5364
|
+
</xsl:when>
|
5365
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
5366
|
+
<author>
|
5367
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
5368
|
+
<xsl:text> </xsl:text>
|
5369
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
5370
|
+
</author>
|
5371
|
+
</xsl:when>
|
5372
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
5373
|
+
<author>
|
5374
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
5375
|
+
<xsl:text> </xsl:text>
|
5376
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
5377
|
+
</author>
|
5378
|
+
</xsl:when>
|
5379
|
+
<xsl:otherwise>
|
5380
|
+
<xsl:apply-templates/>
|
5381
|
+
</xsl:otherwise>
|
5382
|
+
</xsl:choose>
|
5383
|
+
</xsl:template><xsl:template name="renderDate">
|
5384
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
5385
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
5386
|
+
</xsl:if>
|
5387
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
5388
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
5389
|
+
</xsl:if>
|
5390
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
5391
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
5392
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
5393
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
4664
5394
|
</xsl:template><xsl:template name="convertDate">
|
4665
5395
|
<xsl:param name="date"/>
|
4666
5396
|
<xsl:param name="format" select="'short'"/>
|
@@ -4743,6 +5473,7 @@
|
|
4743
5473
|
|
4744
5474
|
|
4745
5475
|
|
5476
|
+
|
4746
5477
|
|
4747
5478
|
</xsl:variable>
|
4748
5479
|
<xsl:choose>
|
@@ -4757,6 +5488,7 @@
|
|
4757
5488
|
<dc:creator>
|
4758
5489
|
|
4759
5490
|
|
5491
|
+
|
4760
5492
|
<xsl:for-each select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
4761
5493
|
<xsl:value-of select="*[local-name() = 'person']/*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
4762
5494
|
<xsl:if test="position() != last()">; </xsl:if>
|
@@ -4771,6 +5503,7 @@
|
|
4771
5503
|
<xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
4772
5504
|
|
4773
5505
|
|
5506
|
+
|
4774
5507
|
</xsl:variable>
|
4775
5508
|
<xsl:value-of select="normalize-space($abstract)"/>
|
4776
5509
|
</dc:description>
|
@@ -4871,6 +5604,7 @@
|
|
4871
5604
|
|
4872
5605
|
|
4873
5606
|
|
5607
|
+
|
4874
5608
|
</xsl:variable>
|
4875
5609
|
<xsl:if test="$documentNS != $XSLNS">
|
4876
5610
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -4896,4 +5630,21 @@
|
|
4896
5630
|
</xsl:otherwise>
|
4897
5631
|
</xsl:choose>
|
4898
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>
|
4899
5650
|
</xsl:template></xsl:stylesheet>
|