metanorma-nist 1.2.4 → 1.2.9
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 +62 -0
- data/.github/workflows/release.yml +36 -0
- data/README.adoc +3 -4
- data/lib/asciidoctor/nist/basicdoc.rng +32 -0
- data/lib/asciidoctor/nist/cleanup.rb +1 -0
- data/lib/asciidoctor/nist/converter.rb +2 -0
- data/lib/asciidoctor/nist/isodoc.rng +29 -44
- data/lib/asciidoctor/nist/nist.rng +1 -0
- data/lib/isodoc/nist/base_convert.rb +0 -1
- data/lib/isodoc/nist/fonts_manifest.yaml +4 -0
- data/lib/isodoc/nist/html/htmlstyle.css +226 -222
- data/lib/isodoc/nist/html/htmlstyle.scss +5 -6
- data/lib/isodoc/nist/html/nist.css +49 -50
- data/lib/isodoc/nist/html/nist.scss +49 -50
- data/lib/isodoc/nist/html/nist_cswp.css +48 -49
- data/lib/isodoc/nist/html/nist_cswp.scss +48 -49
- data/lib/isodoc/nist/html/wordstyle.css +42 -42
- data/lib/isodoc/nist/html/wordstyle.scss +42 -42
- data/lib/isodoc/nist/html/wordstyle_cswp.css +52 -52
- data/lib/isodoc/nist/html/wordstyle_cswp.scss +52 -52
- data/lib/isodoc/nist/html_convert.rb +12 -1
- data/lib/isodoc/nist/metadata.rb +1 -0
- data/lib/isodoc/nist/nist.cswp.xsl +477 -103
- data/lib/isodoc/nist/nist.sp.xsl +477 -104
- data/lib/isodoc/nist/refs.rb +2 -0
- data/lib/isodoc/nist/render.rb +0 -4
- data/lib/isodoc/nist/word_convert.rb +6 -1
- data/lib/metanorma/nist/fonts_manifest.yaml +6 -0
- data/lib/metanorma/nist/processor.rb +0 -8
- data/lib/metanorma/nist/version.rb +1 -1
- data/metanorma-nist.gemspec +1 -1
- metadata +8 -7
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
@@ -25,7 +25,10 @@ module IsoDoc
|
|
25
25
|
'"Libre Baskerville",serif'),
|
26
26
|
headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
|
27
27
|
'"Libre Baskerville",serif'),
|
28
|
-
monospacefont: '"Space Mono",monospace'
|
28
|
+
monospacefont: '"Space Mono",monospace',
|
29
|
+
normalfontsize: "14px",
|
30
|
+
footnotefontsize: "0.9em",
|
31
|
+
monospacefontsize: "0.8em",
|
29
32
|
}
|
30
33
|
end
|
31
34
|
|
@@ -46,6 +49,14 @@ module IsoDoc
|
|
46
49
|
HEAD
|
47
50
|
end
|
48
51
|
|
52
|
+
def html_head()
|
53
|
+
super + <<~HEAD.freeze
|
54
|
+
<link rel="stylesheet" href="https://pages.nist.gov/nist-header-footer/css/nist-combined.css">
|
55
|
+
<script src="https://pages.nist.gov/nist-header-footer/js/jquery-1.9.0.min.js" type="text/javascript" defer="defer"></script>
|
56
|
+
<script src="https://pages.nist.gov/nist-header-footer/js/nist-header-footer.js" type="text/javascript" defer="defer"></script>
|
57
|
+
HEAD
|
58
|
+
end
|
59
|
+
|
49
60
|
def toclevel
|
50
61
|
ret = toclevel_classes.map do |l|
|
51
62
|
"#{l}:not(:empty):not(.TermNum):not(.noTOC):not(.AbstractTitle):"\
|
data/lib/isodoc/nist/metadata.rb
CHANGED
@@ -51,7 +51,7 @@
|
|
51
51
|
|
52
52
|
<xsl:template match="/">
|
53
53
|
<xsl:call-template name="namespaceCheck"/>
|
54
|
-
<fo:root font-family="Times New Roman,
|
54
|
+
<fo:root font-family="Times New Roman, STIX Two Math" font-size="12pt" xml:lang="{$lang}">
|
55
55
|
<fo:layout-master-set>
|
56
56
|
<!-- Cover pages -->
|
57
57
|
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
@@ -83,6 +83,10 @@
|
|
83
83
|
</fo:layout-master-set>
|
84
84
|
|
85
85
|
<xsl:call-template name="addPDFUAmeta"/>
|
86
|
+
|
87
|
+
<xsl:call-template name="addBookmarks">
|
88
|
+
<xsl:with-param name="contents" select="$contents"/>
|
89
|
+
</xsl:call-template>
|
86
90
|
|
87
91
|
<!-- cover page -->
|
88
92
|
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
@@ -150,17 +154,18 @@
|
|
150
154
|
<xsl:variable name="org-address" select="nist:person/nist:affiliation/nist:organization/nist:address/nist:formattedAddress"/>
|
151
155
|
<xsl:if test="concat(following-sibling::nist:contributor[nist:role/@type = 'author'][1]/nist:person/nist:affiliation/nist:organization/nist:name, following-sibling::nist:contributor[nist:role/@type = 'author'][1]/nist:person/nist:affiliation/nist:organization/nist:address/nist:formattedAddress) != concat($org-name, $org-address)">
|
152
156
|
|
153
|
-
<xsl:for-each select="xalan:tokenize($org-name, ',')">
|
157
|
+
<!-- <xsl:for-each select="xalan:tokenize($org-name, ',')">
|
154
158
|
<fo:block>
|
155
159
|
<fo:inline font-style="italic">
|
156
160
|
<xsl:value-of select="."/>
|
157
|
-
<!-- <xsl:if test="normalize-space($org-address) != ''">
|
158
|
-
<fo:inline>, <xsl:value-of select="$org-address"/></fo:inline>
|
159
|
-
</xsl:if> -->
|
160
161
|
</fo:inline>
|
161
162
|
</fo:block>
|
162
|
-
</xsl:for-each>
|
163
|
-
|
163
|
+
</xsl:for-each> -->
|
164
|
+
<fo:block>
|
165
|
+
<fo:inline font-style="italic">
|
166
|
+
<xsl:value-of select="$org-name"/>
|
167
|
+
</fo:inline>
|
168
|
+
</fo:block>
|
164
169
|
<xsl:if test="normalize-space($org-address) != ''">
|
165
170
|
<fo:block>
|
166
171
|
<fo:inline font-style="italic">
|
@@ -429,9 +434,17 @@
|
|
429
434
|
<xsl:otherwise>true</xsl:otherwise>
|
430
435
|
</xsl:choose>
|
431
436
|
</xsl:variable>
|
437
|
+
|
438
|
+
|
439
|
+
<xsl:variable name="skip">
|
440
|
+
<xsl:choose>
|
441
|
+
<xsl:when test="ancestor-or-self::nist:bibitem">true</xsl:when>
|
442
|
+
<xsl:when test="ancestor-or-self::nist:term">true</xsl:when>
|
443
|
+
<xsl:otherwise>false</xsl:otherwise>
|
444
|
+
</xsl:choose>
|
445
|
+
</xsl:variable>
|
432
446
|
|
433
|
-
|
434
|
-
<xsl:if test="$display = 'true'">
|
447
|
+
<xsl:if test="$skip = 'false'">
|
435
448
|
|
436
449
|
<xsl:variable name="section">
|
437
450
|
<xsl:call-template name="getSection"/>
|
@@ -445,12 +458,13 @@
|
|
445
458
|
<xsl:value-of select="local-name()"/>
|
446
459
|
</xsl:variable>
|
447
460
|
|
448
|
-
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
|
449
|
-
<
|
461
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
462
|
+
<title>
|
463
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
464
|
+
</title>
|
465
|
+
<xsl:apply-templates mode="contents"/>
|
450
466
|
</item>
|
451
|
-
|
452
|
-
</xsl:if>
|
453
|
-
|
467
|
+
</xsl:if>
|
454
468
|
</xsl:template>
|
455
469
|
|
456
470
|
|
@@ -836,7 +850,7 @@
|
|
836
850
|
<xsl:number format="1."/>
|
837
851
|
</xsl:when>
|
838
852
|
<xsl:when test="../@type = 'arabic'">
|
839
|
-
<xsl:number format="a)"/>
|
853
|
+
<xsl:number format="a)" lang="en"/>
|
840
854
|
</xsl:when>
|
841
855
|
<xsl:when test="../@type = 'alphabet'">
|
842
856
|
<xsl:number format="1)"/>
|
@@ -844,7 +858,7 @@
|
|
844
858
|
<xsl:when test="ancestor::*[nist:annex]">
|
845
859
|
<xsl:choose>
|
846
860
|
<xsl:when test="$level = 1">
|
847
|
-
<xsl:number format="a)"/>
|
861
|
+
<xsl:number format="a)" lang="en"/>
|
848
862
|
</xsl:when>
|
849
863
|
<xsl:when test="$level = 2">
|
850
864
|
<xsl:number format="i)"/>
|
@@ -1104,7 +1118,12 @@
|
|
1104
1118
|
|
1105
1119
|
|
1106
1120
|
</title-toc>
|
1107
|
-
<title-toc lang="fr">
|
1121
|
+
<title-toc lang="fr">
|
1122
|
+
|
1123
|
+
<xsl:text>Sommaire</xsl:text>
|
1124
|
+
|
1125
|
+
|
1126
|
+
</title-toc>
|
1108
1127
|
|
1109
1128
|
<title-toc lang="zh">Contents</title-toc>
|
1110
1129
|
|
@@ -1124,13 +1143,22 @@
|
|
1124
1143
|
<title-part lang="en">
|
1125
1144
|
|
1126
1145
|
|
1146
|
+
|
1127
1147
|
</title-part>
|
1128
1148
|
<title-part lang="fr">
|
1129
1149
|
|
1130
1150
|
|
1151
|
+
|
1131
1152
|
</title-part>
|
1132
1153
|
<title-part lang="zh">第 # 部分:</title-part>
|
1133
1154
|
|
1155
|
+
<title-subpart lang="en">
|
1156
|
+
|
1157
|
+
</title-subpart>
|
1158
|
+
<title-subpart lang="fr">
|
1159
|
+
|
1160
|
+
</title-subpart>
|
1161
|
+
|
1134
1162
|
<title-modified lang="en">modified</title-modified>
|
1135
1163
|
<title-modified lang="fr">modifiée</title-modified>
|
1136
1164
|
|
@@ -1192,10 +1220,19 @@
|
|
1192
1220
|
|
1193
1221
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1194
1222
|
<xsl:param name="name"/>
|
1195
|
-
<xsl:
|
1196
|
-
|
1223
|
+
<xsl:param name="lang"/>
|
1224
|
+
<xsl:variable name="lang_">
|
1225
|
+
<xsl:choose>
|
1226
|
+
<xsl:when test="$lang != ''">
|
1227
|
+
<xsl:value-of select="$lang"/>
|
1228
|
+
</xsl:when>
|
1229
|
+
<xsl:otherwise>
|
1230
|
+
<xsl:call-template name="getLang"/>
|
1231
|
+
</xsl:otherwise>
|
1232
|
+
</xsl:choose>
|
1197
1233
|
</xsl:variable>
|
1198
|
-
<xsl:variable name="
|
1234
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1235
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
1199
1236
|
<xsl:choose>
|
1200
1237
|
<xsl:when test="normalize-space($title_) != ''">
|
1201
1238
|
<xsl:value-of select="$title_"/>
|
@@ -1341,6 +1378,7 @@
|
|
1341
1378
|
|
1342
1379
|
|
1343
1380
|
|
1381
|
+
|
1344
1382
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1345
1383
|
|
1346
1384
|
|
@@ -1380,6 +1418,7 @@
|
|
1380
1418
|
|
1381
1419
|
|
1382
1420
|
|
1421
|
+
|
1383
1422
|
</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">
|
1384
1423
|
|
1385
1424
|
|
@@ -1443,6 +1482,7 @@
|
|
1443
1482
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1444
1483
|
|
1445
1484
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1485
|
+
|
1446
1486
|
|
1447
1487
|
|
1448
1488
|
|
@@ -1561,6 +1601,10 @@
|
|
1561
1601
|
|
1562
1602
|
|
1563
1603
|
|
1604
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1605
|
+
<fo:block> </fo:block>
|
1606
|
+
</xsl:if> -->
|
1607
|
+
|
1564
1608
|
<!-- $namespace = 'iso' or -->
|
1565
1609
|
|
1566
1610
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -1591,11 +1635,14 @@
|
|
1591
1635
|
|
1592
1636
|
|
1593
1637
|
<xsl:variable name="colwidths">
|
1594
|
-
<xsl:
|
1595
|
-
<xsl:
|
1596
|
-
|
1597
|
-
|
1638
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1639
|
+
<xsl:call-template name="calculate-column-widths">
|
1640
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1641
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
1642
|
+
</xsl:call-template>
|
1643
|
+
</xsl:if>
|
1598
1644
|
</xsl:variable>
|
1645
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1599
1646
|
|
1600
1647
|
<!-- <xsl:variable name="colwidths2">
|
1601
1648
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1616,40 +1663,110 @@
|
|
1616
1663
|
|
1617
1664
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1618
1665
|
|
1666
|
+
|
1619
1667
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
1620
1668
|
|
1669
|
+
|
1670
|
+
|
1671
|
+
|
1621
1672
|
|
1622
1673
|
|
1674
|
+
<xsl:if test="ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface']">
|
1675
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
1676
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1677
|
+
</xsl:if>
|
1678
|
+
<xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
|
1679
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
1680
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1681
|
+
</xsl:if>
|
1682
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1623
1683
|
|
1684
|
+
|
1624
1685
|
|
1625
|
-
|
1626
1686
|
|
1627
1687
|
|
1628
1688
|
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1689
|
+
|
1690
|
+
|
1691
|
+
|
1692
|
+
<xsl:variable name="table_attributes">
|
1693
|
+
<attribute name="table-layout">fixed</attribute>
|
1694
|
+
<attribute name="width">100%</attribute>
|
1695
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1696
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1632
1697
|
|
1633
1698
|
|
1634
1699
|
|
1635
1700
|
|
1636
|
-
|
1637
|
-
|
1638
|
-
|
1639
|
-
</xsl:if>
|
1640
|
-
<xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
|
1641
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
1642
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1643
|
-
</xsl:if>
|
1644
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1645
|
-
|
1701
|
+
|
1702
|
+
|
1703
|
+
|
1646
1704
|
|
1705
|
+
|
1647
1706
|
|
1707
|
+
</xsl:variable>
|
1708
|
+
|
1709
|
+
|
1710
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1648
1711
|
|
1712
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1713
|
+
<xsl:attribute name="{@name}">
|
1714
|
+
<xsl:value-of select="."/>
|
1715
|
+
</xsl:attribute>
|
1716
|
+
</xsl:for-each>
|
1649
1717
|
|
1718
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1719
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1720
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1721
|
+
</xsl:if>
|
1650
1722
|
|
1723
|
+
<xsl:choose>
|
1724
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1725
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1726
|
+
<fo:table-column column-width="{@width}"/>
|
1727
|
+
</xsl:for-each>
|
1728
|
+
</xsl:when>
|
1729
|
+
<xsl:otherwise>
|
1730
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1731
|
+
<xsl:choose>
|
1732
|
+
<xsl:when test=". = 1 or . = 0">
|
1733
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1734
|
+
</xsl:when>
|
1735
|
+
<xsl:otherwise>
|
1736
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1737
|
+
</xsl:otherwise>
|
1738
|
+
</xsl:choose>
|
1739
|
+
</xsl:for-each>
|
1740
|
+
</xsl:otherwise>
|
1741
|
+
</xsl:choose>
|
1651
1742
|
|
1743
|
+
<xsl:choose>
|
1744
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1745
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1746
|
+
</xsl:when>
|
1747
|
+
<xsl:otherwise>
|
1748
|
+
<xsl:apply-templates/>
|
1749
|
+
</xsl:otherwise>
|
1750
|
+
</xsl:choose>
|
1652
1751
|
|
1752
|
+
</fo:table>
|
1753
|
+
|
1754
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
1755
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1756
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1757
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1758
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1759
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
1760
|
+
</xsl:call-template>
|
1761
|
+
</xsl:for-each>
|
1762
|
+
|
1763
|
+
<!-- insert footer as table -->
|
1764
|
+
<!-- <fo:table>
|
1765
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1766
|
+
<xsl:attribute name="{@name}">
|
1767
|
+
<xsl:value-of select="."/>
|
1768
|
+
</xsl:attribute>
|
1769
|
+
</xsl:for-each>
|
1653
1770
|
|
1654
1771
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1655
1772
|
<xsl:choose>
|
@@ -1661,17 +1778,7 @@
|
|
1661
1778
|
</xsl:otherwise>
|
1662
1779
|
</xsl:choose>
|
1663
1780
|
</xsl:for-each>
|
1664
|
-
|
1665
|
-
<xsl:choose>
|
1666
|
-
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1667
|
-
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1668
|
-
</xsl:when>
|
1669
|
-
<xsl:otherwise>
|
1670
|
-
<xsl:apply-templates/>
|
1671
|
-
</xsl:otherwise>
|
1672
|
-
</xsl:choose>
|
1673
|
-
|
1674
|
-
</fo:table>
|
1781
|
+
</fo:table>-->
|
1675
1782
|
|
1676
1783
|
|
1677
1784
|
|
@@ -1682,6 +1789,7 @@
|
|
1682
1789
|
<xsl:if test="normalize-space() != ''">
|
1683
1790
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1684
1791
|
|
1792
|
+
|
1685
1793
|
<xsl:apply-templates/>
|
1686
1794
|
</fo:block>
|
1687
1795
|
</xsl:if>
|
@@ -1737,6 +1845,13 @@
|
|
1737
1845
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1738
1846
|
<xsl:variable name="td_text">
|
1739
1847
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1848
|
+
|
1849
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1850
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1851
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1852
|
+
</xsl:for-each>
|
1853
|
+
</xsl:if> -->
|
1854
|
+
|
1740
1855
|
</xsl:variable>
|
1741
1856
|
<xsl:variable name="words">
|
1742
1857
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1796,11 +1911,14 @@
|
|
1796
1911
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1797
1912
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1798
1913
|
<xsl:value-of select="@target"/>
|
1914
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1915
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1916
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1799
1917
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1800
1918
|
<xsl:param name="cols-count"/>
|
1801
1919
|
<!-- font-weight="bold" -->
|
1802
1920
|
<fo:table-header>
|
1803
|
-
|
1921
|
+
|
1804
1922
|
<xsl:apply-templates/>
|
1805
1923
|
</fo:table-header>
|
1806
1924
|
</xsl:template><xsl:template name="table-header-title">
|
@@ -1825,6 +1943,13 @@
|
|
1825
1943
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1826
1944
|
<xsl:apply-templates/>
|
1827
1945
|
</xsl:template><xsl:template name="insertTableFooter">
|
1946
|
+
<xsl:param name="cols-count"/>
|
1947
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1948
|
+
<fo:table-footer>
|
1949
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1950
|
+
</fo:table-footer>
|
1951
|
+
</xsl:if>
|
1952
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1828
1953
|
<xsl:param name="cols-count"/>
|
1829
1954
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1830
1955
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1846,11 +1971,29 @@
|
|
1846
1971
|
<!-- fn will be processed inside 'note' processing -->
|
1847
1972
|
|
1848
1973
|
|
1974
|
+
|
1975
|
+
|
1976
|
+
|
1977
|
+
|
1849
1978
|
<!-- except gb -->
|
1850
1979
|
|
1851
1980
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1852
1981
|
|
1853
1982
|
|
1983
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
1984
|
+
<!-- empty, because notes show at page side in main sections -->
|
1985
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1986
|
+
<xsl:choose>
|
1987
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1988
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1989
|
+
</xsl:when>
|
1990
|
+
<xsl:otherwise>
|
1991
|
+
<fo:block/>
|
1992
|
+
</xsl:otherwise>
|
1993
|
+
</xsl:choose>
|
1994
|
+
</xsl:if> -->
|
1995
|
+
|
1996
|
+
|
1854
1997
|
<!-- horizontal row separator -->
|
1855
1998
|
|
1856
1999
|
|
@@ -1864,6 +2007,107 @@
|
|
1864
2007
|
</fo:table-footer>
|
1865
2008
|
|
1866
2009
|
</xsl:if>
|
2010
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
2011
|
+
<xsl:param name="table_attributes"/>
|
2012
|
+
<xsl:param name="colwidths"/>
|
2013
|
+
<xsl:param name="colgroup"/>
|
2014
|
+
|
2015
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2016
|
+
|
2017
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2018
|
+
|
2019
|
+
<xsl:variable name="cols-count">
|
2020
|
+
<xsl:choose>
|
2021
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2022
|
+
<xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
|
2023
|
+
</xsl:when>
|
2024
|
+
<xsl:otherwise>
|
2025
|
+
<xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
|
2026
|
+
</xsl:otherwise>
|
2027
|
+
</xsl:choose>
|
2028
|
+
</xsl:variable>
|
2029
|
+
|
2030
|
+
<fo:table keep-with-previous="always">
|
2031
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2032
|
+
<xsl:choose>
|
2033
|
+
<xsl:when test="@name = 'border-top'">
|
2034
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
2035
|
+
</xsl:when>
|
2036
|
+
<xsl:when test="@name = 'border'">
|
2037
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2038
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
2039
|
+
</xsl:when>
|
2040
|
+
<xsl:otherwise>
|
2041
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2042
|
+
</xsl:otherwise>
|
2043
|
+
</xsl:choose>
|
2044
|
+
</xsl:for-each>
|
2045
|
+
|
2046
|
+
<xsl:choose>
|
2047
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2048
|
+
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2049
|
+
<fo:table-column column-width="{@width}"/>
|
2050
|
+
</xsl:for-each>
|
2051
|
+
</xsl:when>
|
2052
|
+
<xsl:otherwise>
|
2053
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2054
|
+
<xsl:choose>
|
2055
|
+
<xsl:when test=". = 1 or . = 0">
|
2056
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2057
|
+
</xsl:when>
|
2058
|
+
<xsl:otherwise>
|
2059
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2060
|
+
</xsl:otherwise>
|
2061
|
+
</xsl:choose>
|
2062
|
+
</xsl:for-each>
|
2063
|
+
</xsl:otherwise>
|
2064
|
+
</xsl:choose>
|
2065
|
+
|
2066
|
+
<fo:table-body>
|
2067
|
+
<fo:table-row>
|
2068
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
2069
|
+
|
2070
|
+
|
2071
|
+
|
2072
|
+
<!-- fn will be processed inside 'note' processing -->
|
2073
|
+
|
2074
|
+
|
2075
|
+
|
2076
|
+
|
2077
|
+
|
2078
|
+
|
2079
|
+
|
2080
|
+
<!-- except gb -->
|
2081
|
+
|
2082
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2083
|
+
|
2084
|
+
|
2085
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2086
|
+
<xsl:choose>
|
2087
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2088
|
+
show Note under table in preface (ex. abstract) sections
|
2089
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2090
|
+
</xsl:when>
|
2091
|
+
<xsl:otherwise>
|
2092
|
+
empty, because notes show at page side in main sections
|
2093
|
+
<fo:block/>
|
2094
|
+
</xsl:otherwise>
|
2095
|
+
</xsl:choose>
|
2096
|
+
</xsl:if> -->
|
2097
|
+
|
2098
|
+
|
2099
|
+
<!-- horizontal row separator -->
|
2100
|
+
|
2101
|
+
|
2102
|
+
<!-- fn processing -->
|
2103
|
+
<xsl:call-template name="fn_display"/>
|
2104
|
+
|
2105
|
+
</fo:table-cell>
|
2106
|
+
</fo:table-row>
|
2107
|
+
</fo:table-body>
|
2108
|
+
|
2109
|
+
</fo:table>
|
2110
|
+
</xsl:if>
|
1867
2111
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1868
2112
|
|
1869
2113
|
<xsl:variable name="cols-count">
|
@@ -1919,8 +2163,12 @@
|
|
1919
2163
|
|
1920
2164
|
</xsl:if>
|
1921
2165
|
|
1922
|
-
|
1923
|
-
|
2166
|
+
|
2167
|
+
|
2168
|
+
|
2169
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2170
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
2171
|
+
</xsl:if> -->
|
1924
2172
|
|
1925
2173
|
<xsl:apply-templates/>
|
1926
2174
|
</fo:table-row>
|
@@ -1948,6 +2196,7 @@
|
|
1948
2196
|
|
1949
2197
|
|
1950
2198
|
|
2199
|
+
|
1951
2200
|
<xsl:if test="@colspan">
|
1952
2201
|
<xsl:attribute name="number-columns-spanned">
|
1953
2202
|
<xsl:value-of select="@colspan"/>
|
@@ -1987,7 +2236,7 @@
|
|
1987
2236
|
|
1988
2237
|
|
1989
2238
|
|
1990
|
-
|
2239
|
+
|
1991
2240
|
|
1992
2241
|
|
1993
2242
|
|
@@ -1998,6 +2247,7 @@
|
|
1998
2247
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1999
2248
|
</xsl:if>
|
2000
2249
|
|
2250
|
+
|
2001
2251
|
<xsl:if test="@colspan">
|
2002
2252
|
<xsl:attribute name="number-columns-spanned">
|
2003
2253
|
<xsl:value-of select="@colspan"/>
|
@@ -2009,7 +2259,8 @@
|
|
2009
2259
|
</xsl:attribute>
|
2010
2260
|
</xsl:if>
|
2011
2261
|
<xsl:call-template name="display-align"/>
|
2012
|
-
<fo:block>
|
2262
|
+
<fo:block>
|
2263
|
+
|
2013
2264
|
<xsl:apply-templates/>
|
2014
2265
|
</fo:block>
|
2015
2266
|
</fo:table-cell>
|
@@ -2021,14 +2272,17 @@
|
|
2021
2272
|
|
2022
2273
|
|
2023
2274
|
|
2275
|
+
|
2276
|
+
|
2024
2277
|
<fo:inline padding-right="2mm">
|
2025
2278
|
|
2026
2279
|
|
2027
2280
|
|
2028
|
-
|
2281
|
+
|
2029
2282
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2030
2283
|
|
2031
2284
|
</fo:inline>
|
2285
|
+
|
2032
2286
|
<xsl:apply-templates mode="process"/>
|
2033
2287
|
</fo:block>
|
2034
2288
|
|
@@ -2052,6 +2306,7 @@
|
|
2052
2306
|
|
2053
2307
|
|
2054
2308
|
|
2309
|
+
|
2055
2310
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
2056
2311
|
|
2057
2312
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -2063,14 +2318,17 @@
|
|
2063
2318
|
|
2064
2319
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2065
2320
|
|
2321
|
+
|
2066
2322
|
<xsl:value-of select="@reference"/>
|
2067
2323
|
|
2324
|
+
|
2068
2325
|
</fo:inline>
|
2069
2326
|
<fo:inline>
|
2070
2327
|
|
2071
2328
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2072
2329
|
|
2073
|
-
<xsl:apply-templates/>
|
2330
|
+
<!-- <xsl:apply-templates /> -->
|
2331
|
+
<xsl:copy-of select="./node()"/>
|
2074
2332
|
</fo:inline>
|
2075
2333
|
</fo:block>
|
2076
2334
|
</xsl:if>
|
@@ -2107,7 +2365,20 @@
|
|
2107
2365
|
<xsl:variable name="following_dl_colwidths">
|
2108
2366
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
2109
2367
|
<xsl:variable name="html-table">
|
2110
|
-
<xsl:variable name="
|
2368
|
+
<xsl:variable name="doc_ns">
|
2369
|
+
|
2370
|
+
</xsl:variable>
|
2371
|
+
<xsl:variable name="ns">
|
2372
|
+
<xsl:choose>
|
2373
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2374
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2375
|
+
</xsl:when>
|
2376
|
+
<xsl:otherwise>
|
2377
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2378
|
+
</xsl:otherwise>
|
2379
|
+
</xsl:choose>
|
2380
|
+
</xsl:variable>
|
2381
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2111
2382
|
<xsl:element name="{$ns}:table">
|
2112
2383
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2113
2384
|
<tbody>
|
@@ -2172,7 +2443,8 @@
|
|
2172
2443
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2173
2444
|
</xsl:if>
|
2174
2445
|
|
2175
|
-
<xsl:apply-templates/>
|
2446
|
+
<!-- <xsl:apply-templates /> -->
|
2447
|
+
<xsl:copy-of select="./node()"/>
|
2176
2448
|
</fo:block>
|
2177
2449
|
</fo:table-cell>
|
2178
2450
|
</fo:table-row>
|
@@ -2196,9 +2468,12 @@
|
|
2196
2468
|
|
2197
2469
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2198
2470
|
|
2471
|
+
|
2199
2472
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2200
2473
|
|
2474
|
+
|
2201
2475
|
<xsl:value-of select="@reference"/>
|
2476
|
+
|
2202
2477
|
</fo:basic-link>
|
2203
2478
|
</fo:inline>
|
2204
2479
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -2206,7 +2481,11 @@
|
|
2206
2481
|
<xsl:apply-templates/>
|
2207
2482
|
</fo:inline>
|
2208
2483
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2209
|
-
<fo:block-container
|
2484
|
+
<fo:block-container>
|
2485
|
+
|
2486
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2487
|
+
|
2488
|
+
|
2210
2489
|
<xsl:if test="parent::*[local-name() = 'note']">
|
2211
2490
|
<xsl:attribute name="margin-left">
|
2212
2491
|
<xsl:choose>
|
@@ -2216,8 +2495,11 @@
|
|
2216
2495
|
</xsl:attribute>
|
2217
2496
|
|
2218
2497
|
</xsl:if>
|
2219
|
-
<fo:block-container
|
2220
|
-
|
2498
|
+
<fo:block-container>
|
2499
|
+
|
2500
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2501
|
+
|
2502
|
+
|
2221
2503
|
<xsl:variable name="parent" select="local-name(..)"/>
|
2222
2504
|
|
2223
2505
|
<xsl:variable name="key_iso">
|
@@ -2231,9 +2513,12 @@
|
|
2231
2513
|
<fo:block margin-bottom="12pt" text-align="left">
|
2232
2514
|
|
2233
2515
|
<xsl:variable name="title-where">
|
2234
|
-
|
2235
|
-
|
2236
|
-
|
2516
|
+
|
2517
|
+
|
2518
|
+
<xsl:call-template name="getTitle">
|
2519
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2520
|
+
</xsl:call-template>
|
2521
|
+
|
2237
2522
|
</xsl:variable>
|
2238
2523
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2239
2524
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -2249,9 +2534,12 @@
|
|
2249
2534
|
|
2250
2535
|
|
2251
2536
|
<xsl:variable name="title-where">
|
2252
|
-
|
2253
|
-
|
2254
|
-
|
2537
|
+
|
2538
|
+
|
2539
|
+
<xsl:call-template name="getTitle">
|
2540
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2541
|
+
</xsl:call-template>
|
2542
|
+
|
2255
2543
|
</xsl:variable>
|
2256
2544
|
<xsl:value-of select="$title-where"/>
|
2257
2545
|
</fo:block>
|
@@ -2262,9 +2550,12 @@
|
|
2262
2550
|
|
2263
2551
|
|
2264
2552
|
<xsl:variable name="title-key">
|
2265
|
-
|
2266
|
-
|
2267
|
-
|
2553
|
+
|
2554
|
+
|
2555
|
+
<xsl:call-template name="getTitle">
|
2556
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2557
|
+
</xsl:call-template>
|
2558
|
+
|
2268
2559
|
</xsl:variable>
|
2269
2560
|
<xsl:value-of select="$title-key"/>
|
2270
2561
|
</fo:block>
|
@@ -2304,7 +2595,20 @@
|
|
2304
2595
|
</xsl:choose>
|
2305
2596
|
<!-- create virtual html table for dl/[dt and dd] -->
|
2306
2597
|
<xsl:variable name="html-table">
|
2307
|
-
<xsl:variable name="
|
2598
|
+
<xsl:variable name="doc_ns">
|
2599
|
+
|
2600
|
+
</xsl:variable>
|
2601
|
+
<xsl:variable name="ns">
|
2602
|
+
<xsl:choose>
|
2603
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2604
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2605
|
+
</xsl:when>
|
2606
|
+
<xsl:otherwise>
|
2607
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2608
|
+
</xsl:otherwise>
|
2609
|
+
</xsl:choose>
|
2610
|
+
</xsl:variable>
|
2611
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2308
2612
|
<xsl:element name="{$ns}:table">
|
2309
2613
|
<tbody>
|
2310
2614
|
<xsl:apply-templates mode="dl"/>
|
@@ -2464,6 +2768,7 @@
|
|
2464
2768
|
|
2465
2769
|
|
2466
2770
|
|
2771
|
+
|
2467
2772
|
<xsl:apply-templates/>
|
2468
2773
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2469
2774
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2517,6 +2822,7 @@
|
|
2517
2822
|
</fo:inline>
|
2518
2823
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
2519
2824
|
<fo:inline font-weight="bold">
|
2825
|
+
|
2520
2826
|
<xsl:apply-templates/>
|
2521
2827
|
</fo:inline>
|
2522
2828
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
@@ -2530,18 +2836,18 @@
|
|
2530
2836
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2531
2837
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2532
2838
|
<xsl:variable name="_font-size">
|
2533
|
-
|
2534
|
-
|
2535
|
-
|
2536
2839
|
|
2537
2840
|
|
2538
2841
|
|
2539
2842
|
|
2540
2843
|
|
2541
2844
|
|
2542
|
-
|
2543
2845
|
|
2544
|
-
|
2846
|
+
|
2847
|
+
|
2848
|
+
|
2849
|
+
|
2850
|
+
|
2545
2851
|
|
2546
2852
|
|
2547
2853
|
</xsl:variable>
|
@@ -2845,7 +3151,18 @@
|
|
2845
3151
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
2846
3152
|
</xsl:apply-templates>
|
2847
3153
|
</xsl:template><xsl:template name="getLang">
|
2848
|
-
<xsl:variable name="
|
3154
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3155
|
+
<xsl:variable name="language">
|
3156
|
+
<xsl:choose>
|
3157
|
+
<xsl:when test="$language_current != ''">
|
3158
|
+
<xsl:value-of select="$language_current"/>
|
3159
|
+
</xsl:when>
|
3160
|
+
<xsl:otherwise>
|
3161
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3162
|
+
</xsl:otherwise>
|
3163
|
+
</xsl:choose>
|
3164
|
+
</xsl:variable>
|
3165
|
+
|
2849
3166
|
<xsl:choose>
|
2850
3167
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
2851
3168
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -2879,7 +3196,8 @@
|
|
2879
3196
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2880
3197
|
<xsl:value-of select="substring($str, 2)"/>
|
2881
3198
|
</xsl:template><xsl:template match="mathml:math">
|
2882
|
-
<fo:inline font-family="
|
3199
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3200
|
+
|
2883
3201
|
<xsl:variable name="mathml">
|
2884
3202
|
<xsl:apply-templates select="." mode="mathml"/>
|
2885
3203
|
</xsl:variable>
|
@@ -2909,6 +3227,7 @@
|
|
2909
3227
|
</xsl:choose>
|
2910
3228
|
</xsl:variable>
|
2911
3229
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3230
|
+
|
2912
3231
|
<xsl:choose>
|
2913
3232
|
<xsl:when test="$target = ''">
|
2914
3233
|
<xsl:apply-templates/>
|
@@ -2962,10 +3281,14 @@
|
|
2962
3281
|
</fo:inline>
|
2963
3282
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
2964
3283
|
<xsl:variable name="title-modified">
|
2965
|
-
|
2966
|
-
|
2967
|
-
|
3284
|
+
|
3285
|
+
|
3286
|
+
<xsl:call-template name="getTitle">
|
3287
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
3288
|
+
</xsl:call-template>
|
3289
|
+
|
2968
3290
|
</xsl:variable>
|
3291
|
+
|
2969
3292
|
<xsl:choose>
|
2970
3293
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
2971
3294
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -2973,7 +3296,7 @@
|
|
2973
3296
|
<xsl:apply-templates/>
|
2974
3297
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2975
3298
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2976
|
-
|
3299
|
+
|
2977
3300
|
<xsl:apply-templates/>
|
2978
3301
|
</fo:basic-link>
|
2979
3302
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
@@ -3026,6 +3349,8 @@
|
|
3026
3349
|
|
3027
3350
|
|
3028
3351
|
|
3352
|
+
|
3353
|
+
|
3029
3354
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3030
3355
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3031
3356
|
</fo:inline>
|
@@ -3118,7 +3443,8 @@
|
|
3118
3443
|
</fo:inline>
|
3119
3444
|
</xsl:if>
|
3120
3445
|
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3121
|
-
<fo:block-container id="{@id}">
|
3446
|
+
<fo:block-container id="{@id}">
|
3447
|
+
|
3122
3448
|
<fo:block>
|
3123
3449
|
<xsl:apply-templates/>
|
3124
3450
|
</fo:block>
|
@@ -3169,7 +3495,7 @@
|
|
3169
3495
|
<xsl:apply-templates mode="bookmarks"/>
|
3170
3496
|
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3171
3497
|
<xsl:apply-templates select="."/>
|
3172
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3498
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3173
3499
|
<xsl:apply-templates mode="bookmarks"/>
|
3174
3500
|
</xsl:template><xsl:template name="addBookmarks">
|
3175
3501
|
<xsl:param name="contents"/>
|
@@ -3183,18 +3509,9 @@
|
|
3183
3509
|
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3184
3510
|
<fo:bookmark-title>
|
3185
3511
|
<xsl:variable name="bookmark-title_">
|
3186
|
-
<xsl:
|
3187
|
-
<xsl:
|
3188
|
-
|
3189
|
-
|
3190
|
-
</xsl:when>
|
3191
|
-
<xsl:when test="@lang = 'fr'">
|
3192
|
-
|
3193
|
-
|
3194
|
-
</xsl:when>
|
3195
|
-
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3196
|
-
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3197
|
-
</xsl:choose>
|
3512
|
+
<xsl:call-template name="getLangVersion">
|
3513
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3514
|
+
</xsl:call-template>
|
3198
3515
|
</xsl:variable>
|
3199
3516
|
<xsl:choose>
|
3200
3517
|
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
@@ -3236,6 +3553,20 @@
|
|
3236
3553
|
|
3237
3554
|
</fo:bookmark-tree>
|
3238
3555
|
</xsl:if>
|
3556
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3557
|
+
<xsl:param name="lang"/>
|
3558
|
+
<xsl:choose>
|
3559
|
+
<xsl:when test="$lang = 'en'">
|
3560
|
+
|
3561
|
+
|
3562
|
+
</xsl:when>
|
3563
|
+
<xsl:when test="$lang = 'fr'">
|
3564
|
+
|
3565
|
+
|
3566
|
+
</xsl:when>
|
3567
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3568
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3569
|
+
</xsl:choose>
|
3239
3570
|
</xsl:template><xsl:template match="item" mode="bookmark">
|
3240
3571
|
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3241
3572
|
<fo:bookmark-title>
|
@@ -3254,7 +3585,7 @@
|
|
3254
3585
|
<xsl:if test="nist:dl">
|
3255
3586
|
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
3256
3587
|
</xsl:if>
|
3257
|
-
|
3588
|
+
|
3258
3589
|
<xsl:apply-templates/>
|
3259
3590
|
</fo:block>
|
3260
3591
|
</xsl:if>
|
@@ -3841,9 +4172,12 @@
|
|
3841
4172
|
</fo:block>
|
3842
4173
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
3843
4174
|
<xsl:variable name="title-deprecated">
|
3844
|
-
|
3845
|
-
|
3846
|
-
|
4175
|
+
|
4176
|
+
|
4177
|
+
<xsl:call-template name="getTitle">
|
4178
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
4179
|
+
</xsl:call-template>
|
4180
|
+
|
3847
4181
|
</xsl:variable>
|
3848
4182
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
3849
4183
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -3889,13 +4223,14 @@
|
|
3889
4223
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3890
4224
|
<fo:block>
|
3891
4225
|
<xsl:call-template name="setId"/>
|
4226
|
+
|
3892
4227
|
<xsl:apply-templates/>
|
3893
4228
|
</fo:block>
|
3894
4229
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
3895
4230
|
<fo:block id="{@id}">
|
3896
4231
|
<xsl:apply-templates/>
|
3897
4232
|
</fo:block>
|
3898
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
4233
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
3899
4234
|
|
3900
4235
|
<fo:block break-after="page"/>
|
3901
4236
|
|
@@ -3926,6 +4261,7 @@
|
|
3926
4261
|
</xsl:choose>
|
3927
4262
|
</xsl:attribute>
|
3928
4263
|
|
4264
|
+
|
3929
4265
|
<fo:block-container margin-left="0mm">
|
3930
4266
|
<fo:block>
|
3931
4267
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -3953,7 +4289,10 @@
|
|
3953
4289
|
<fo:table-column column-width="107mm"/>
|
3954
4290
|
<fo:table-column column-width="15mm"/>
|
3955
4291
|
<fo:table-body>
|
3956
|
-
<fo:table-row
|
4292
|
+
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
|
4293
|
+
|
4294
|
+
<xsl:attribute name="font-family">Arial</xsl:attribute>
|
4295
|
+
|
3957
4296
|
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
3958
4297
|
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
3959
4298
|
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
@@ -3971,6 +4310,10 @@
|
|
3971
4310
|
<fo:block><xsl:apply-templates/></fo:block>
|
3972
4311
|
</fo:table-cell>
|
3973
4312
|
</xsl:template><xsl:template name="processBibitem">
|
4313
|
+
|
4314
|
+
|
4315
|
+
<!-- end BIPM bibitem processing-->
|
4316
|
+
|
3974
4317
|
|
3975
4318
|
|
3976
4319
|
|
@@ -4111,6 +4454,7 @@
|
|
4111
4454
|
|
4112
4455
|
|
4113
4456
|
|
4457
|
+
|
4114
4458
|
|
4115
4459
|
</xsl:variable>
|
4116
4460
|
<xsl:choose>
|
@@ -4125,6 +4469,7 @@
|
|
4125
4469
|
<dc:creator>
|
4126
4470
|
|
4127
4471
|
|
4472
|
+
|
4128
4473
|
<xsl:for-each select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
4129
4474
|
<xsl:value-of select="*[local-name() = 'person']/*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
4130
4475
|
<xsl:if test="position() != last()">; </xsl:if>
|
@@ -4139,6 +4484,7 @@
|
|
4139
4484
|
<xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
4140
4485
|
|
4141
4486
|
|
4487
|
+
|
4142
4488
|
</xsl:variable>
|
4143
4489
|
<xsl:value-of select="normalize-space($abstract)"/>
|
4144
4490
|
</dc:description>
|
@@ -4210,13 +4556,22 @@
|
|
4210
4556
|
</xsl:template><xsl:template name="split">
|
4211
4557
|
<xsl:param name="pText" select="."/>
|
4212
4558
|
<xsl:param name="sep" select="','"/>
|
4559
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
4213
4560
|
<xsl:if test="string-length($pText) >0">
|
4214
4561
|
<item>
|
4215
|
-
<xsl:
|
4562
|
+
<xsl:choose>
|
4563
|
+
<xsl:when test="$normalize-space = 'true'">
|
4564
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
4565
|
+
</xsl:when>
|
4566
|
+
<xsl:otherwise>
|
4567
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
4568
|
+
</xsl:otherwise>
|
4569
|
+
</xsl:choose>
|
4216
4570
|
</item>
|
4217
4571
|
<xsl:call-template name="split">
|
4218
4572
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
4219
4573
|
<xsl:with-param name="sep" select="$sep"/>
|
4574
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
4220
4575
|
</xsl:call-template>
|
4221
4576
|
</xsl:if>
|
4222
4577
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -4282,4 +4637,23 @@
|
|
4282
4637
|
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4283
4638
|
</xsl:call-template>
|
4284
4639
|
</xsl:if>
|
4640
|
+
</xsl:template><xsl:template name="repeat">
|
4641
|
+
<xsl:param name="char" select="'*'"/>
|
4642
|
+
<xsl:param name="count"/>
|
4643
|
+
<xsl:if test="$count > 0">
|
4644
|
+
<xsl:value-of select="$char"/>
|
4645
|
+
<xsl:call-template name="repeat">
|
4646
|
+
<xsl:with-param name="char" select="$char"/>
|
4647
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
4648
|
+
</xsl:call-template>
|
4649
|
+
</xsl:if>
|
4650
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
4651
|
+
<xsl:param name="key"/>
|
4652
|
+
|
4653
|
+
<xsl:variable name="curr_lang">
|
4654
|
+
<xsl:call-template name="getLang"/>
|
4655
|
+
</xsl:variable>
|
4656
|
+
|
4657
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4658
|
+
|
4285
4659
|
</xsl:template></xsl:stylesheet>
|