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
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
|
|
@@ -1680,7 +1693,7 @@
|
|
1680
1693
|
<xsl:number format="1."/>
|
1681
1694
|
</xsl:when>
|
1682
1695
|
<xsl:when test="../@type = 'arabic'">
|
1683
|
-
<xsl:number format="a)"/>
|
1696
|
+
<xsl:number format="a)" lang="en"/>
|
1684
1697
|
</xsl:when>
|
1685
1698
|
<xsl:when test="../@type = 'alphabet'">
|
1686
1699
|
<xsl:number format="1)"/>
|
@@ -1689,7 +1702,7 @@
|
|
1689
1702
|
<xsl:number format="i)"/>
|
1690
1703
|
</xsl:when>
|
1691
1704
|
<xsl:when test="../@type = 'alphabet_upper'">
|
1692
|
-
<xsl:number format="A)"/>
|
1705
|
+
<xsl:number format="A)" lang="en"/>
|
1693
1706
|
</xsl:when>
|
1694
1707
|
<xsl:when test="ancestor::*[nist:annex]">
|
1695
1708
|
<!-- <xsl:variable name="level">
|
@@ -1697,7 +1710,7 @@
|
|
1697
1710
|
</xsl:variable> -->
|
1698
1711
|
<xsl:choose>
|
1699
1712
|
<xsl:when test="$level = 1">
|
1700
|
-
<xsl:number format="a)"/>
|
1713
|
+
<xsl:number format="a)" lang="en"/>
|
1701
1714
|
</xsl:when>
|
1702
1715
|
<xsl:when test="$level = 2">
|
1703
1716
|
<xsl:number format="i)"/>
|
@@ -1789,7 +1802,7 @@
|
|
1789
1802
|
</xsl:template>
|
1790
1803
|
|
1791
1804
|
<xsl:template match="mathml:math" priority="2">
|
1792
|
-
<fo:inline font-family="
|
1805
|
+
<fo:inline font-family="STIX Two Math">
|
1793
1806
|
<xsl:if test="ancestor::nist:table">
|
1794
1807
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1795
1808
|
</xsl:if>
|
@@ -2187,7 +2200,12 @@
|
|
2187
2200
|
|
2188
2201
|
|
2189
2202
|
</title-toc>
|
2190
|
-
<title-toc lang="fr">
|
2203
|
+
<title-toc lang="fr">
|
2204
|
+
|
2205
|
+
<xsl:text>Sommaire</xsl:text>
|
2206
|
+
|
2207
|
+
|
2208
|
+
</title-toc>
|
2191
2209
|
|
2192
2210
|
<title-toc lang="zh">Contents</title-toc>
|
2193
2211
|
|
@@ -2207,13 +2225,22 @@
|
|
2207
2225
|
<title-part lang="en">
|
2208
2226
|
|
2209
2227
|
|
2228
|
+
|
2210
2229
|
</title-part>
|
2211
2230
|
<title-part lang="fr">
|
2212
2231
|
|
2213
2232
|
|
2233
|
+
|
2214
2234
|
</title-part>
|
2215
2235
|
<title-part lang="zh">第 # 部分:</title-part>
|
2216
2236
|
|
2237
|
+
<title-subpart lang="en">
|
2238
|
+
|
2239
|
+
</title-subpart>
|
2240
|
+
<title-subpart lang="fr">
|
2241
|
+
|
2242
|
+
</title-subpart>
|
2243
|
+
|
2217
2244
|
<title-modified lang="en">modified</title-modified>
|
2218
2245
|
<title-modified lang="fr">modifiée</title-modified>
|
2219
2246
|
|
@@ -2275,10 +2302,19 @@
|
|
2275
2302
|
|
2276
2303
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
2277
2304
|
<xsl:param name="name"/>
|
2278
|
-
<xsl:
|
2279
|
-
|
2305
|
+
<xsl:param name="lang"/>
|
2306
|
+
<xsl:variable name="lang_">
|
2307
|
+
<xsl:choose>
|
2308
|
+
<xsl:when test="$lang != ''">
|
2309
|
+
<xsl:value-of select="$lang"/>
|
2310
|
+
</xsl:when>
|
2311
|
+
<xsl:otherwise>
|
2312
|
+
<xsl:call-template name="getLang"/>
|
2313
|
+
</xsl:otherwise>
|
2314
|
+
</xsl:choose>
|
2280
2315
|
</xsl:variable>
|
2281
|
-
<xsl:variable name="
|
2316
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
2317
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
2282
2318
|
<xsl:choose>
|
2283
2319
|
<xsl:when test="normalize-space($title_) != ''">
|
2284
2320
|
<xsl:value-of select="$title_"/>
|
@@ -2429,6 +2465,7 @@
|
|
2429
2465
|
|
2430
2466
|
|
2431
2467
|
|
2468
|
+
|
2432
2469
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
2433
2470
|
|
2434
2471
|
|
@@ -2468,6 +2505,7 @@
|
|
2468
2505
|
|
2469
2506
|
|
2470
2507
|
|
2508
|
+
|
2471
2509
|
</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">
|
2472
2510
|
|
2473
2511
|
|
@@ -2529,6 +2567,7 @@
|
|
2529
2567
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
2530
2568
|
|
2531
2569
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
2570
|
+
|
2532
2571
|
|
2533
2572
|
|
2534
2573
|
|
@@ -2648,6 +2687,10 @@
|
|
2648
2687
|
|
2649
2688
|
|
2650
2689
|
|
2690
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2691
|
+
<fo:block> </fo:block>
|
2692
|
+
</xsl:if> -->
|
2693
|
+
|
2651
2694
|
<!-- $namespace = 'iso' or -->
|
2652
2695
|
|
2653
2696
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -2678,11 +2721,14 @@
|
|
2678
2721
|
|
2679
2722
|
|
2680
2723
|
<xsl:variable name="colwidths">
|
2681
|
-
<xsl:
|
2682
|
-
<xsl:
|
2683
|
-
|
2684
|
-
|
2724
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2725
|
+
<xsl:call-template name="calculate-column-widths">
|
2726
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2727
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
2728
|
+
</xsl:call-template>
|
2729
|
+
</xsl:if>
|
2685
2730
|
</xsl:variable>
|
2731
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2686
2732
|
|
2687
2733
|
<!-- <xsl:variable name="colwidths2">
|
2688
2734
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2703,40 +2749,110 @@
|
|
2703
2749
|
|
2704
2750
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2705
2751
|
|
2752
|
+
|
2706
2753
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
2707
2754
|
|
2755
|
+
|
2756
|
+
|
2757
|
+
|
2708
2758
|
|
2709
2759
|
|
2760
|
+
<xsl:if test="ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface']">
|
2761
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2762
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2763
|
+
</xsl:if>
|
2764
|
+
<xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
|
2765
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2766
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
2767
|
+
</xsl:if>
|
2768
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2710
2769
|
|
2770
|
+
|
2711
2771
|
|
2712
|
-
|
2713
2772
|
|
2714
2773
|
|
2715
2774
|
|
2716
|
-
|
2717
|
-
|
2718
|
-
|
2775
|
+
|
2776
|
+
|
2777
|
+
|
2778
|
+
<xsl:variable name="table_attributes">
|
2779
|
+
<attribute name="table-layout">fixed</attribute>
|
2780
|
+
<attribute name="width">100%</attribute>
|
2781
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2782
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2719
2783
|
|
2720
2784
|
|
2721
2785
|
|
2722
2786
|
|
2723
|
-
|
2724
|
-
|
2725
|
-
|
2726
|
-
</xsl:if>
|
2727
|
-
<xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
|
2728
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2729
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
2730
|
-
</xsl:if>
|
2731
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2732
|
-
|
2787
|
+
|
2788
|
+
|
2789
|
+
|
2733
2790
|
|
2791
|
+
|
2734
2792
|
|
2793
|
+
</xsl:variable>
|
2794
|
+
|
2795
|
+
|
2796
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2735
2797
|
|
2798
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2799
|
+
<xsl:attribute name="{@name}">
|
2800
|
+
<xsl:value-of select="."/>
|
2801
|
+
</xsl:attribute>
|
2802
|
+
</xsl:for-each>
|
2736
2803
|
|
2804
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2805
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2806
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2807
|
+
</xsl:if>
|
2737
2808
|
|
2809
|
+
<xsl:choose>
|
2810
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2811
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
2812
|
+
<fo:table-column column-width="{@width}"/>
|
2813
|
+
</xsl:for-each>
|
2814
|
+
</xsl:when>
|
2815
|
+
<xsl:otherwise>
|
2816
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2817
|
+
<xsl:choose>
|
2818
|
+
<xsl:when test=". = 1 or . = 0">
|
2819
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2820
|
+
</xsl:when>
|
2821
|
+
<xsl:otherwise>
|
2822
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2823
|
+
</xsl:otherwise>
|
2824
|
+
</xsl:choose>
|
2825
|
+
</xsl:for-each>
|
2826
|
+
</xsl:otherwise>
|
2827
|
+
</xsl:choose>
|
2738
2828
|
|
2829
|
+
<xsl:choose>
|
2830
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
2831
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2832
|
+
</xsl:when>
|
2833
|
+
<xsl:otherwise>
|
2834
|
+
<xsl:apply-templates/>
|
2835
|
+
</xsl:otherwise>
|
2836
|
+
</xsl:choose>
|
2739
2837
|
|
2838
|
+
</fo:table>
|
2839
|
+
|
2840
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
2841
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2842
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2843
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2844
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2845
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
2846
|
+
</xsl:call-template>
|
2847
|
+
</xsl:for-each>
|
2848
|
+
|
2849
|
+
<!-- insert footer as table -->
|
2850
|
+
<!-- <fo:table>
|
2851
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
2852
|
+
<xsl:attribute name="{@name}">
|
2853
|
+
<xsl:value-of select="."/>
|
2854
|
+
</xsl:attribute>
|
2855
|
+
</xsl:for-each>
|
2740
2856
|
|
2741
2857
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2742
2858
|
<xsl:choose>
|
@@ -2748,17 +2864,7 @@
|
|
2748
2864
|
</xsl:otherwise>
|
2749
2865
|
</xsl:choose>
|
2750
2866
|
</xsl:for-each>
|
2751
|
-
|
2752
|
-
<xsl:choose>
|
2753
|
-
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
2754
|
-
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2755
|
-
</xsl:when>
|
2756
|
-
<xsl:otherwise>
|
2757
|
-
<xsl:apply-templates/>
|
2758
|
-
</xsl:otherwise>
|
2759
|
-
</xsl:choose>
|
2760
|
-
|
2761
|
-
</fo:table>
|
2867
|
+
</fo:table>-->
|
2762
2868
|
|
2763
2869
|
|
2764
2870
|
|
@@ -2769,6 +2875,7 @@
|
|
2769
2875
|
<xsl:if test="normalize-space() != ''">
|
2770
2876
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2771
2877
|
|
2878
|
+
|
2772
2879
|
<xsl:apply-templates/>
|
2773
2880
|
</fo:block>
|
2774
2881
|
</xsl:if>
|
@@ -2824,6 +2931,13 @@
|
|
2824
2931
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
2825
2932
|
<xsl:variable name="td_text">
|
2826
2933
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2934
|
+
|
2935
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2936
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
2937
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
2938
|
+
</xsl:for-each>
|
2939
|
+
</xsl:if> -->
|
2940
|
+
|
2827
2941
|
</xsl:variable>
|
2828
2942
|
<xsl:variable name="words">
|
2829
2943
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -2883,11 +2997,14 @@
|
|
2883
2997
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
2884
2998
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
2885
2999
|
<xsl:value-of select="@target"/>
|
3000
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
3001
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
3002
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
2886
3003
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
2887
3004
|
<xsl:param name="cols-count"/>
|
2888
3005
|
<!-- font-weight="bold" -->
|
2889
3006
|
<fo:table-header>
|
2890
|
-
|
3007
|
+
|
2891
3008
|
<xsl:apply-templates/>
|
2892
3009
|
</fo:table-header>
|
2893
3010
|
</xsl:template><xsl:template name="table-header-title">
|
@@ -2912,6 +3029,13 @@
|
|
2912
3029
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
2913
3030
|
<xsl:apply-templates/>
|
2914
3031
|
</xsl:template><xsl:template name="insertTableFooter">
|
3032
|
+
<xsl:param name="cols-count"/>
|
3033
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
3034
|
+
<fo:table-footer>
|
3035
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
3036
|
+
</fo:table-footer>
|
3037
|
+
</xsl:if>
|
3038
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
2915
3039
|
<xsl:param name="cols-count"/>
|
2916
3040
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2917
3041
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -2933,11 +3057,29 @@
|
|
2933
3057
|
<!-- fn will be processed inside 'note' processing -->
|
2934
3058
|
|
2935
3059
|
|
3060
|
+
|
3061
|
+
|
3062
|
+
|
3063
|
+
|
2936
3064
|
<!-- except gb -->
|
2937
3065
|
|
2938
3066
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2939
3067
|
|
2940
3068
|
|
3069
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
3070
|
+
<!-- empty, because notes show at page side in main sections -->
|
3071
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3072
|
+
<xsl:choose>
|
3073
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
3074
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3075
|
+
</xsl:when>
|
3076
|
+
<xsl:otherwise>
|
3077
|
+
<fo:block/>
|
3078
|
+
</xsl:otherwise>
|
3079
|
+
</xsl:choose>
|
3080
|
+
</xsl:if> -->
|
3081
|
+
|
3082
|
+
|
2941
3083
|
<!-- horizontal row separator -->
|
2942
3084
|
|
2943
3085
|
|
@@ -2951,6 +3093,107 @@
|
|
2951
3093
|
</fo:table-footer>
|
2952
3094
|
|
2953
3095
|
</xsl:if>
|
3096
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
3097
|
+
<xsl:param name="table_attributes"/>
|
3098
|
+
<xsl:param name="colwidths"/>
|
3099
|
+
<xsl:param name="colgroup"/>
|
3100
|
+
|
3101
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3102
|
+
|
3103
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3104
|
+
|
3105
|
+
<xsl:variable name="cols-count">
|
3106
|
+
<xsl:choose>
|
3107
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
3108
|
+
<xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
|
3109
|
+
</xsl:when>
|
3110
|
+
<xsl:otherwise>
|
3111
|
+
<xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
|
3112
|
+
</xsl:otherwise>
|
3113
|
+
</xsl:choose>
|
3114
|
+
</xsl:variable>
|
3115
|
+
|
3116
|
+
<fo:table keep-with-previous="always">
|
3117
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
3118
|
+
<xsl:choose>
|
3119
|
+
<xsl:when test="@name = 'border-top'">
|
3120
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
3121
|
+
</xsl:when>
|
3122
|
+
<xsl:when test="@name = 'border'">
|
3123
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
3124
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
3125
|
+
</xsl:when>
|
3126
|
+
<xsl:otherwise>
|
3127
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
3128
|
+
</xsl:otherwise>
|
3129
|
+
</xsl:choose>
|
3130
|
+
</xsl:for-each>
|
3131
|
+
|
3132
|
+
<xsl:choose>
|
3133
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
3134
|
+
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
3135
|
+
<fo:table-column column-width="{@width}"/>
|
3136
|
+
</xsl:for-each>
|
3137
|
+
</xsl:when>
|
3138
|
+
<xsl:otherwise>
|
3139
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
3140
|
+
<xsl:choose>
|
3141
|
+
<xsl:when test=". = 1 or . = 0">
|
3142
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
3143
|
+
</xsl:when>
|
3144
|
+
<xsl:otherwise>
|
3145
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
3146
|
+
</xsl:otherwise>
|
3147
|
+
</xsl:choose>
|
3148
|
+
</xsl:for-each>
|
3149
|
+
</xsl:otherwise>
|
3150
|
+
</xsl:choose>
|
3151
|
+
|
3152
|
+
<fo:table-body>
|
3153
|
+
<fo:table-row>
|
3154
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
3155
|
+
|
3156
|
+
|
3157
|
+
|
3158
|
+
<!-- fn will be processed inside 'note' processing -->
|
3159
|
+
|
3160
|
+
|
3161
|
+
|
3162
|
+
|
3163
|
+
|
3164
|
+
|
3165
|
+
|
3166
|
+
<!-- except gb -->
|
3167
|
+
|
3168
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3169
|
+
|
3170
|
+
|
3171
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3172
|
+
<xsl:choose>
|
3173
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
3174
|
+
show Note under table in preface (ex. abstract) sections
|
3175
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3176
|
+
</xsl:when>
|
3177
|
+
<xsl:otherwise>
|
3178
|
+
empty, because notes show at page side in main sections
|
3179
|
+
<fo:block/>
|
3180
|
+
</xsl:otherwise>
|
3181
|
+
</xsl:choose>
|
3182
|
+
</xsl:if> -->
|
3183
|
+
|
3184
|
+
|
3185
|
+
<!-- horizontal row separator -->
|
3186
|
+
|
3187
|
+
|
3188
|
+
<!-- fn processing -->
|
3189
|
+
<xsl:call-template name="fn_display"/>
|
3190
|
+
|
3191
|
+
</fo:table-cell>
|
3192
|
+
</fo:table-row>
|
3193
|
+
</fo:table-body>
|
3194
|
+
|
3195
|
+
</fo:table>
|
3196
|
+
</xsl:if>
|
2954
3197
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
2955
3198
|
|
2956
3199
|
<xsl:variable name="cols-count">
|
@@ -3006,8 +3249,12 @@
|
|
3006
3249
|
|
3007
3250
|
</xsl:if>
|
3008
3251
|
|
3009
|
-
|
3010
|
-
|
3252
|
+
|
3253
|
+
|
3254
|
+
|
3255
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3256
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
3257
|
+
</xsl:if> -->
|
3011
3258
|
|
3012
3259
|
<xsl:apply-templates/>
|
3013
3260
|
</fo:table-row>
|
@@ -3035,6 +3282,7 @@
|
|
3035
3282
|
|
3036
3283
|
|
3037
3284
|
|
3285
|
+
|
3038
3286
|
<xsl:if test="@colspan">
|
3039
3287
|
<xsl:attribute name="number-columns-spanned">
|
3040
3288
|
<xsl:value-of select="@colspan"/>
|
@@ -3074,7 +3322,7 @@
|
|
3074
3322
|
|
3075
3323
|
|
3076
3324
|
|
3077
|
-
|
3325
|
+
|
3078
3326
|
|
3079
3327
|
|
3080
3328
|
|
@@ -3085,6 +3333,7 @@
|
|
3085
3333
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
3086
3334
|
</xsl:if>
|
3087
3335
|
|
3336
|
+
|
3088
3337
|
<xsl:if test="@colspan">
|
3089
3338
|
<xsl:attribute name="number-columns-spanned">
|
3090
3339
|
<xsl:value-of select="@colspan"/>
|
@@ -3096,7 +3345,8 @@
|
|
3096
3345
|
</xsl:attribute>
|
3097
3346
|
</xsl:if>
|
3098
3347
|
<xsl:call-template name="display-align"/>
|
3099
|
-
<fo:block>
|
3348
|
+
<fo:block>
|
3349
|
+
|
3100
3350
|
<xsl:apply-templates/>
|
3101
3351
|
</fo:block>
|
3102
3352
|
</fo:table-cell>
|
@@ -3108,14 +3358,17 @@
|
|
3108
3358
|
|
3109
3359
|
|
3110
3360
|
|
3361
|
+
|
3362
|
+
|
3111
3363
|
<fo:inline padding-right="2mm">
|
3112
3364
|
|
3113
3365
|
|
3114
3366
|
|
3115
|
-
|
3367
|
+
|
3116
3368
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3117
3369
|
|
3118
3370
|
</fo:inline>
|
3371
|
+
|
3119
3372
|
<xsl:apply-templates mode="process"/>
|
3120
3373
|
</fo:block>
|
3121
3374
|
|
@@ -3139,6 +3392,7 @@
|
|
3139
3392
|
|
3140
3393
|
|
3141
3394
|
|
3395
|
+
|
3142
3396
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
3143
3397
|
|
3144
3398
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -3150,14 +3404,17 @@
|
|
3150
3404
|
|
3151
3405
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3152
3406
|
|
3407
|
+
|
3153
3408
|
<xsl:value-of select="@reference"/>
|
3154
3409
|
|
3410
|
+
|
3155
3411
|
</fo:inline>
|
3156
3412
|
<fo:inline>
|
3157
3413
|
|
3158
3414
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3159
3415
|
|
3160
|
-
<xsl:apply-templates/>
|
3416
|
+
<!-- <xsl:apply-templates /> -->
|
3417
|
+
<xsl:copy-of select="./node()"/>
|
3161
3418
|
</fo:inline>
|
3162
3419
|
</fo:block>
|
3163
3420
|
</xsl:if>
|
@@ -3194,7 +3451,20 @@
|
|
3194
3451
|
<xsl:variable name="following_dl_colwidths">
|
3195
3452
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
3196
3453
|
<xsl:variable name="html-table">
|
3197
|
-
<xsl:variable name="
|
3454
|
+
<xsl:variable name="doc_ns">
|
3455
|
+
|
3456
|
+
</xsl:variable>
|
3457
|
+
<xsl:variable name="ns">
|
3458
|
+
<xsl:choose>
|
3459
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
3460
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
3461
|
+
</xsl:when>
|
3462
|
+
<xsl:otherwise>
|
3463
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
3464
|
+
</xsl:otherwise>
|
3465
|
+
</xsl:choose>
|
3466
|
+
</xsl:variable>
|
3467
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3198
3468
|
<xsl:element name="{$ns}:table">
|
3199
3469
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
3200
3470
|
<tbody>
|
@@ -3259,7 +3529,8 @@
|
|
3259
3529
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3260
3530
|
</xsl:if>
|
3261
3531
|
|
3262
|
-
<xsl:apply-templates/>
|
3532
|
+
<!-- <xsl:apply-templates /> -->
|
3533
|
+
<xsl:copy-of select="./node()"/>
|
3263
3534
|
</fo:block>
|
3264
3535
|
</fo:table-cell>
|
3265
3536
|
</fo:table-row>
|
@@ -3283,9 +3554,12 @@
|
|
3283
3554
|
|
3284
3555
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3285
3556
|
|
3557
|
+
|
3286
3558
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
3287
3559
|
|
3560
|
+
|
3288
3561
|
<xsl:value-of select="@reference"/>
|
3562
|
+
|
3289
3563
|
</fo:basic-link>
|
3290
3564
|
</fo:inline>
|
3291
3565
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -3293,7 +3567,11 @@
|
|
3293
3567
|
<xsl:apply-templates/>
|
3294
3568
|
</fo:inline>
|
3295
3569
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
3296
|
-
<fo:block-container
|
3570
|
+
<fo:block-container>
|
3571
|
+
|
3572
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3573
|
+
|
3574
|
+
|
3297
3575
|
<xsl:if test="parent::*[local-name() = 'note']">
|
3298
3576
|
<xsl:attribute name="margin-left">
|
3299
3577
|
<xsl:choose>
|
@@ -3303,8 +3581,11 @@
|
|
3303
3581
|
</xsl:attribute>
|
3304
3582
|
|
3305
3583
|
</xsl:if>
|
3306
|
-
<fo:block-container
|
3307
|
-
|
3584
|
+
<fo:block-container>
|
3585
|
+
|
3586
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3587
|
+
|
3588
|
+
|
3308
3589
|
<xsl:variable name="parent" select="local-name(..)"/>
|
3309
3590
|
|
3310
3591
|
<xsl:variable name="key_iso">
|
@@ -3318,9 +3599,12 @@
|
|
3318
3599
|
<fo:block margin-bottom="12pt" text-align="left">
|
3319
3600
|
|
3320
3601
|
<xsl:variable name="title-where">
|
3321
|
-
|
3322
|
-
|
3323
|
-
|
3602
|
+
|
3603
|
+
|
3604
|
+
<xsl:call-template name="getTitle">
|
3605
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3606
|
+
</xsl:call-template>
|
3607
|
+
|
3324
3608
|
</xsl:variable>
|
3325
3609
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3326
3610
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -3336,9 +3620,12 @@
|
|
3336
3620
|
|
3337
3621
|
|
3338
3622
|
<xsl:variable name="title-where">
|
3339
|
-
|
3340
|
-
|
3341
|
-
|
3623
|
+
|
3624
|
+
|
3625
|
+
<xsl:call-template name="getTitle">
|
3626
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3627
|
+
</xsl:call-template>
|
3628
|
+
|
3342
3629
|
</xsl:variable>
|
3343
3630
|
<xsl:value-of select="$title-where"/>
|
3344
3631
|
</fo:block>
|
@@ -3349,9 +3636,12 @@
|
|
3349
3636
|
|
3350
3637
|
|
3351
3638
|
<xsl:variable name="title-key">
|
3352
|
-
|
3353
|
-
|
3354
|
-
|
3639
|
+
|
3640
|
+
|
3641
|
+
<xsl:call-template name="getTitle">
|
3642
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
3643
|
+
</xsl:call-template>
|
3644
|
+
|
3355
3645
|
</xsl:variable>
|
3356
3646
|
<xsl:value-of select="$title-key"/>
|
3357
3647
|
</fo:block>
|
@@ -3391,7 +3681,20 @@
|
|
3391
3681
|
</xsl:choose>
|
3392
3682
|
<!-- create virtual html table for dl/[dt and dd] -->
|
3393
3683
|
<xsl:variable name="html-table">
|
3394
|
-
<xsl:variable name="
|
3684
|
+
<xsl:variable name="doc_ns">
|
3685
|
+
|
3686
|
+
</xsl:variable>
|
3687
|
+
<xsl:variable name="ns">
|
3688
|
+
<xsl:choose>
|
3689
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
3690
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
3691
|
+
</xsl:when>
|
3692
|
+
<xsl:otherwise>
|
3693
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
3694
|
+
</xsl:otherwise>
|
3695
|
+
</xsl:choose>
|
3696
|
+
</xsl:variable>
|
3697
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3395
3698
|
<xsl:element name="{$ns}:table">
|
3396
3699
|
<tbody>
|
3397
3700
|
<xsl:apply-templates mode="dl"/>
|
@@ -3551,6 +3854,7 @@
|
|
3551
3854
|
|
3552
3855
|
|
3553
3856
|
|
3857
|
+
|
3554
3858
|
<xsl:apply-templates/>
|
3555
3859
|
<!-- <xsl:if test="$namespace = 'gb'">
|
3556
3860
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -3604,6 +3908,7 @@
|
|
3604
3908
|
</fo:inline>
|
3605
3909
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
3606
3910
|
<fo:inline font-weight="bold">
|
3911
|
+
|
3607
3912
|
<xsl:apply-templates/>
|
3608
3913
|
</fo:inline>
|
3609
3914
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
@@ -3617,18 +3922,18 @@
|
|
3617
3922
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
3618
3923
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
3619
3924
|
<xsl:variable name="_font-size">
|
3620
|
-
|
3621
|
-
|
3622
|
-
|
3623
3925
|
|
3624
3926
|
|
3625
3927
|
|
3626
3928
|
|
3627
3929
|
|
3628
3930
|
|
3629
|
-
|
3630
3931
|
|
3631
|
-
|
3932
|
+
|
3933
|
+
|
3934
|
+
|
3935
|
+
|
3936
|
+
|
3632
3937
|
|
3633
3938
|
|
3634
3939
|
</xsl:variable>
|
@@ -3932,7 +4237,18 @@
|
|
3932
4237
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
3933
4238
|
</xsl:apply-templates>
|
3934
4239
|
</xsl:template><xsl:template name="getLang">
|
3935
|
-
<xsl:variable name="
|
4240
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4241
|
+
<xsl:variable name="language">
|
4242
|
+
<xsl:choose>
|
4243
|
+
<xsl:when test="$language_current != ''">
|
4244
|
+
<xsl:value-of select="$language_current"/>
|
4245
|
+
</xsl:when>
|
4246
|
+
<xsl:otherwise>
|
4247
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
4248
|
+
</xsl:otherwise>
|
4249
|
+
</xsl:choose>
|
4250
|
+
</xsl:variable>
|
4251
|
+
|
3936
4252
|
<xsl:choose>
|
3937
4253
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
3938
4254
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -3966,7 +4282,8 @@
|
|
3966
4282
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3967
4283
|
<xsl:value-of select="substring($str, 2)"/>
|
3968
4284
|
</xsl:template><xsl:template match="mathml:math">
|
3969
|
-
<fo:inline font-family="
|
4285
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
4286
|
+
|
3970
4287
|
<xsl:variable name="mathml">
|
3971
4288
|
<xsl:apply-templates select="." mode="mathml"/>
|
3972
4289
|
</xsl:variable>
|
@@ -3996,6 +4313,7 @@
|
|
3996
4313
|
</xsl:choose>
|
3997
4314
|
</xsl:variable>
|
3998
4315
|
<fo:inline xsl:use-attribute-sets="link-style">
|
4316
|
+
|
3999
4317
|
<xsl:choose>
|
4000
4318
|
<xsl:when test="$target = ''">
|
4001
4319
|
<xsl:apply-templates/>
|
@@ -4049,10 +4367,14 @@
|
|
4049
4367
|
</fo:inline>
|
4050
4368
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
4051
4369
|
<xsl:variable name="title-modified">
|
4052
|
-
|
4053
|
-
|
4054
|
-
|
4370
|
+
|
4371
|
+
|
4372
|
+
<xsl:call-template name="getTitle">
|
4373
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
4374
|
+
</xsl:call-template>
|
4375
|
+
|
4055
4376
|
</xsl:variable>
|
4377
|
+
|
4056
4378
|
<xsl:choose>
|
4057
4379
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
4058
4380
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -4060,7 +4382,7 @@
|
|
4060
4382
|
<xsl:apply-templates/>
|
4061
4383
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
4062
4384
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
4063
|
-
|
4385
|
+
|
4064
4386
|
<xsl:apply-templates/>
|
4065
4387
|
</fo:basic-link>
|
4066
4388
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
@@ -4113,6 +4435,8 @@
|
|
4113
4435
|
|
4114
4436
|
|
4115
4437
|
|
4438
|
+
|
4439
|
+
|
4116
4440
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
4117
4441
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4118
4442
|
</fo:inline>
|
@@ -4205,7 +4529,8 @@
|
|
4205
4529
|
</fo:inline>
|
4206
4530
|
</xsl:if>
|
4207
4531
|
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
4208
|
-
<fo:block-container id="{@id}">
|
4532
|
+
<fo:block-container id="{@id}">
|
4533
|
+
|
4209
4534
|
<fo:block>
|
4210
4535
|
<xsl:apply-templates/>
|
4211
4536
|
</fo:block>
|
@@ -4256,7 +4581,7 @@
|
|
4256
4581
|
<xsl:apply-templates mode="bookmarks"/>
|
4257
4582
|
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
4258
4583
|
<xsl:apply-templates select="."/>
|
4259
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4584
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4260
4585
|
<xsl:apply-templates mode="bookmarks"/>
|
4261
4586
|
</xsl:template><xsl:template name="addBookmarks">
|
4262
4587
|
<xsl:param name="contents"/>
|
@@ -4270,18 +4595,9 @@
|
|
4270
4595
|
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
4271
4596
|
<fo:bookmark-title>
|
4272
4597
|
<xsl:variable name="bookmark-title_">
|
4273
|
-
<xsl:
|
4274
|
-
<xsl:
|
4275
|
-
|
4276
|
-
|
4277
|
-
</xsl:when>
|
4278
|
-
<xsl:when test="@lang = 'fr'">
|
4279
|
-
|
4280
|
-
|
4281
|
-
</xsl:when>
|
4282
|
-
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
4283
|
-
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
4284
|
-
</xsl:choose>
|
4598
|
+
<xsl:call-template name="getLangVersion">
|
4599
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4600
|
+
</xsl:call-template>
|
4285
4601
|
</xsl:variable>
|
4286
4602
|
<xsl:choose>
|
4287
4603
|
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
@@ -4343,13 +4659,27 @@
|
|
4343
4659
|
</fo:bookmark>
|
4344
4660
|
</xsl:for-each>
|
4345
4661
|
</fo:bookmark>
|
4346
|
-
</xsl:if>
|
4662
|
+
</xsl:if>
|
4347
4663
|
|
4348
4664
|
|
4349
4665
|
|
4350
4666
|
|
4351
4667
|
</fo:bookmark-tree>
|
4352
4668
|
</xsl:if>
|
4669
|
+
</xsl:template><xsl:template name="getLangVersion">
|
4670
|
+
<xsl:param name="lang"/>
|
4671
|
+
<xsl:choose>
|
4672
|
+
<xsl:when test="$lang = 'en'">
|
4673
|
+
|
4674
|
+
|
4675
|
+
</xsl:when>
|
4676
|
+
<xsl:when test="$lang = 'fr'">
|
4677
|
+
|
4678
|
+
|
4679
|
+
</xsl:when>
|
4680
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
4681
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
4682
|
+
</xsl:choose>
|
4353
4683
|
</xsl:template><xsl:template match="item" mode="bookmark">
|
4354
4684
|
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
4355
4685
|
<fo:bookmark-title>
|
@@ -4368,7 +4698,7 @@
|
|
4368
4698
|
<xsl:if test="nist:dl">
|
4369
4699
|
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
4370
4700
|
</xsl:if>
|
4371
|
-
|
4701
|
+
|
4372
4702
|
<xsl:apply-templates/>
|
4373
4703
|
</fo:block>
|
4374
4704
|
</xsl:if>
|
@@ -4953,9 +5283,12 @@
|
|
4953
5283
|
</fo:block>
|
4954
5284
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
4955
5285
|
<xsl:variable name="title-deprecated">
|
4956
|
-
|
4957
|
-
|
4958
|
-
|
5286
|
+
|
5287
|
+
|
5288
|
+
<xsl:call-template name="getTitle">
|
5289
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
5290
|
+
</xsl:call-template>
|
5291
|
+
|
4959
5292
|
</xsl:variable>
|
4960
5293
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
4961
5294
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -5001,13 +5334,14 @@
|
|
5001
5334
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
5002
5335
|
<fo:block>
|
5003
5336
|
<xsl:call-template name="setId"/>
|
5337
|
+
|
5004
5338
|
<xsl:apply-templates/>
|
5005
5339
|
</fo:block>
|
5006
5340
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
5007
5341
|
<fo:block id="{@id}">
|
5008
5342
|
<xsl:apply-templates/>
|
5009
5343
|
</fo:block>
|
5010
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
5344
|
+
</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']">
|
5011
5345
|
|
5012
5346
|
<fo:block break-after="page"/>
|
5013
5347
|
|
@@ -5038,6 +5372,7 @@
|
|
5038
5372
|
</xsl:choose>
|
5039
5373
|
</xsl:attribute>
|
5040
5374
|
|
5375
|
+
|
5041
5376
|
<fo:block-container margin-left="0mm">
|
5042
5377
|
<fo:block>
|
5043
5378
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -5065,7 +5400,10 @@
|
|
5065
5400
|
<fo:table-column column-width="107mm"/>
|
5066
5401
|
<fo:table-column column-width="15mm"/>
|
5067
5402
|
<fo:table-body>
|
5068
|
-
<fo:table-row
|
5403
|
+
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
|
5404
|
+
|
5405
|
+
<xsl:attribute name="font-family">Arial</xsl:attribute>
|
5406
|
+
|
5069
5407
|
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
5070
5408
|
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
5071
5409
|
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
@@ -5083,6 +5421,10 @@
|
|
5083
5421
|
<fo:block><xsl:apply-templates/></fo:block>
|
5084
5422
|
</fo:table-cell>
|
5085
5423
|
</xsl:template><xsl:template name="processBibitem">
|
5424
|
+
|
5425
|
+
|
5426
|
+
<!-- end BIPM bibitem processing-->
|
5427
|
+
|
5086
5428
|
|
5087
5429
|
|
5088
5430
|
|
@@ -5223,6 +5565,7 @@
|
|
5223
5565
|
|
5224
5566
|
|
5225
5567
|
|
5568
|
+
|
5226
5569
|
|
5227
5570
|
</xsl:variable>
|
5228
5571
|
<xsl:choose>
|
@@ -5237,6 +5580,7 @@
|
|
5237
5580
|
<dc:creator>
|
5238
5581
|
|
5239
5582
|
|
5583
|
+
|
5240
5584
|
<xsl:for-each select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
5241
5585
|
<xsl:value-of select="*[local-name() = 'person']/*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
5242
5586
|
<xsl:if test="position() != last()">; </xsl:if>
|
@@ -5251,6 +5595,7 @@
|
|
5251
5595
|
<xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
5252
5596
|
|
5253
5597
|
|
5598
|
+
|
5254
5599
|
</xsl:variable>
|
5255
5600
|
<xsl:value-of select="normalize-space($abstract)"/>
|
5256
5601
|
</dc:description>
|
@@ -5322,13 +5667,22 @@
|
|
5322
5667
|
</xsl:template><xsl:template name="split">
|
5323
5668
|
<xsl:param name="pText" select="."/>
|
5324
5669
|
<xsl:param name="sep" select="','"/>
|
5670
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
5325
5671
|
<xsl:if test="string-length($pText) >0">
|
5326
5672
|
<item>
|
5327
|
-
<xsl:
|
5673
|
+
<xsl:choose>
|
5674
|
+
<xsl:when test="$normalize-space = 'true'">
|
5675
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
5676
|
+
</xsl:when>
|
5677
|
+
<xsl:otherwise>
|
5678
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
5679
|
+
</xsl:otherwise>
|
5680
|
+
</xsl:choose>
|
5328
5681
|
</item>
|
5329
5682
|
<xsl:call-template name="split">
|
5330
5683
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
5331
5684
|
<xsl:with-param name="sep" select="$sep"/>
|
5685
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
5332
5686
|
</xsl:call-template>
|
5333
5687
|
</xsl:if>
|
5334
5688
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -5394,4 +5748,23 @@
|
|
5394
5748
|
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
5395
5749
|
</xsl:call-template>
|
5396
5750
|
</xsl:if>
|
5751
|
+
</xsl:template><xsl:template name="repeat">
|
5752
|
+
<xsl:param name="char" select="'*'"/>
|
5753
|
+
<xsl:param name="count"/>
|
5754
|
+
<xsl:if test="$count > 0">
|
5755
|
+
<xsl:value-of select="$char"/>
|
5756
|
+
<xsl:call-template name="repeat">
|
5757
|
+
<xsl:with-param name="char" select="$char"/>
|
5758
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
5759
|
+
</xsl:call-template>
|
5760
|
+
</xsl:if>
|
5761
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
5762
|
+
<xsl:param name="key"/>
|
5763
|
+
|
5764
|
+
<xsl:variable name="curr_lang">
|
5765
|
+
<xsl:call-template name="getLang"/>
|
5766
|
+
</xsl:variable>
|
5767
|
+
|
5768
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5769
|
+
|
5397
5770
|
</xsl:template></xsl:stylesheet>
|