metanorma-nist 1.2.0 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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 +15 -28
- data/lib/asciidoctor/nist/isodoc.rng +124 -15
- data/lib/asciidoctor/nist/nist.rng +26 -1
- data/lib/isodoc/nist/base_convert.rb +26 -15
- data/lib/isodoc/nist/html/htmlstyle.css +1 -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 +1087 -218
- data/lib/isodoc/nist/nist.sp.xsl +1127 -227
- 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 +4 -4
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>
|
@@ -2308,6 +2392,7 @@
|
|
2308
2392
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
2309
2393
|
|
2310
2394
|
|
2395
|
+
|
2311
2396
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
2312
2397
|
|
2313
2398
|
|
@@ -2329,6 +2414,9 @@
|
|
2329
2414
|
|
2330
2415
|
|
2331
2416
|
|
2417
|
+
|
2418
|
+
|
2419
|
+
|
2332
2420
|
|
2333
2421
|
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
2334
2422
|
|
@@ -2342,6 +2430,8 @@
|
|
2342
2430
|
|
2343
2431
|
|
2344
2432
|
|
2433
|
+
|
2434
|
+
|
2345
2435
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
2346
2436
|
|
2347
2437
|
|
@@ -2365,6 +2455,8 @@
|
|
2365
2455
|
|
2366
2456
|
|
2367
2457
|
|
2458
|
+
|
2459
|
+
|
2368
2460
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
2369
2461
|
|
2370
2462
|
|
@@ -2378,11 +2470,13 @@
|
|
2378
2470
|
|
2379
2471
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2380
2472
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2381
|
-
|
2473
|
+
|
2474
|
+
|
2382
2475
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
2383
2476
|
|
2384
2477
|
|
2385
2478
|
|
2479
|
+
|
2386
2480
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2387
2481
|
|
2388
2482
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
@@ -2402,9 +2496,10 @@
|
|
2402
2496
|
|
2403
2497
|
|
2404
2498
|
|
2499
|
+
</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">
|
2500
|
+
|
2405
2501
|
|
2406
2502
|
|
2407
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
2408
2503
|
|
2409
2504
|
|
2410
2505
|
|
@@ -2413,7 +2508,6 @@
|
|
2413
2508
|
|
2414
2509
|
|
2415
2510
|
|
2416
|
-
|
2417
2511
|
|
2418
2512
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
2419
2513
|
|
@@ -2437,6 +2531,8 @@
|
|
2437
2531
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
2438
2532
|
|
2439
2533
|
|
2534
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2535
|
+
|
2440
2536
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2441
2537
|
|
2442
2538
|
|
@@ -2457,6 +2553,7 @@
|
|
2457
2553
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
2458
2554
|
|
2459
2555
|
|
2556
|
+
|
2460
2557
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
2461
2558
|
|
2462
2559
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -2466,6 +2563,7 @@
|
|
2466
2563
|
|
2467
2564
|
|
2468
2565
|
|
2566
|
+
|
2469
2567
|
|
2470
2568
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2471
2569
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -2481,7 +2579,7 @@
|
|
2481
2579
|
|
2482
2580
|
|
2483
2581
|
|
2484
|
-
|
2582
|
+
|
2485
2583
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
2486
2584
|
|
2487
2585
|
</xsl:attribute-set><xsl:attribute-set name="image-style">
|
@@ -2507,11 +2605,14 @@
|
|
2507
2605
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
2508
2606
|
|
2509
2607
|
|
2608
|
+
|
2510
2609
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
2511
2610
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
2512
2611
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2513
2612
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2514
2613
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2614
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2615
|
+
|
2515
2616
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
2516
2617
|
|
2517
2618
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -2522,7 +2623,43 @@
|
|
2522
2623
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
2523
2624
|
|
2524
2625
|
|
2525
|
-
</xsl:attribute-set><xsl:template
|
2626
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
2627
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2628
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
2629
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
2630
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
2631
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
2632
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
2633
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
2634
|
+
|
2635
|
+
<!-- Normative references -->
|
2636
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
2637
|
+
<!-- Terms and definitions -->
|
2638
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
|
2639
|
+
<!-- Another main sections -->
|
2640
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
|
2641
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
2642
|
+
<!-- Bibliography -->
|
2643
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
2644
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
2645
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
2646
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
2647
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
2648
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
2649
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
2650
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
2651
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
2652
|
+
|
2653
|
+
<!-- Normative references -->
|
2654
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
2655
|
+
<!-- Terms and definitions -->
|
2656
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
|
2657
|
+
<!-- Another main sections -->
|
2658
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
|
2659
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
2660
|
+
<!-- Bibliography -->
|
2661
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
2662
|
+
</xsl:template><xsl:template match="text()">
|
2526
2663
|
<xsl:value-of select="."/>
|
2527
2664
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
2528
2665
|
<xsl:value-of select="$linebreak"/>
|
@@ -2539,6 +2676,10 @@
|
|
2539
2676
|
|
2540
2677
|
|
2541
2678
|
|
2679
|
+
|
2680
|
+
|
2681
|
+
<!-- $namespace = 'iso' or -->
|
2682
|
+
|
2542
2683
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2543
2684
|
|
2544
2685
|
|
@@ -2572,6 +2713,7 @@
|
|
2572
2713
|
<xsl:with-param name="table" select="$simple-table"/>
|
2573
2714
|
</xsl:call-template>
|
2574
2715
|
</xsl:variable>
|
2716
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2575
2717
|
|
2576
2718
|
<!-- <xsl:variable name="colwidths2">
|
2577
2719
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2592,8 +2734,25 @@
|
|
2592
2734
|
|
2593
2735
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2594
2736
|
|
2737
|
+
|
2595
2738
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
2596
2739
|
|
2740
|
+
|
2741
|
+
|
2742
|
+
|
2743
|
+
|
2744
|
+
|
2745
|
+
<xsl:if test="ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface']">
|
2746
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2747
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2748
|
+
</xsl:if>
|
2749
|
+
<xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
|
2750
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2751
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
2752
|
+
</xsl:if>
|
2753
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2754
|
+
|
2755
|
+
|
2597
2756
|
|
2598
2757
|
|
2599
2758
|
|
@@ -2601,27 +2760,36 @@
|
|
2601
2760
|
|
2602
2761
|
|
2603
2762
|
|
2604
|
-
<
|
2763
|
+
<xsl:variable name="table_attributes">
|
2764
|
+
<attribute name="table-layout">fixed</attribute>
|
2765
|
+
<attribute name="width">100%</attribute>
|
2766
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2767
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2605
2768
|
|
2606
2769
|
|
2607
2770
|
|
2608
2771
|
|
2772
|
+
|
2773
|
+
|
2774
|
+
|
2609
2775
|
|
2776
|
+
|
2610
2777
|
|
2611
|
-
|
2612
|
-
|
2613
|
-
|
2614
|
-
|
2615
|
-
<xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
|
2616
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2617
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
2618
|
-
</xsl:if>
|
2619
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2620
|
-
|
2621
|
-
|
2622
|
-
|
2778
|
+
</xsl:variable>
|
2779
|
+
|
2780
|
+
|
2781
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2623
2782
|
|
2783
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2784
|
+
<xsl:attribute name="{@name}">
|
2785
|
+
<xsl:value-of select="."/>
|
2786
|
+
</xsl:attribute>
|
2787
|
+
</xsl:for-each>
|
2624
2788
|
|
2789
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2790
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2791
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2792
|
+
</xsl:if>
|
2625
2793
|
|
2626
2794
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2627
2795
|
<xsl:choose>
|
@@ -2645,6 +2813,33 @@
|
|
2645
2813
|
|
2646
2814
|
</fo:table>
|
2647
2815
|
|
2816
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2817
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2818
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2819
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2820
|
+
</xsl:call-template>
|
2821
|
+
</xsl:for-each>
|
2822
|
+
|
2823
|
+
<!-- insert footer as table -->
|
2824
|
+
<!-- <fo:table>
|
2825
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
2826
|
+
<xsl:attribute name="{@name}">
|
2827
|
+
<xsl:value-of select="."/>
|
2828
|
+
</xsl:attribute>
|
2829
|
+
</xsl:for-each>
|
2830
|
+
|
2831
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2832
|
+
<xsl:choose>
|
2833
|
+
<xsl:when test=". = 1 or . = 0">
|
2834
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2835
|
+
</xsl:when>
|
2836
|
+
<xsl:otherwise>
|
2837
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2838
|
+
</xsl:otherwise>
|
2839
|
+
</xsl:choose>
|
2840
|
+
</xsl:for-each>
|
2841
|
+
</fo:table>-->
|
2842
|
+
|
2648
2843
|
|
2649
2844
|
|
2650
2845
|
|
@@ -2653,8 +2848,9 @@
|
|
2653
2848
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
2654
2849
|
<xsl:if test="normalize-space() != ''">
|
2655
2850
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2656
|
-
|
2657
|
-
|
2851
|
+
|
2852
|
+
<xsl:apply-templates/>
|
2853
|
+
</fo:block>
|
2658
2854
|
</xsl:if>
|
2659
2855
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
2660
2856
|
<xsl:param name="table-row"/>
|
@@ -2708,6 +2904,13 @@
|
|
2708
2904
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
2709
2905
|
<xsl:variable name="td_text">
|
2710
2906
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2907
|
+
|
2908
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2909
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
2910
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
2911
|
+
</xsl:for-each>
|
2912
|
+
</xsl:if> -->
|
2913
|
+
|
2711
2914
|
</xsl:variable>
|
2712
2915
|
<xsl:variable name="words">
|
2713
2916
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -2767,13 +2970,31 @@
|
|
2767
2970
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
2768
2971
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
2769
2972
|
<xsl:value-of select="@target"/>
|
2973
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
2974
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
2975
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
2770
2976
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
2771
2977
|
<xsl:param name="cols-count"/>
|
2772
2978
|
<!-- font-weight="bold" -->
|
2773
|
-
<fo:table-header>
|
2979
|
+
<fo:table-header>
|
2774
2980
|
|
2775
2981
|
<xsl:apply-templates/>
|
2776
2982
|
</fo:table-header>
|
2983
|
+
</xsl:template><xsl:template name="table-header-title">
|
2984
|
+
<xsl:param name="cols-count"/>
|
2985
|
+
<!-- row for title -->
|
2986
|
+
<fo:table-row>
|
2987
|
+
<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">
|
2988
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
2989
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
2990
|
+
<xsl:call-template name="fn_name_display"/>
|
2991
|
+
</xsl:for-each>
|
2992
|
+
<fo:block text-align="right" font-style="italic">
|
2993
|
+
<xsl:text> </xsl:text>
|
2994
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
2995
|
+
</fo:block>
|
2996
|
+
</fo:table-cell>
|
2997
|
+
</fo:table-row>
|
2777
2998
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
2778
2999
|
<fo:table-body>
|
2779
3000
|
<xsl:apply-templates/>
|
@@ -2781,6 +3002,13 @@
|
|
2781
3002
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
2782
3003
|
<xsl:apply-templates/>
|
2783
3004
|
</xsl:template><xsl:template name="insertTableFooter">
|
3005
|
+
<xsl:param name="cols-count"/>
|
3006
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
3007
|
+
<fo:table-footer>
|
3008
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
3009
|
+
</fo:table-footer>
|
3010
|
+
</xsl:if>
|
3011
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
2784
3012
|
<xsl:param name="cols-count"/>
|
2785
3013
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2786
3014
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -2802,11 +3030,15 @@
|
|
2802
3030
|
<!-- fn will be processed inside 'note' processing -->
|
2803
3031
|
|
2804
3032
|
|
2805
|
-
|
3033
|
+
|
3034
|
+
<!-- except gb and bipm -->
|
2806
3035
|
|
2807
3036
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2808
3037
|
|
2809
3038
|
|
3039
|
+
|
3040
|
+
|
3041
|
+
|
2810
3042
|
<!-- horizontal row separator -->
|
2811
3043
|
|
2812
3044
|
|
@@ -2820,6 +3052,84 @@
|
|
2820
3052
|
</fo:table-footer>
|
2821
3053
|
|
2822
3054
|
</xsl:if>
|
3055
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
3056
|
+
<xsl:param name="table_attributes"/>
|
3057
|
+
<xsl:param name="colwidths"/>
|
3058
|
+
|
3059
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3060
|
+
|
3061
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3062
|
+
|
3063
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
3064
|
+
|
3065
|
+
<fo:table keep-with-previous="always">
|
3066
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
3067
|
+
<xsl:choose>
|
3068
|
+
<xsl:when test="@name = 'border-top'">
|
3069
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
3070
|
+
</xsl:when>
|
3071
|
+
<xsl:when test="@name = 'border'">
|
3072
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
3073
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
3074
|
+
</xsl:when>
|
3075
|
+
<xsl:otherwise>
|
3076
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
3077
|
+
</xsl:otherwise>
|
3078
|
+
</xsl:choose>
|
3079
|
+
</xsl:for-each>
|
3080
|
+
|
3081
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
3082
|
+
<xsl:choose>
|
3083
|
+
<xsl:when test=". = 1 or . = 0">
|
3084
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
3085
|
+
</xsl:when>
|
3086
|
+
<xsl:otherwise>
|
3087
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
3088
|
+
</xsl:otherwise>
|
3089
|
+
</xsl:choose>
|
3090
|
+
</xsl:for-each>
|
3091
|
+
|
3092
|
+
<fo:table-body>
|
3093
|
+
<fo:table-row>
|
3094
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
3095
|
+
|
3096
|
+
|
3097
|
+
|
3098
|
+
<!-- fn will be processed inside 'note' processing -->
|
3099
|
+
|
3100
|
+
|
3101
|
+
|
3102
|
+
<!-- except gb and bipm -->
|
3103
|
+
|
3104
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3105
|
+
|
3106
|
+
|
3107
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3108
|
+
<xsl:choose>
|
3109
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
3110
|
+
show Note under table in preface (ex. abstract) sections
|
3111
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3112
|
+
</xsl:when>
|
3113
|
+
<xsl:otherwise>
|
3114
|
+
empty, because notes show at page side in main sections
|
3115
|
+
<fo:block/>
|
3116
|
+
</xsl:otherwise>
|
3117
|
+
</xsl:choose>
|
3118
|
+
</xsl:if> -->
|
3119
|
+
|
3120
|
+
|
3121
|
+
<!-- horizontal row separator -->
|
3122
|
+
|
3123
|
+
|
3124
|
+
<!-- fn processing -->
|
3125
|
+
<xsl:call-template name="fn_display"/>
|
3126
|
+
|
3127
|
+
</fo:table-cell>
|
3128
|
+
</fo:table-row>
|
3129
|
+
</fo:table-body>
|
3130
|
+
|
3131
|
+
</fo:table>
|
3132
|
+
</xsl:if>
|
2823
3133
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
2824
3134
|
|
2825
3135
|
<xsl:variable name="cols-count">
|
@@ -2837,6 +3147,8 @@
|
|
2837
3147
|
</xsl:choose>
|
2838
3148
|
</xsl:variable>
|
2839
3149
|
|
3150
|
+
|
3151
|
+
|
2840
3152
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
2841
3153
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2842
3154
|
</xsl:apply-templates>
|
@@ -2846,6 +3158,8 @@
|
|
2846
3158
|
</xsl:call-template>
|
2847
3159
|
|
2848
3160
|
<fo:table-body>
|
3161
|
+
|
3162
|
+
|
2849
3163
|
<xsl:apply-templates/>
|
2850
3164
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
2851
3165
|
|
@@ -2872,10 +3186,20 @@
|
|
2872
3186
|
</xsl:if>
|
2873
3187
|
|
2874
3188
|
|
3189
|
+
|
3190
|
+
|
2875
3191
|
<xsl:apply-templates/>
|
2876
3192
|
</fo:table-row>
|
2877
3193
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
2878
3194
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
3195
|
+
<xsl:attribute name="text-align">
|
3196
|
+
<xsl:choose>
|
3197
|
+
<xsl:when test="@align">
|
3198
|
+
<xsl:value-of select="@align"/>
|
3199
|
+
</xsl:when>
|
3200
|
+
<xsl:otherwise>center</xsl:otherwise>
|
3201
|
+
</xsl:choose>
|
3202
|
+
</xsl:attribute>
|
2879
3203
|
|
2880
3204
|
|
2881
3205
|
|
@@ -2888,6 +3212,9 @@
|
|
2888
3212
|
|
2889
3213
|
|
2890
3214
|
|
3215
|
+
|
3216
|
+
|
3217
|
+
|
2891
3218
|
<xsl:if test="@colspan">
|
2892
3219
|
<xsl:attribute name="number-columns-spanned">
|
2893
3220
|
<xsl:value-of select="@colspan"/>
|
@@ -2898,16 +3225,37 @@
|
|
2898
3225
|
<xsl:value-of select="@rowspan"/>
|
2899
3226
|
</xsl:attribute>
|
2900
3227
|
</xsl:if>
|
3228
|
+
<xsl:call-template name="display-align"/>
|
2901
3229
|
<fo:block>
|
2902
3230
|
<xsl:apply-templates/>
|
2903
3231
|
</fo:block>
|
2904
3232
|
</fo:table-cell>
|
3233
|
+
</xsl:template><xsl:template name="display-align">
|
3234
|
+
<xsl:if test="@valign">
|
3235
|
+
<xsl:attribute name="display-align">
|
3236
|
+
<xsl:choose>
|
3237
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
3238
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
3239
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
3240
|
+
<xsl:otherwise>before</xsl:otherwise>
|
3241
|
+
</xsl:choose>
|
3242
|
+
</xsl:attribute>
|
3243
|
+
</xsl:if>
|
2905
3244
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
2906
3245
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
3246
|
+
<xsl:attribute name="text-align">
|
3247
|
+
<xsl:choose>
|
3248
|
+
<xsl:when test="@align">
|
3249
|
+
<xsl:value-of select="@align"/>
|
3250
|
+
</xsl:when>
|
3251
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3252
|
+
</xsl:choose>
|
3253
|
+
</xsl:attribute>
|
3254
|
+
|
3255
|
+
|
2907
3256
|
|
2908
3257
|
|
2909
3258
|
|
2910
|
-
|
2911
3259
|
|
2912
3260
|
|
2913
3261
|
|
@@ -2917,6 +3265,7 @@
|
|
2917
3265
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
2918
3266
|
</xsl:if>
|
2919
3267
|
|
3268
|
+
|
2920
3269
|
<xsl:if test="@colspan">
|
2921
3270
|
<xsl:attribute name="number-columns-spanned">
|
2922
3271
|
<xsl:value-of select="@colspan"/>
|
@@ -2927,8 +3276,8 @@
|
|
2927
3276
|
<xsl:value-of select="@rowspan"/>
|
2928
3277
|
</xsl:attribute>
|
2929
3278
|
</xsl:if>
|
2930
|
-
<
|
2931
|
-
|
3279
|
+
<xsl:call-template name="display-align"/>
|
3280
|
+
<fo:block>
|
2932
3281
|
<xsl:apply-templates/>
|
2933
3282
|
</fo:block>
|
2934
3283
|
</fo:table-cell>
|
@@ -2940,14 +3289,17 @@
|
|
2940
3289
|
|
2941
3290
|
|
2942
3291
|
|
3292
|
+
|
3293
|
+
|
2943
3294
|
<fo:inline padding-right="2mm">
|
2944
3295
|
|
2945
3296
|
|
2946
3297
|
|
2947
|
-
|
3298
|
+
|
2948
3299
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2949
3300
|
|
2950
3301
|
</fo:inline>
|
3302
|
+
|
2951
3303
|
<xsl:apply-templates mode="process"/>
|
2952
3304
|
</fo:block>
|
2953
3305
|
|
@@ -2971,6 +3323,7 @@
|
|
2971
3323
|
|
2972
3324
|
|
2973
3325
|
|
3326
|
+
|
2974
3327
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
2975
3328
|
|
2976
3329
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -2982,14 +3335,17 @@
|
|
2982
3335
|
|
2983
3336
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2984
3337
|
|
3338
|
+
|
2985
3339
|
<xsl:value-of select="@reference"/>
|
2986
3340
|
|
3341
|
+
|
2987
3342
|
</fo:inline>
|
2988
3343
|
<fo:inline>
|
2989
3344
|
|
2990
3345
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2991
3346
|
|
2992
|
-
<xsl:apply-templates/>
|
3347
|
+
<!-- <xsl:apply-templates /> -->
|
3348
|
+
<xsl:copy-of select="./node()"/>
|
2993
3349
|
</fo:inline>
|
2994
3350
|
</fo:block>
|
2995
3351
|
</xsl:if>
|
@@ -3026,7 +3382,20 @@
|
|
3026
3382
|
<xsl:variable name="following_dl_colwidths">
|
3027
3383
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
3028
3384
|
<xsl:variable name="html-table">
|
3029
|
-
<xsl:variable name="
|
3385
|
+
<xsl:variable name="doc_ns">
|
3386
|
+
|
3387
|
+
</xsl:variable>
|
3388
|
+
<xsl:variable name="ns">
|
3389
|
+
<xsl:choose>
|
3390
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
3391
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
3392
|
+
</xsl:when>
|
3393
|
+
<xsl:otherwise>
|
3394
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
3395
|
+
</xsl:otherwise>
|
3396
|
+
</xsl:choose>
|
3397
|
+
</xsl:variable>
|
3398
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3030
3399
|
<xsl:element name="{$ns}:table">
|
3031
3400
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
3032
3401
|
<tbody>
|
@@ -3091,7 +3460,8 @@
|
|
3091
3460
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3092
3461
|
</xsl:if>
|
3093
3462
|
|
3094
|
-
<xsl:apply-templates/>
|
3463
|
+
<!-- <xsl:apply-templates /> -->
|
3464
|
+
<xsl:copy-of select="./node()"/>
|
3095
3465
|
</fo:block>
|
3096
3466
|
</fo:table-cell>
|
3097
3467
|
</fo:table-row>
|
@@ -3108,15 +3478,19 @@
|
|
3108
3478
|
|
3109
3479
|
|
3110
3480
|
|
3481
|
+
|
3111
3482
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
3112
3483
|
<xsl:attribute name="color">blue</xsl:attribute>
|
3113
3484
|
|
3114
3485
|
|
3115
3486
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3116
3487
|
|
3488
|
+
|
3117
3489
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
3118
3490
|
|
3491
|
+
|
3119
3492
|
<xsl:value-of select="@reference"/>
|
3493
|
+
|
3120
3494
|
</fo:basic-link>
|
3121
3495
|
</fo:inline>
|
3122
3496
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -3124,123 +3498,150 @@
|
|
3124
3498
|
<xsl:apply-templates/>
|
3125
3499
|
</fo:inline>
|
3126
3500
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
3127
|
-
<
|
3128
|
-
|
3129
|
-
|
3130
|
-
|
3131
|
-
|
3132
|
-
|
3133
|
-
|
3134
|
-
|
3135
|
-
|
3136
|
-
|
3137
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
3138
|
-
|
3139
|
-
<xsl:variable name="title-where">
|
3140
|
-
<xsl:call-template name="getTitle">
|
3141
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
3142
|
-
</xsl:call-template>
|
3143
|
-
</xsl:variable>
|
3144
|
-
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3145
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
3146
|
-
<xsl:text/>
|
3147
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
3148
|
-
</fo:block>
|
3149
|
-
|
3150
|
-
</xsl:when>
|
3151
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
3152
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
3153
|
-
|
3154
|
-
|
3155
|
-
|
3156
|
-
|
3157
|
-
<xsl:variable name="title-where">
|
3158
|
-
<xsl:call-template name="getTitle">
|
3159
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
3160
|
-
</xsl:call-template>
|
3161
|
-
</xsl:variable>
|
3162
|
-
<xsl:value-of select="$title-where"/>
|
3163
|
-
</fo:block>
|
3164
|
-
</xsl:when>
|
3165
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
3166
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
3167
|
-
|
3168
|
-
|
3169
|
-
|
3170
|
-
<xsl:variable name="title-key">
|
3171
|
-
<xsl:call-template name="getTitle">
|
3172
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
3173
|
-
</xsl:call-template>
|
3174
|
-
</xsl:variable>
|
3175
|
-
<xsl:value-of select="$title-key"/>
|
3176
|
-
</fo:block>
|
3177
|
-
</xsl:when>
|
3178
|
-
</xsl:choose>
|
3179
|
-
|
3180
|
-
<!-- a few components -->
|
3181
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
3182
|
-
<fo:block>
|
3183
|
-
|
3501
|
+
<fo:block-container margin-left="0mm">
|
3502
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3503
|
+
<xsl:attribute name="margin-left">
|
3504
|
+
<xsl:choose>
|
3505
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3506
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3507
|
+
</xsl:choose>
|
3508
|
+
</xsl:attribute>
|
3184
3509
|
|
3510
|
+
</xsl:if>
|
3511
|
+
<fo:block-container margin-left="0mm">
|
3512
|
+
|
3513
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
3185
3514
|
|
3186
|
-
|
3187
|
-
|
3188
|
-
|
3515
|
+
<xsl:variable name="key_iso">
|
3516
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
3517
|
+
</xsl:variable>
|
3189
3518
|
|
3519
|
+
<xsl:choose>
|
3520
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
3521
|
+
|
3522
|
+
|
3523
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
3524
|
+
|
3525
|
+
<xsl:variable name="title-where">
|
3526
|
+
<xsl:call-template name="getTitle">
|
3527
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3528
|
+
</xsl:call-template>
|
3529
|
+
</xsl:variable>
|
3530
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3531
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
3532
|
+
<xsl:text/>
|
3533
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
3534
|
+
</fo:block>
|
3535
|
+
|
3536
|
+
</xsl:when>
|
3537
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
3538
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
3539
|
+
|
3540
|
+
|
3541
|
+
|
3542
|
+
|
3543
|
+
<xsl:variable name="title-where">
|
3544
|
+
<xsl:call-template name="getTitle">
|
3545
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3546
|
+
</xsl:call-template>
|
3547
|
+
</xsl:variable>
|
3548
|
+
<xsl:value-of select="$title-where"/>
|
3549
|
+
</fo:block>
|
3550
|
+
</xsl:when>
|
3551
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
3552
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
3553
|
+
|
3554
|
+
|
3555
|
+
|
3556
|
+
<xsl:variable name="title-key">
|
3557
|
+
<xsl:call-template name="getTitle">
|
3558
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
3559
|
+
</xsl:call-template>
|
3560
|
+
</xsl:variable>
|
3561
|
+
<xsl:value-of select="$title-key"/>
|
3562
|
+
</fo:block>
|
3563
|
+
</xsl:when>
|
3564
|
+
</xsl:choose>
|
3190
3565
|
|
3191
|
-
|
3192
|
-
|
3193
|
-
|
3194
|
-
<xsl:attribute name="margin-left">-2.5mm</xsl:attribute>
|
3195
|
-
</xsl:if>
|
3196
|
-
|
3197
|
-
|
3198
|
-
|
3199
|
-
|
3200
|
-
<fo:table width="95%" table-layout="fixed">
|
3566
|
+
<!-- a few components -->
|
3567
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
3568
|
+
<fo:block>
|
3201
3569
|
|
3202
|
-
|
3203
|
-
|
3204
|
-
|
3205
|
-
|
3206
|
-
|
3207
|
-
|
3570
|
+
|
3571
|
+
|
3572
|
+
<xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
|
3573
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3574
|
+
</xsl:if>
|
3575
|
+
|
3576
|
+
|
3577
|
+
<fo:block>
|
3578
|
+
|
3579
|
+
<xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
|
3580
|
+
<xsl:attribute name="margin-left">-2.5mm</xsl:attribute>
|
3581
|
+
</xsl:if>
|
3582
|
+
|
3583
|
+
|
3584
|
+
|
3585
|
+
|
3586
|
+
<fo:table width="95%" table-layout="fixed">
|
3208
3587
|
|
3209
|
-
|
3210
|
-
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
3214
|
-
|
3215
|
-
|
3216
|
-
|
3217
|
-
</
|
3218
|
-
|
3219
|
-
|
3220
|
-
|
3221
|
-
|
3222
|
-
|
3223
|
-
|
3224
|
-
|
3225
|
-
|
3226
|
-
|
3227
|
-
|
3228
|
-
|
3229
|
-
|
3230
|
-
|
3231
|
-
|
3232
|
-
|
3233
|
-
|
3234
|
-
|
3235
|
-
|
3236
|
-
|
3237
|
-
|
3238
|
-
|
3239
|
-
|
3240
|
-
|
3241
|
-
|
3242
|
-
|
3243
|
-
|
3588
|
+
<xsl:choose>
|
3589
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
3590
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
3591
|
+
</xsl:when>
|
3592
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
3593
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3594
|
+
|
3595
|
+
</xsl:when>
|
3596
|
+
</xsl:choose>
|
3597
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
3598
|
+
<xsl:variable name="html-table">
|
3599
|
+
<xsl:variable name="doc_ns">
|
3600
|
+
|
3601
|
+
</xsl:variable>
|
3602
|
+
<xsl:variable name="ns">
|
3603
|
+
<xsl:choose>
|
3604
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
3605
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
3606
|
+
</xsl:when>
|
3607
|
+
<xsl:otherwise>
|
3608
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
3609
|
+
</xsl:otherwise>
|
3610
|
+
</xsl:choose>
|
3611
|
+
</xsl:variable>
|
3612
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3613
|
+
<xsl:element name="{$ns}:table">
|
3614
|
+
<tbody>
|
3615
|
+
<xsl:apply-templates mode="dl"/>
|
3616
|
+
</tbody>
|
3617
|
+
</xsl:element>
|
3618
|
+
</xsl:variable>
|
3619
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
3620
|
+
<xsl:variable name="colwidths">
|
3621
|
+
<xsl:call-template name="calculate-column-widths">
|
3622
|
+
<xsl:with-param name="cols-count" select="2"/>
|
3623
|
+
<xsl:with-param name="table" select="$html-table"/>
|
3624
|
+
</xsl:call-template>
|
3625
|
+
</xsl:variable>
|
3626
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
3627
|
+
<xsl:variable name="maxlength_dt">
|
3628
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
3629
|
+
</xsl:variable>
|
3630
|
+
<xsl:call-template name="setColumnWidth_dl">
|
3631
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
3632
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
3633
|
+
</xsl:call-template>
|
3634
|
+
<fo:table-body>
|
3635
|
+
<xsl:apply-templates>
|
3636
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
3637
|
+
</xsl:apply-templates>
|
3638
|
+
</fo:table-body>
|
3639
|
+
</fo:table>
|
3640
|
+
</fo:block>
|
3641
|
+
</fo:block>
|
3642
|
+
</xsl:if>
|
3643
|
+
</fo:block-container>
|
3644
|
+
</fo:block-container>
|
3244
3645
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
3245
3646
|
<xsl:param name="colwidths"/>
|
3246
3647
|
<xsl:param name="maxlength_dt"/>
|
@@ -3350,6 +3751,7 @@
|
|
3350
3751
|
<xsl:param name="key_iso"/>
|
3351
3752
|
|
3352
3753
|
<fo:table-row>
|
3754
|
+
|
3353
3755
|
<fo:table-cell>
|
3354
3756
|
|
3355
3757
|
<fo:block margin-top="6pt">
|
@@ -3367,6 +3769,7 @@
|
|
3367
3769
|
|
3368
3770
|
|
3369
3771
|
|
3772
|
+
|
3370
3773
|
<xsl:apply-templates/>
|
3371
3774
|
<!-- <xsl:if test="$namespace = 'gb'">
|
3372
3775
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -3378,16 +3781,18 @@
|
|
3378
3781
|
<fo:table-cell>
|
3379
3782
|
<fo:block>
|
3380
3783
|
|
3381
|
-
|
3784
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
3382
3785
|
<xsl:if test="local-name(*[1]) != 'stem'">
|
3383
3786
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
3384
3787
|
</xsl:if>
|
3788
|
+
</xsl:if> -->
|
3385
3789
|
|
3790
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
3386
3791
|
|
3387
3792
|
</fo:block>
|
3388
3793
|
</fo:table-cell>
|
3389
3794
|
</fo:table-row>
|
3390
|
-
|
3795
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
3391
3796
|
<xsl:if test="local-name(*[1]) = 'stem'">
|
3392
3797
|
<fo:table-row>
|
3393
3798
|
<fo:table-cell>
|
@@ -3395,7 +3800,7 @@
|
|
3395
3800
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
3396
3801
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
3397
3802
|
</xsl:if>
|
3398
|
-
<xsl:text
|
3803
|
+
<xsl:text> </xsl:text>
|
3399
3804
|
</fo:block>
|
3400
3805
|
</fo:table-cell>
|
3401
3806
|
<fo:table-cell>
|
@@ -3405,7 +3810,7 @@
|
|
3405
3810
|
</fo:table-cell>
|
3406
3811
|
</fo:table-row>
|
3407
3812
|
</xsl:if>
|
3408
|
-
|
3813
|
+
</xsl:if> -->
|
3409
3814
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
3410
3815
|
<xsl:apply-templates/>
|
3411
3816
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -3430,6 +3835,31 @@
|
|
3430
3835
|
</fo:inline>
|
3431
3836
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
3432
3837
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
3838
|
+
<xsl:variable name="_font-size">
|
3839
|
+
|
3840
|
+
|
3841
|
+
|
3842
|
+
|
3843
|
+
|
3844
|
+
|
3845
|
+
|
3846
|
+
|
3847
|
+
|
3848
|
+
|
3849
|
+
|
3850
|
+
|
3851
|
+
|
3852
|
+
|
3853
|
+
</xsl:variable>
|
3854
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3855
|
+
<xsl:if test="$font-size != ''">
|
3856
|
+
<xsl:attribute name="font-size">
|
3857
|
+
<xsl:choose>
|
3858
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3859
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3860
|
+
</xsl:choose>
|
3861
|
+
</xsl:attribute>
|
3862
|
+
</xsl:if>
|
3433
3863
|
<xsl:apply-templates/>
|
3434
3864
|
</fo:inline>
|
3435
3865
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -3755,11 +4185,24 @@
|
|
3755
4185
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3756
4186
|
<xsl:value-of select="substring($str, 2)"/>
|
3757
4187
|
</xsl:template><xsl:template match="mathml:math">
|
3758
|
-
<fo:inline font-family="
|
3759
|
-
<
|
3760
|
-
<xsl:
|
3761
|
-
</
|
4188
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
4189
|
+
<xsl:variable name="mathml">
|
4190
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
4191
|
+
</xsl:variable>
|
4192
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
4193
|
+
<!-- <xsl:copy-of select="."/> -->
|
4194
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
4195
|
+
</fo:instream-foreign-object>
|
3762
4196
|
</fo:inline>
|
4197
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
4198
|
+
<xsl:copy>
|
4199
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
4200
|
+
</xsl:copy>
|
4201
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
4202
|
+
<xsl:copy>
|
4203
|
+
<!-- replace start and end spaces to non-break space -->
|
4204
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
4205
|
+
</xsl:copy>
|
3763
4206
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3764
4207
|
<xsl:variable name="target">
|
3765
4208
|
<xsl:choose>
|
@@ -3836,13 +4279,26 @@
|
|
3836
4279
|
<xsl:apply-templates/>
|
3837
4280
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3838
4281
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3839
|
-
|
4282
|
+
|
3840
4283
|
<xsl:apply-templates/>
|
3841
4284
|
</fo:basic-link>
|
3842
4285
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
3843
|
-
<fo:block
|
3844
|
-
<xsl:
|
3845
|
-
|
4286
|
+
<fo:block-container margin-left="0mm">
|
4287
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4288
|
+
<xsl:attribute name="margin-left">
|
4289
|
+
<xsl:choose>
|
4290
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4291
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4292
|
+
</xsl:choose>
|
4293
|
+
</xsl:attribute>
|
4294
|
+
|
4295
|
+
</xsl:if>
|
4296
|
+
<fo:block-container margin-left="0mm">
|
4297
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
4298
|
+
<xsl:apply-templates/>
|
4299
|
+
</fo:block>
|
4300
|
+
</fo:block-container>
|
4301
|
+
</fo:block-container>
|
3846
4302
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
3847
4303
|
<fo:inline>
|
3848
4304
|
<xsl:apply-templates/>
|
@@ -3902,7 +4358,9 @@
|
|
3902
4358
|
</xsl:choose>
|
3903
4359
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3904
4360
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3905
|
-
<xsl:
|
4361
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
4362
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4363
|
+
</fo:inline>
|
3906
4364
|
<xsl:apply-templates/>
|
3907
4365
|
</fo:block>
|
3908
4366
|
</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">
|
@@ -4001,19 +4459,140 @@
|
|
4001
4459
|
|
4002
4460
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
4003
4461
|
</fo:block>
|
4004
|
-
</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">
|
4462
|
+
</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">
|
4005
4463
|
<xsl:apply-templates mode="contents"/>
|
4006
4464
|
<xsl:text> </xsl:text>
|
4007
|
-
</xsl:template><xsl:template match="
|
4465
|
+
</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">
|
4466
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4467
|
+
<xsl:text> </xsl:text>
|
4468
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4469
|
+
<xsl:value-of select="."/>
|
4470
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
4008
4471
|
<xsl:value-of select="."/>
|
4009
|
-
</xsl:template><xsl:template match="
|
4472
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
4473
|
+
<xsl:apply-templates mode="contents"/>
|
4474
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
4475
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4476
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
4477
|
+
<xsl:apply-templates select="."/>
|
4478
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4479
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4480
|
+
</xsl:template><xsl:template name="addBookmarks">
|
4481
|
+
<xsl:param name="contents"/>
|
4482
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
4483
|
+
<fo:bookmark-tree>
|
4484
|
+
<xsl:choose>
|
4485
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
4486
|
+
<xsl:choose>
|
4487
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
4488
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4489
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
4490
|
+
<fo:bookmark-title>
|
4491
|
+
<xsl:variable name="bookmark-title_">
|
4492
|
+
<xsl:call-template name="getLangVersion">
|
4493
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4494
|
+
</xsl:call-template>
|
4495
|
+
</xsl:variable>
|
4496
|
+
<xsl:choose>
|
4497
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
4498
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
4499
|
+
</xsl:when>
|
4500
|
+
<xsl:otherwise>
|
4501
|
+
<xsl:choose>
|
4502
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
4503
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
4504
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
4505
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
4506
|
+
</xsl:choose>
|
4507
|
+
</xsl:otherwise>
|
4508
|
+
</xsl:choose>
|
4509
|
+
</fo:bookmark-title>
|
4510
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4511
|
+
</fo:bookmark>
|
4512
|
+
|
4513
|
+
</xsl:for-each>
|
4514
|
+
</xsl:when>
|
4515
|
+
<xsl:otherwise>
|
4516
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4517
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4518
|
+
</xsl:for-each>
|
4519
|
+
</xsl:otherwise>
|
4520
|
+
</xsl:choose>
|
4521
|
+
</xsl:when>
|
4522
|
+
<xsl:otherwise>
|
4523
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
4524
|
+
</xsl:otherwise>
|
4525
|
+
</xsl:choose>
|
4526
|
+
|
4527
|
+
|
4528
|
+
|
4529
|
+
<xsl:if test="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
|
4530
|
+
<fo:bookmark internal-destination="{//*[local-name() = 'figure'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
|
4531
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
4532
|
+
<xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
|
4533
|
+
<fo:bookmark internal-destination="{@id}">
|
4534
|
+
<fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']/text()" mode="bookmarks"/></fo:bookmark-title>
|
4535
|
+
</fo:bookmark>
|
4536
|
+
</xsl:for-each>
|
4537
|
+
</fo:bookmark>
|
4538
|
+
</xsl:if>
|
4539
|
+
|
4540
|
+
|
4541
|
+
|
4542
|
+
<xsl:if test="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
|
4543
|
+
<fo:bookmark internal-destination="{//*[local-name() = 'table'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
|
4544
|
+
<fo:bookmark-title>
|
4545
|
+
<xsl:choose>
|
4546
|
+
<xsl:when test="@lang = 'fr'">Tableaux</xsl:when>
|
4547
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
4548
|
+
</xsl:choose>
|
4549
|
+
</fo:bookmark-title>
|
4550
|
+
<xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
|
4551
|
+
<fo:bookmark internal-destination="{@id}">
|
4552
|
+
<fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']//text()" mode="bookmarks"/></fo:bookmark-title>
|
4553
|
+
</fo:bookmark>
|
4554
|
+
</xsl:for-each>
|
4555
|
+
</fo:bookmark>
|
4556
|
+
</xsl:if>
|
4557
|
+
|
4558
|
+
|
4559
|
+
|
4560
|
+
|
4561
|
+
</fo:bookmark-tree>
|
4562
|
+
</xsl:if>
|
4563
|
+
</xsl:template><xsl:template name="getLangVersion">
|
4564
|
+
<xsl:param name="lang"/>
|
4565
|
+
<xsl:choose>
|
4566
|
+
<xsl:when test="$lang = 'en'">
|
4567
|
+
|
4568
|
+
|
4569
|
+
</xsl:when>
|
4570
|
+
<xsl:when test="$lang = 'fr'">
|
4571
|
+
|
4572
|
+
|
4573
|
+
</xsl:when>
|
4574
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
4575
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
4576
|
+
</xsl:choose>
|
4577
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
4578
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
4579
|
+
<fo:bookmark-title>
|
4580
|
+
<xsl:if test="@section != ''">
|
4581
|
+
<xsl:value-of select="@section"/>
|
4582
|
+
<xsl:text> </xsl:text>
|
4583
|
+
</xsl:if>
|
4584
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4585
|
+
</fo:bookmark-title>
|
4586
|
+
<xsl:apply-templates mode="bookmark"/>
|
4587
|
+
</fo:bookmark>
|
4588
|
+
</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">
|
4010
4589
|
<xsl:if test="normalize-space() != ''">
|
4011
4590
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
4012
4591
|
|
4013
4592
|
<xsl:if test="nist:dl">
|
4014
4593
|
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
4015
4594
|
</xsl:if>
|
4016
|
-
|
4595
|
+
|
4017
4596
|
<xsl:apply-templates/>
|
4018
4597
|
</fo:block>
|
4019
4598
|
</xsl:if>
|
@@ -4068,7 +4647,7 @@
|
|
4068
4647
|
<xsl:apply-templates/>
|
4069
4648
|
</xsl:otherwise>
|
4070
4649
|
</xsl:choose>
|
4071
|
-
</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">
|
4650
|
+
</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">
|
4072
4651
|
<xsl:text> </xsl:text>
|
4073
4652
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
4074
4653
|
<xsl:copy>
|
@@ -4077,21 +4656,61 @@
|
|
4077
4656
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4078
4657
|
<xsl:text> </xsl:text>
|
4079
4658
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4080
|
-
|
4081
|
-
|
4082
|
-
|
4083
|
-
|
4084
|
-
|
4659
|
+
|
4660
|
+
<fo:block-container margin-left="0mm">
|
4661
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4662
|
+
<xsl:attribute name="margin-left">
|
4663
|
+
<xsl:choose>
|
4664
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4665
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4666
|
+
</xsl:choose>
|
4667
|
+
</xsl:attribute>
|
4668
|
+
|
4669
|
+
</xsl:if>
|
4670
|
+
<fo:block-container margin-left="0mm">
|
4671
|
+
|
4672
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
4673
|
+
<xsl:variable name="_font-size">
|
4674
|
+
|
4675
|
+
|
4676
|
+
|
4677
|
+
|
4678
|
+
|
4679
|
+
|
4680
|
+
|
4681
|
+
|
4682
|
+
|
4683
|
+
10
|
4684
|
+
|
4685
|
+
|
4686
|
+
|
4687
|
+
|
4688
|
+
</xsl:variable>
|
4689
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
4690
|
+
<xsl:if test="$font-size != ''">
|
4691
|
+
<xsl:attribute name="font-size">
|
4692
|
+
<xsl:choose>
|
4693
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4694
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4695
|
+
</xsl:choose>
|
4696
|
+
</xsl:attribute>
|
4697
|
+
</xsl:if>
|
4698
|
+
<xsl:apply-templates/>
|
4699
|
+
</fo:block>
|
4700
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4701
|
+
|
4702
|
+
</fo:block-container>
|
4703
|
+
</fo:block-container>
|
4704
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
4085
4705
|
<xsl:variable name="text">
|
4086
4706
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
4087
4707
|
</xsl:variable>
|
4088
|
-
<xsl:call-template name="add-zero-spaces">
|
4708
|
+
<xsl:call-template name="add-zero-spaces-java">
|
4089
4709
|
<xsl:with-param name="text" select="$text"/>
|
4090
4710
|
</xsl:call-template>
|
4091
4711
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
4092
4712
|
<xsl:if test="normalize-space() != ''">
|
4093
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4094
|
-
|
4713
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4095
4714
|
<xsl:apply-templates/>
|
4096
4715
|
</fo:block>
|
4097
4716
|
</xsl:if>
|
@@ -4161,6 +4780,145 @@
|
|
4161
4780
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
4162
4781
|
<xsl:apply-templates/>
|
4163
4782
|
</fo:block>
|
4783
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4784
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
4785
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4786
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
4787
|
+
</xsl:if>
|
4788
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
4789
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
4790
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4791
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
4792
|
+
</xsl:if>
|
4793
|
+
<xsl:variable name="simple-table">
|
4794
|
+
<xsl:call-template name="getSimpleTable"/>
|
4795
|
+
</xsl:variable>
|
4796
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
4797
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
4798
|
+
<!-- <fo:table-column column-width="35mm"/>
|
4799
|
+
<fo:table-column column-width="115mm"/> -->
|
4800
|
+
<fo:table-column column-width="30%"/>
|
4801
|
+
<fo:table-column column-width="70%"/>
|
4802
|
+
</xsl:if>
|
4803
|
+
<xsl:apply-templates mode="requirement"/>
|
4804
|
+
</fo:table>
|
4805
|
+
<!-- fn processing -->
|
4806
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
4807
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
4808
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
4809
|
+
<xsl:call-template name="fn_display"/>
|
4810
|
+
</fo:block>
|
4811
|
+
</xsl:for-each>
|
4812
|
+
</xsl:if>
|
4813
|
+
</fo:block-container>
|
4814
|
+
</fo:block-container>
|
4815
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
4816
|
+
<fo:table-header>
|
4817
|
+
<xsl:apply-templates mode="requirement"/>
|
4818
|
+
</fo:table-header>
|
4819
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
4820
|
+
<fo:table-body>
|
4821
|
+
<xsl:apply-templates mode="requirement"/>
|
4822
|
+
</fo:table-body>
|
4823
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
4824
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
4825
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
4826
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
4827
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
4828
|
+
</xsl:if>
|
4829
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
4830
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
4831
|
+
</xsl:if>
|
4832
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
4833
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
4834
|
+
</xsl:if>
|
4835
|
+
<xsl:apply-templates mode="requirement"/>
|
4836
|
+
</fo:table-row>
|
4837
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
4838
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
4839
|
+
<xsl:attribute name="text-align">
|
4840
|
+
<xsl:choose>
|
4841
|
+
<xsl:when test="@align">
|
4842
|
+
<xsl:value-of select="@align"/>
|
4843
|
+
</xsl:when>
|
4844
|
+
<xsl:otherwise>left</xsl:otherwise>
|
4845
|
+
</xsl:choose>
|
4846
|
+
</xsl:attribute>
|
4847
|
+
<xsl:if test="@colspan">
|
4848
|
+
<xsl:attribute name="number-columns-spanned">
|
4849
|
+
<xsl:value-of select="@colspan"/>
|
4850
|
+
</xsl:attribute>
|
4851
|
+
</xsl:if>
|
4852
|
+
<xsl:if test="@rowspan">
|
4853
|
+
<xsl:attribute name="number-rows-spanned">
|
4854
|
+
<xsl:value-of select="@rowspan"/>
|
4855
|
+
</xsl:attribute>
|
4856
|
+
</xsl:if>
|
4857
|
+
<xsl:call-template name="display-align"/>
|
4858
|
+
|
4859
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4860
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4861
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
4862
|
+
</xsl:if>
|
4863
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
4864
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4865
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
4866
|
+
</xsl:if> -->
|
4867
|
+
|
4868
|
+
<fo:block>
|
4869
|
+
<xsl:apply-templates/>
|
4870
|
+
</fo:block>
|
4871
|
+
</fo:table-cell>
|
4872
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
4873
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
4874
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4875
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
4876
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
4877
|
+
</xsl:if>
|
4878
|
+
<xsl:attribute name="text-align">
|
4879
|
+
<xsl:choose>
|
4880
|
+
<xsl:when test="@align">
|
4881
|
+
<xsl:value-of select="@align"/>
|
4882
|
+
</xsl:when>
|
4883
|
+
<xsl:otherwise>left</xsl:otherwise>
|
4884
|
+
</xsl:choose>
|
4885
|
+
</xsl:attribute>
|
4886
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
4887
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4888
|
+
</xsl:if>
|
4889
|
+
<xsl:if test="@colspan">
|
4890
|
+
<xsl:attribute name="number-columns-spanned">
|
4891
|
+
<xsl:value-of select="@colspan"/>
|
4892
|
+
</xsl:attribute>
|
4893
|
+
</xsl:if>
|
4894
|
+
<xsl:if test="@rowspan">
|
4895
|
+
<xsl:attribute name="number-rows-spanned">
|
4896
|
+
<xsl:value-of select="@rowspan"/>
|
4897
|
+
</xsl:attribute>
|
4898
|
+
</xsl:if>
|
4899
|
+
<xsl:call-template name="display-align"/>
|
4900
|
+
|
4901
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4902
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
4903
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4904
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
4905
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
4906
|
+
</xsl:if>
|
4907
|
+
</xsl:if> -->
|
4908
|
+
<!-- 2nd line and below -->
|
4909
|
+
|
4910
|
+
<fo:block>
|
4911
|
+
<xsl:apply-templates/>
|
4912
|
+
</fo:block>
|
4913
|
+
</fo:table-cell>
|
4914
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
4915
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
4916
|
+
<xsl:apply-templates/>
|
4917
|
+
</fo:block>
|
4918
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
4919
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
4920
|
+
<xsl:apply-templates/>
|
4921
|
+
</fo:block>
|
4164
4922
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
4165
4923
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
4166
4924
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -4180,12 +4938,13 @@
|
|
4180
4938
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4181
4939
|
|
4182
4940
|
<xsl:variable name="element">
|
4183
|
-
block
|
4941
|
+
block
|
4184
4942
|
|
4943
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
4185
4944
|
</xsl:variable>
|
4186
4945
|
|
4187
4946
|
<xsl:choose>
|
4188
|
-
<xsl:when test="normalize-space($element)
|
4947
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
4189
4948
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
4190
4949
|
<xsl:apply-templates/>
|
4191
4950
|
</fo:block>
|
@@ -4222,25 +4981,44 @@
|
|
4222
4981
|
</xsl:otherwise>
|
4223
4982
|
</xsl:choose>
|
4224
4983
|
|
4225
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
4226
|
-
|
4984
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
4985
|
+
|
4986
|
+
<xsl:variable name="element">
|
4987
|
+
block
|
4227
4988
|
|
4228
|
-
|
4229
|
-
|
4989
|
+
</xsl:variable>
|
4990
|
+
<xsl:choose>
|
4991
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
4992
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
4993
|
+
|
4994
|
+
<xsl:apply-templates/>
|
4995
|
+
</fo:block>
|
4996
|
+
</xsl:when>
|
4997
|
+
<xsl:otherwise>
|
4998
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
4999
|
+
<xsl:apply-templates/>
|
5000
|
+
</fo:inline>
|
5001
|
+
</xsl:otherwise>
|
5002
|
+
</xsl:choose>
|
4230
5003
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4231
5004
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4232
5005
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4233
5006
|
<xsl:variable name="termsource_text">
|
4234
5007
|
<xsl:apply-templates/>
|
4235
5008
|
</xsl:variable>
|
5009
|
+
|
4236
5010
|
<xsl:choose>
|
4237
5011
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4238
5012
|
<xsl:apply-templates/>
|
4239
5013
|
</xsl:when>
|
4240
|
-
<xsl:otherwise>
|
4241
|
-
|
4242
|
-
|
4243
|
-
|
5014
|
+
<xsl:otherwise>
|
5015
|
+
|
5016
|
+
<xsl:text>[</xsl:text>
|
5017
|
+
|
5018
|
+
<xsl:apply-templates/>
|
5019
|
+
|
5020
|
+
<xsl:text>]</xsl:text>
|
5021
|
+
|
4244
5022
|
</xsl:otherwise>
|
4245
5023
|
</xsl:choose>
|
4246
5024
|
</fo:block>
|
@@ -4261,18 +5039,29 @@
|
|
4261
5039
|
<xsl:if test="normalize-space() != ''">
|
4262
5040
|
<xsl:value-of select="."/>
|
4263
5041
|
</xsl:if>
|
4264
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
5042
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
5043
|
+
<fo:block-container margin-left="0mm">
|
5044
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
5045
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
5046
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
5047
|
+
</xsl:if>
|
5048
|
+
</xsl:if>
|
5049
|
+
|
5050
|
+
<fo:block-container margin-left="0mm">
|
4265
5051
|
|
4266
|
-
|
4267
|
-
|
4268
|
-
|
4269
|
-
|
4270
|
-
|
4271
|
-
|
4272
|
-
|
4273
|
-
|
4274
|
-
|
4275
|
-
|
5052
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
5053
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
5054
|
+
</fo:block>
|
5055
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
5056
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
5057
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
5058
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
5059
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
5060
|
+
</fo:block>
|
5061
|
+
</xsl:if>
|
5062
|
+
|
5063
|
+
</fo:block-container>
|
5064
|
+
</fo:block-container>
|
4276
5065
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
4277
5066
|
<xsl:if test="../*[local-name() = 'author']">
|
4278
5067
|
<xsl:text>, </xsl:text>
|
@@ -4300,6 +5089,7 @@
|
|
4300
5089
|
<xsl:if test="@type = 'inline'">
|
4301
5090
|
|
4302
5091
|
|
5092
|
+
|
4303
5093
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
4304
5094
|
|
4305
5095
|
</xsl:if>
|
@@ -4340,6 +5130,7 @@
|
|
4340
5130
|
|
4341
5131
|
|
4342
5132
|
|
5133
|
+
|
4343
5134
|
</xsl:variable>
|
4344
5135
|
|
4345
5136
|
<xsl:variable name="padding-right">
|
@@ -4434,13 +5225,16 @@
|
|
4434
5225
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
4435
5226
|
<fo:block>
|
4436
5227
|
<xsl:call-template name="setId"/>
|
5228
|
+
|
4437
5229
|
<xsl:apply-templates/>
|
4438
5230
|
</fo:block>
|
4439
5231
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
4440
5232
|
<fo:block id="{@id}">
|
4441
5233
|
<xsl:apply-templates/>
|
4442
5234
|
</fo:block>
|
4443
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@
|
5235
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
5236
|
+
|
5237
|
+
<fo:block break-after="page"/>
|
4444
5238
|
|
4445
5239
|
<fo:block id="{@id}">
|
4446
5240
|
<xsl:apply-templates/>
|
@@ -4458,6 +5252,31 @@
|
|
4458
5252
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
4459
5253
|
<!-- 0xA0 to space replacement -->
|
4460
5254
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
5255
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
5256
|
+
<xsl:choose>
|
5257
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
5258
|
+
<fo:block-container>
|
5259
|
+
<xsl:attribute name="margin-left">
|
5260
|
+
<xsl:choose>
|
5261
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
5262
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
5263
|
+
</xsl:choose>
|
5264
|
+
</xsl:attribute>
|
5265
|
+
|
5266
|
+
|
5267
|
+
<fo:block-container margin-left="0mm">
|
5268
|
+
<fo:block>
|
5269
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
5270
|
+
</fo:block>
|
5271
|
+
</fo:block-container>
|
5272
|
+
</fo:block-container>
|
5273
|
+
</xsl:when>
|
5274
|
+
<xsl:otherwise>
|
5275
|
+
<fo:block>
|
5276
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
5277
|
+
</fo:block>
|
5278
|
+
</xsl:otherwise>
|
5279
|
+
</xsl:choose>
|
4461
5280
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4462
5281
|
<!-- <row>
|
4463
5282
|
<date>05-07-2013</date>
|
@@ -4489,6 +5308,65 @@
|
|
4489
5308
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
4490
5309
|
<fo:block><xsl:apply-templates/></fo:block>
|
4491
5310
|
</fo:table-cell>
|
5311
|
+
</xsl:template><xsl:template name="processBibitem">
|
5312
|
+
|
5313
|
+
|
5314
|
+
|
5315
|
+
|
5316
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
5317
|
+
<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')]"/>
|
5318
|
+
<xsl:choose>
|
5319
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
5320
|
+
<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"/>
|
5321
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
5322
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
5323
|
+
</xsl:if>
|
5324
|
+
<xsl:value-of select="$_doc_ident"/>
|
5325
|
+
</xsl:when>
|
5326
|
+
<xsl:otherwise>
|
5327
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
5328
|
+
<xsl:if test="$type != ''">
|
5329
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
5330
|
+
</xsl:if>
|
5331
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
5332
|
+
</xsl:otherwise>
|
5333
|
+
</xsl:choose>
|
5334
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
5335
|
+
<xsl:choose>
|
5336
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
5337
|
+
<author>
|
5338
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
5339
|
+
</author>
|
5340
|
+
</xsl:when>
|
5341
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
5342
|
+
<author>
|
5343
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
5344
|
+
<xsl:text> </xsl:text>
|
5345
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
5346
|
+
</author>
|
5347
|
+
</xsl:when>
|
5348
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
5349
|
+
<author>
|
5350
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
5351
|
+
<xsl:text> </xsl:text>
|
5352
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
5353
|
+
</author>
|
5354
|
+
</xsl:when>
|
5355
|
+
<xsl:otherwise>
|
5356
|
+
<xsl:apply-templates/>
|
5357
|
+
</xsl:otherwise>
|
5358
|
+
</xsl:choose>
|
5359
|
+
</xsl:template><xsl:template name="renderDate">
|
5360
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
5361
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
5362
|
+
</xsl:if>
|
5363
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
5364
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
5365
|
+
</xsl:if>
|
5366
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
5367
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
5368
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
5369
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
4492
5370
|
</xsl:template><xsl:template name="convertDate">
|
4493
5371
|
<xsl:param name="date"/>
|
4494
5372
|
<xsl:param name="format" select="'short'"/>
|
@@ -4571,6 +5449,7 @@
|
|
4571
5449
|
|
4572
5450
|
|
4573
5451
|
|
5452
|
+
|
4574
5453
|
|
4575
5454
|
</xsl:variable>
|
4576
5455
|
<xsl:choose>
|
@@ -4585,6 +5464,7 @@
|
|
4585
5464
|
<dc:creator>
|
4586
5465
|
|
4587
5466
|
|
5467
|
+
|
4588
5468
|
<xsl:for-each select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
4589
5469
|
<xsl:value-of select="*[local-name() = 'person']/*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
4590
5470
|
<xsl:if test="position() != last()">; </xsl:if>
|
@@ -4599,6 +5479,7 @@
|
|
4599
5479
|
<xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
4600
5480
|
|
4601
5481
|
|
5482
|
+
|
4602
5483
|
</xsl:variable>
|
4603
5484
|
<xsl:value-of select="normalize-space($abstract)"/>
|
4604
5485
|
</dc:description>
|
@@ -4697,7 +5578,9 @@
|
|
4697
5578
|
|
4698
5579
|
|
4699
5580
|
|
4700
|
-
|
5581
|
+
|
5582
|
+
|
5583
|
+
|
4701
5584
|
</xsl:variable>
|
4702
5585
|
<xsl:if test="$documentNS != $XSLNS">
|
4703
5586
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -4723,4 +5606,21 @@
|
|
4723
5606
|
</xsl:otherwise>
|
4724
5607
|
</xsl:choose>
|
4725
5608
|
</xsl:attribute>
|
5609
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
5610
|
+
<xsl:param name="text"/>
|
5611
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
5612
|
+
<xsl:if test="string-length($text) > 0">
|
5613
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
5614
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
5615
|
+
<xsl:if test="$char = '®'">
|
5616
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
5617
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
5618
|
+
</xsl:if>
|
5619
|
+
<xsl:value-of select="$char"/>
|
5620
|
+
</fo:inline>
|
5621
|
+
<xsl:call-template name="add-letter-spacing">
|
5622
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
5623
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
5624
|
+
</xsl:call-template>
|
5625
|
+
</xsl:if>
|
4726
5626
|
</xsl:template></xsl:stylesheet>
|