metanorma-nist 1.2.3 → 1.2.8
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 +4 -11
- data/lib/asciidoctor/nist/cleanup.rb +1 -0
- data/lib/asciidoctor/nist/converter.rb +2 -0
- data/lib/asciidoctor/nist/isodoc.rng +27 -50
- data/lib/asciidoctor/nist/nist.rng +9 -1
- 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/metadata_id.rb +2 -0
- data/lib/isodoc/nist/nist.cswp.xsl +546 -88
- data/lib/isodoc/nist/nist.sp.xsl +578 -93
- 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 +2 -2
- metadata +10 -9
- 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
|
|
@@ -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>
|
@@ -2173,6 +2186,12 @@
|
|
2173
2186
|
|
2174
2187
|
</title-edition>
|
2175
2188
|
|
2189
|
+
<title-edition lang="fr">
|
2190
|
+
|
2191
|
+
<xsl:text>Édition </xsl:text>
|
2192
|
+
|
2193
|
+
</title-edition>
|
2194
|
+
|
2176
2195
|
|
2177
2196
|
<title-toc lang="en">
|
2178
2197
|
|
@@ -2181,7 +2200,12 @@
|
|
2181
2200
|
|
2182
2201
|
|
2183
2202
|
</title-toc>
|
2184
|
-
<title-toc lang="fr">
|
2203
|
+
<title-toc lang="fr">
|
2204
|
+
|
2205
|
+
<xsl:text>Sommaire</xsl:text>
|
2206
|
+
|
2207
|
+
|
2208
|
+
</title-toc>
|
2185
2209
|
|
2186
2210
|
<title-toc lang="zh">Contents</title-toc>
|
2187
2211
|
|
@@ -2201,13 +2225,22 @@
|
|
2201
2225
|
<title-part lang="en">
|
2202
2226
|
|
2203
2227
|
|
2228
|
+
|
2204
2229
|
</title-part>
|
2205
2230
|
<title-part lang="fr">
|
2206
2231
|
|
2207
2232
|
|
2233
|
+
|
2208
2234
|
</title-part>
|
2209
2235
|
<title-part lang="zh">第 # 部分:</title-part>
|
2210
2236
|
|
2237
|
+
<title-subpart lang="en">
|
2238
|
+
|
2239
|
+
</title-subpart>
|
2240
|
+
<title-subpart lang="fr">
|
2241
|
+
|
2242
|
+
</title-subpart>
|
2243
|
+
|
2211
2244
|
<title-modified lang="en">modified</title-modified>
|
2212
2245
|
<title-modified lang="fr">modifiée</title-modified>
|
2213
2246
|
|
@@ -2269,10 +2302,19 @@
|
|
2269
2302
|
|
2270
2303
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
2271
2304
|
<xsl:param name="name"/>
|
2272
|
-
<xsl:
|
2273
|
-
|
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>
|
2274
2315
|
</xsl:variable>
|
2275
|
-
<xsl:variable name="
|
2316
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
2317
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
2276
2318
|
<xsl:choose>
|
2277
2319
|
<xsl:when test="normalize-space($title_) != ''">
|
2278
2320
|
<xsl:value-of select="$title_"/>
|
@@ -2281,7 +2323,9 @@
|
|
2281
2323
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
2282
2324
|
</xsl:otherwise>
|
2283
2325
|
</xsl:choose>
|
2284
|
-
</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="
|
2326
|
+
</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">
|
2327
|
+
|
2328
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
2285
2329
|
|
2286
2330
|
|
2287
2331
|
|
@@ -2421,6 +2465,7 @@
|
|
2421
2465
|
|
2422
2466
|
|
2423
2467
|
|
2468
|
+
|
2424
2469
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
2425
2470
|
|
2426
2471
|
|
@@ -2460,6 +2505,7 @@
|
|
2460
2505
|
|
2461
2506
|
|
2462
2507
|
|
2508
|
+
|
2463
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">
|
2464
2510
|
|
2465
2511
|
|
@@ -2521,6 +2567,7 @@
|
|
2521
2567
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
2522
2568
|
|
2523
2569
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
2570
|
+
|
2524
2571
|
|
2525
2572
|
|
2526
2573
|
|
@@ -2640,6 +2687,10 @@
|
|
2640
2687
|
|
2641
2688
|
|
2642
2689
|
|
2690
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2691
|
+
<fo:block> </fo:block>
|
2692
|
+
</xsl:if> -->
|
2693
|
+
|
2643
2694
|
<!-- $namespace = 'iso' or -->
|
2644
2695
|
|
2645
2696
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -2675,6 +2726,7 @@
|
|
2675
2726
|
<xsl:with-param name="table" select="$simple-table"/>
|
2676
2727
|
</xsl:call-template>
|
2677
2728
|
</xsl:variable>
|
2729
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2678
2730
|
|
2679
2731
|
<!-- <xsl:variable name="colwidths2">
|
2680
2732
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2695,40 +2747,62 @@
|
|
2695
2747
|
|
2696
2748
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2697
2749
|
|
2750
|
+
|
2698
2751
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
2699
2752
|
|
2753
|
+
|
2754
|
+
|
2755
|
+
|
2700
2756
|
|
2701
2757
|
|
2758
|
+
<xsl:if test="ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface']">
|
2759
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2760
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2761
|
+
</xsl:if>
|
2762
|
+
<xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
|
2763
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2764
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
2765
|
+
</xsl:if>
|
2766
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2702
2767
|
|
2768
|
+
|
2703
2769
|
|
2704
|
-
|
2705
2770
|
|
2706
2771
|
|
2707
2772
|
|
2708
|
-
|
2709
|
-
|
2710
|
-
|
2711
|
-
|
2712
|
-
|
2713
|
-
|
2714
|
-
|
2715
|
-
|
2716
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2717
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2718
|
-
</xsl:if>
|
2719
|
-
<xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
|
2720
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2721
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
2722
|
-
</xsl:if>
|
2723
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2773
|
+
|
2774
|
+
|
2775
|
+
|
2776
|
+
<xsl:variable name="table_attributes">
|
2777
|
+
<attribute name="table-layout">fixed</attribute>
|
2778
|
+
<attribute name="width">100%</attribute>
|
2779
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2780
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2724
2781
|
|
2725
2782
|
|
2726
2783
|
|
2727
2784
|
|
2785
|
+
|
2786
|
+
|
2787
|
+
|
2728
2788
|
|
2789
|
+
|
2729
2790
|
|
2791
|
+
</xsl:variable>
|
2792
|
+
|
2793
|
+
|
2794
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2730
2795
|
|
2796
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2797
|
+
<xsl:attribute name="{@name}">
|
2798
|
+
<xsl:value-of select="."/>
|
2799
|
+
</xsl:attribute>
|
2800
|
+
</xsl:for-each>
|
2731
2801
|
|
2802
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2803
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2804
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2805
|
+
</xsl:if>
|
2732
2806
|
|
2733
2807
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2734
2808
|
<xsl:choose>
|
@@ -2752,6 +2826,33 @@
|
|
2752
2826
|
|
2753
2827
|
</fo:table>
|
2754
2828
|
|
2829
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2830
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2831
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2832
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2833
|
+
</xsl:call-template>
|
2834
|
+
</xsl:for-each>
|
2835
|
+
|
2836
|
+
<!-- insert footer as table -->
|
2837
|
+
<!-- <fo:table>
|
2838
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
2839
|
+
<xsl:attribute name="{@name}">
|
2840
|
+
<xsl:value-of select="."/>
|
2841
|
+
</xsl:attribute>
|
2842
|
+
</xsl:for-each>
|
2843
|
+
|
2844
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2845
|
+
<xsl:choose>
|
2846
|
+
<xsl:when test=". = 1 or . = 0">
|
2847
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2848
|
+
</xsl:when>
|
2849
|
+
<xsl:otherwise>
|
2850
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2851
|
+
</xsl:otherwise>
|
2852
|
+
</xsl:choose>
|
2853
|
+
</xsl:for-each>
|
2854
|
+
</fo:table>-->
|
2855
|
+
|
2755
2856
|
|
2756
2857
|
|
2757
2858
|
|
@@ -2761,6 +2862,7 @@
|
|
2761
2862
|
<xsl:if test="normalize-space() != ''">
|
2762
2863
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2763
2864
|
|
2865
|
+
|
2764
2866
|
<xsl:apply-templates/>
|
2765
2867
|
</fo:block>
|
2766
2868
|
</xsl:if>
|
@@ -2816,6 +2918,13 @@
|
|
2816
2918
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
2817
2919
|
<xsl:variable name="td_text">
|
2818
2920
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2921
|
+
|
2922
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2923
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
2924
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
2925
|
+
</xsl:for-each>
|
2926
|
+
</xsl:if> -->
|
2927
|
+
|
2819
2928
|
</xsl:variable>
|
2820
2929
|
<xsl:variable name="words">
|
2821
2930
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -2875,11 +2984,14 @@
|
|
2875
2984
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
2876
2985
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
2877
2986
|
<xsl:value-of select="@target"/>
|
2987
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
2988
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
2989
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
2878
2990
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
2879
2991
|
<xsl:param name="cols-count"/>
|
2880
2992
|
<!-- font-weight="bold" -->
|
2881
2993
|
<fo:table-header>
|
2882
|
-
|
2994
|
+
|
2883
2995
|
<xsl:apply-templates/>
|
2884
2996
|
</fo:table-header>
|
2885
2997
|
</xsl:template><xsl:template name="table-header-title">
|
@@ -2904,6 +3016,13 @@
|
|
2904
3016
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
2905
3017
|
<xsl:apply-templates/>
|
2906
3018
|
</xsl:template><xsl:template name="insertTableFooter">
|
3019
|
+
<xsl:param name="cols-count"/>
|
3020
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
3021
|
+
<fo:table-footer>
|
3022
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
3023
|
+
</fo:table-footer>
|
3024
|
+
</xsl:if>
|
3025
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
2907
3026
|
<xsl:param name="cols-count"/>
|
2908
3027
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2909
3028
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -2925,11 +3044,29 @@
|
|
2925
3044
|
<!-- fn will be processed inside 'note' processing -->
|
2926
3045
|
|
2927
3046
|
|
3047
|
+
|
3048
|
+
|
3049
|
+
|
3050
|
+
|
2928
3051
|
<!-- except gb -->
|
2929
3052
|
|
2930
3053
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2931
3054
|
|
2932
3055
|
|
3056
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
3057
|
+
<!-- empty, because notes show at page side in main sections -->
|
3058
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3059
|
+
<xsl:choose>
|
3060
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
3061
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3062
|
+
</xsl:when>
|
3063
|
+
<xsl:otherwise>
|
3064
|
+
<fo:block/>
|
3065
|
+
</xsl:otherwise>
|
3066
|
+
</xsl:choose>
|
3067
|
+
</xsl:if> -->
|
3068
|
+
|
3069
|
+
|
2933
3070
|
<!-- horizontal row separator -->
|
2934
3071
|
|
2935
3072
|
|
@@ -2943,6 +3080,88 @@
|
|
2943
3080
|
</fo:table-footer>
|
2944
3081
|
|
2945
3082
|
</xsl:if>
|
3083
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
3084
|
+
<xsl:param name="table_attributes"/>
|
3085
|
+
<xsl:param name="colwidths"/>
|
3086
|
+
|
3087
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3088
|
+
|
3089
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3090
|
+
|
3091
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
3092
|
+
|
3093
|
+
<fo:table keep-with-previous="always">
|
3094
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
3095
|
+
<xsl:choose>
|
3096
|
+
<xsl:when test="@name = 'border-top'">
|
3097
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
3098
|
+
</xsl:when>
|
3099
|
+
<xsl:when test="@name = 'border'">
|
3100
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
3101
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
3102
|
+
</xsl:when>
|
3103
|
+
<xsl:otherwise>
|
3104
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
3105
|
+
</xsl:otherwise>
|
3106
|
+
</xsl:choose>
|
3107
|
+
</xsl:for-each>
|
3108
|
+
|
3109
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
3110
|
+
<xsl:choose>
|
3111
|
+
<xsl:when test=". = 1 or . = 0">
|
3112
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
3113
|
+
</xsl:when>
|
3114
|
+
<xsl:otherwise>
|
3115
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
3116
|
+
</xsl:otherwise>
|
3117
|
+
</xsl:choose>
|
3118
|
+
</xsl:for-each>
|
3119
|
+
|
3120
|
+
<fo:table-body>
|
3121
|
+
<fo:table-row>
|
3122
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
3123
|
+
|
3124
|
+
|
3125
|
+
|
3126
|
+
<!-- fn will be processed inside 'note' processing -->
|
3127
|
+
|
3128
|
+
|
3129
|
+
|
3130
|
+
|
3131
|
+
|
3132
|
+
|
3133
|
+
|
3134
|
+
<!-- except gb -->
|
3135
|
+
|
3136
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3137
|
+
|
3138
|
+
|
3139
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3140
|
+
<xsl:choose>
|
3141
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
3142
|
+
show Note under table in preface (ex. abstract) sections
|
3143
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3144
|
+
</xsl:when>
|
3145
|
+
<xsl:otherwise>
|
3146
|
+
empty, because notes show at page side in main sections
|
3147
|
+
<fo:block/>
|
3148
|
+
</xsl:otherwise>
|
3149
|
+
</xsl:choose>
|
3150
|
+
</xsl:if> -->
|
3151
|
+
|
3152
|
+
|
3153
|
+
<!-- horizontal row separator -->
|
3154
|
+
|
3155
|
+
|
3156
|
+
<!-- fn processing -->
|
3157
|
+
<xsl:call-template name="fn_display"/>
|
3158
|
+
|
3159
|
+
</fo:table-cell>
|
3160
|
+
</fo:table-row>
|
3161
|
+
</fo:table-body>
|
3162
|
+
|
3163
|
+
</fo:table>
|
3164
|
+
</xsl:if>
|
2946
3165
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
2947
3166
|
|
2948
3167
|
<xsl:variable name="cols-count">
|
@@ -2998,8 +3217,12 @@
|
|
2998
3217
|
|
2999
3218
|
</xsl:if>
|
3000
3219
|
|
3001
|
-
|
3002
|
-
|
3220
|
+
|
3221
|
+
|
3222
|
+
|
3223
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3224
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
3225
|
+
</xsl:if> -->
|
3003
3226
|
|
3004
3227
|
<xsl:apply-templates/>
|
3005
3228
|
</fo:table-row>
|
@@ -3027,6 +3250,7 @@
|
|
3027
3250
|
|
3028
3251
|
|
3029
3252
|
|
3253
|
+
|
3030
3254
|
<xsl:if test="@colspan">
|
3031
3255
|
<xsl:attribute name="number-columns-spanned">
|
3032
3256
|
<xsl:value-of select="@colspan"/>
|
@@ -3066,7 +3290,7 @@
|
|
3066
3290
|
|
3067
3291
|
|
3068
3292
|
|
3069
|
-
|
3293
|
+
|
3070
3294
|
|
3071
3295
|
|
3072
3296
|
|
@@ -3077,6 +3301,7 @@
|
|
3077
3301
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
3078
3302
|
</xsl:if>
|
3079
3303
|
|
3304
|
+
|
3080
3305
|
<xsl:if test="@colspan">
|
3081
3306
|
<xsl:attribute name="number-columns-spanned">
|
3082
3307
|
<xsl:value-of select="@colspan"/>
|
@@ -3088,7 +3313,8 @@
|
|
3088
3313
|
</xsl:attribute>
|
3089
3314
|
</xsl:if>
|
3090
3315
|
<xsl:call-template name="display-align"/>
|
3091
|
-
<fo:block>
|
3316
|
+
<fo:block>
|
3317
|
+
|
3092
3318
|
<xsl:apply-templates/>
|
3093
3319
|
</fo:block>
|
3094
3320
|
</fo:table-cell>
|
@@ -3100,14 +3326,17 @@
|
|
3100
3326
|
|
3101
3327
|
|
3102
3328
|
|
3329
|
+
|
3330
|
+
|
3103
3331
|
<fo:inline padding-right="2mm">
|
3104
3332
|
|
3105
3333
|
|
3106
3334
|
|
3107
|
-
|
3335
|
+
|
3108
3336
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3109
3337
|
|
3110
3338
|
</fo:inline>
|
3339
|
+
|
3111
3340
|
<xsl:apply-templates mode="process"/>
|
3112
3341
|
</fo:block>
|
3113
3342
|
|
@@ -3131,6 +3360,7 @@
|
|
3131
3360
|
|
3132
3361
|
|
3133
3362
|
|
3363
|
+
|
3134
3364
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
3135
3365
|
|
3136
3366
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -3142,14 +3372,17 @@
|
|
3142
3372
|
|
3143
3373
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3144
3374
|
|
3375
|
+
|
3145
3376
|
<xsl:value-of select="@reference"/>
|
3146
3377
|
|
3378
|
+
|
3147
3379
|
</fo:inline>
|
3148
3380
|
<fo:inline>
|
3149
3381
|
|
3150
3382
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3151
3383
|
|
3152
|
-
<xsl:apply-templates/>
|
3384
|
+
<!-- <xsl:apply-templates /> -->
|
3385
|
+
<xsl:copy-of select="./node()"/>
|
3153
3386
|
</fo:inline>
|
3154
3387
|
</fo:block>
|
3155
3388
|
</xsl:if>
|
@@ -3186,7 +3419,20 @@
|
|
3186
3419
|
<xsl:variable name="following_dl_colwidths">
|
3187
3420
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
3188
3421
|
<xsl:variable name="html-table">
|
3189
|
-
<xsl:variable name="
|
3422
|
+
<xsl:variable name="doc_ns">
|
3423
|
+
|
3424
|
+
</xsl:variable>
|
3425
|
+
<xsl:variable name="ns">
|
3426
|
+
<xsl:choose>
|
3427
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
3428
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
3429
|
+
</xsl:when>
|
3430
|
+
<xsl:otherwise>
|
3431
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
3432
|
+
</xsl:otherwise>
|
3433
|
+
</xsl:choose>
|
3434
|
+
</xsl:variable>
|
3435
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3190
3436
|
<xsl:element name="{$ns}:table">
|
3191
3437
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
3192
3438
|
<tbody>
|
@@ -3251,7 +3497,8 @@
|
|
3251
3497
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3252
3498
|
</xsl:if>
|
3253
3499
|
|
3254
|
-
<xsl:apply-templates/>
|
3500
|
+
<!-- <xsl:apply-templates /> -->
|
3501
|
+
<xsl:copy-of select="./node()"/>
|
3255
3502
|
</fo:block>
|
3256
3503
|
</fo:table-cell>
|
3257
3504
|
</fo:table-row>
|
@@ -3275,9 +3522,12 @@
|
|
3275
3522
|
|
3276
3523
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3277
3524
|
|
3525
|
+
|
3278
3526
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
3279
3527
|
|
3528
|
+
|
3280
3529
|
<xsl:value-of select="@reference"/>
|
3530
|
+
|
3281
3531
|
</fo:basic-link>
|
3282
3532
|
</fo:inline>
|
3283
3533
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -3285,7 +3535,11 @@
|
|
3285
3535
|
<xsl:apply-templates/>
|
3286
3536
|
</fo:inline>
|
3287
3537
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
3288
|
-
<fo:block-container
|
3538
|
+
<fo:block-container>
|
3539
|
+
|
3540
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3541
|
+
|
3542
|
+
|
3289
3543
|
<xsl:if test="parent::*[local-name() = 'note']">
|
3290
3544
|
<xsl:attribute name="margin-left">
|
3291
3545
|
<xsl:choose>
|
@@ -3295,8 +3549,11 @@
|
|
3295
3549
|
</xsl:attribute>
|
3296
3550
|
|
3297
3551
|
</xsl:if>
|
3298
|
-
<fo:block-container
|
3299
|
-
|
3552
|
+
<fo:block-container>
|
3553
|
+
|
3554
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3555
|
+
|
3556
|
+
|
3300
3557
|
<xsl:variable name="parent" select="local-name(..)"/>
|
3301
3558
|
|
3302
3559
|
<xsl:variable name="key_iso">
|
@@ -3310,9 +3567,12 @@
|
|
3310
3567
|
<fo:block margin-bottom="12pt" text-align="left">
|
3311
3568
|
|
3312
3569
|
<xsl:variable name="title-where">
|
3313
|
-
|
3314
|
-
|
3315
|
-
|
3570
|
+
|
3571
|
+
|
3572
|
+
<xsl:call-template name="getTitle">
|
3573
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3574
|
+
</xsl:call-template>
|
3575
|
+
|
3316
3576
|
</xsl:variable>
|
3317
3577
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3318
3578
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -3328,9 +3588,12 @@
|
|
3328
3588
|
|
3329
3589
|
|
3330
3590
|
<xsl:variable name="title-where">
|
3331
|
-
|
3332
|
-
|
3333
|
-
|
3591
|
+
|
3592
|
+
|
3593
|
+
<xsl:call-template name="getTitle">
|
3594
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3595
|
+
</xsl:call-template>
|
3596
|
+
|
3334
3597
|
</xsl:variable>
|
3335
3598
|
<xsl:value-of select="$title-where"/>
|
3336
3599
|
</fo:block>
|
@@ -3341,9 +3604,12 @@
|
|
3341
3604
|
|
3342
3605
|
|
3343
3606
|
<xsl:variable name="title-key">
|
3344
|
-
|
3345
|
-
|
3346
|
-
|
3607
|
+
|
3608
|
+
|
3609
|
+
<xsl:call-template name="getTitle">
|
3610
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
3611
|
+
</xsl:call-template>
|
3612
|
+
|
3347
3613
|
</xsl:variable>
|
3348
3614
|
<xsl:value-of select="$title-key"/>
|
3349
3615
|
</fo:block>
|
@@ -3383,7 +3649,20 @@
|
|
3383
3649
|
</xsl:choose>
|
3384
3650
|
<!-- create virtual html table for dl/[dt and dd] -->
|
3385
3651
|
<xsl:variable name="html-table">
|
3386
|
-
<xsl:variable name="
|
3652
|
+
<xsl:variable name="doc_ns">
|
3653
|
+
|
3654
|
+
</xsl:variable>
|
3655
|
+
<xsl:variable name="ns">
|
3656
|
+
<xsl:choose>
|
3657
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
3658
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
3659
|
+
</xsl:when>
|
3660
|
+
<xsl:otherwise>
|
3661
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
3662
|
+
</xsl:otherwise>
|
3663
|
+
</xsl:choose>
|
3664
|
+
</xsl:variable>
|
3665
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3387
3666
|
<xsl:element name="{$ns}:table">
|
3388
3667
|
<tbody>
|
3389
3668
|
<xsl:apply-templates mode="dl"/>
|
@@ -3543,6 +3822,7 @@
|
|
3543
3822
|
|
3544
3823
|
|
3545
3824
|
|
3825
|
+
|
3546
3826
|
<xsl:apply-templates/>
|
3547
3827
|
<!-- <xsl:if test="$namespace = 'gb'">
|
3548
3828
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -3596,6 +3876,7 @@
|
|
3596
3876
|
</fo:inline>
|
3597
3877
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
3598
3878
|
<fo:inline font-weight="bold">
|
3879
|
+
|
3599
3880
|
<xsl:apply-templates/>
|
3600
3881
|
</fo:inline>
|
3601
3882
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
@@ -3609,18 +3890,18 @@
|
|
3609
3890
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
3610
3891
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
3611
3892
|
<xsl:variable name="_font-size">
|
3612
|
-
|
3613
|
-
|
3614
|
-
|
3615
3893
|
|
3616
3894
|
|
3617
3895
|
|
3618
3896
|
|
3619
3897
|
|
3620
3898
|
|
3621
|
-
|
3622
3899
|
|
3623
|
-
|
3900
|
+
|
3901
|
+
|
3902
|
+
|
3903
|
+
|
3904
|
+
|
3624
3905
|
|
3625
3906
|
|
3626
3907
|
</xsl:variable>
|
@@ -3924,7 +4205,18 @@
|
|
3924
4205
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
3925
4206
|
</xsl:apply-templates>
|
3926
4207
|
</xsl:template><xsl:template name="getLang">
|
3927
|
-
<xsl:variable name="
|
4208
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4209
|
+
<xsl:variable name="language">
|
4210
|
+
<xsl:choose>
|
4211
|
+
<xsl:when test="$language_current != ''">
|
4212
|
+
<xsl:value-of select="$language_current"/>
|
4213
|
+
</xsl:when>
|
4214
|
+
<xsl:otherwise>
|
4215
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
4216
|
+
</xsl:otherwise>
|
4217
|
+
</xsl:choose>
|
4218
|
+
</xsl:variable>
|
4219
|
+
|
3928
4220
|
<xsl:choose>
|
3929
4221
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
3930
4222
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -3958,7 +4250,8 @@
|
|
3958
4250
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3959
4251
|
<xsl:value-of select="substring($str, 2)"/>
|
3960
4252
|
</xsl:template><xsl:template match="mathml:math">
|
3961
|
-
<fo:inline font-family="
|
4253
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
4254
|
+
|
3962
4255
|
<xsl:variable name="mathml">
|
3963
4256
|
<xsl:apply-templates select="." mode="mathml"/>
|
3964
4257
|
</xsl:variable>
|
@@ -3988,6 +4281,7 @@
|
|
3988
4281
|
</xsl:choose>
|
3989
4282
|
</xsl:variable>
|
3990
4283
|
<fo:inline xsl:use-attribute-sets="link-style">
|
4284
|
+
|
3991
4285
|
<xsl:choose>
|
3992
4286
|
<xsl:when test="$target = ''">
|
3993
4287
|
<xsl:apply-templates/>
|
@@ -4041,10 +4335,14 @@
|
|
4041
4335
|
</fo:inline>
|
4042
4336
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
4043
4337
|
<xsl:variable name="title-modified">
|
4044
|
-
|
4045
|
-
|
4046
|
-
|
4338
|
+
|
4339
|
+
|
4340
|
+
<xsl:call-template name="getTitle">
|
4341
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
4342
|
+
</xsl:call-template>
|
4343
|
+
|
4047
4344
|
</xsl:variable>
|
4345
|
+
|
4048
4346
|
<xsl:choose>
|
4049
4347
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
4050
4348
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -4052,7 +4350,7 @@
|
|
4052
4350
|
<xsl:apply-templates/>
|
4053
4351
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
4054
4352
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
4055
|
-
|
4353
|
+
|
4056
4354
|
<xsl:apply-templates/>
|
4057
4355
|
</fo:basic-link>
|
4058
4356
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
@@ -4105,6 +4403,8 @@
|
|
4105
4403
|
|
4106
4404
|
|
4107
4405
|
|
4406
|
+
|
4407
|
+
|
4108
4408
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
4109
4409
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4110
4410
|
</fo:inline>
|
@@ -4197,7 +4497,8 @@
|
|
4197
4497
|
</fo:inline>
|
4198
4498
|
</xsl:if>
|
4199
4499
|
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
4200
|
-
<fo:block-container id="{@id}">
|
4500
|
+
<fo:block-container id="{@id}">
|
4501
|
+
|
4201
4502
|
<fo:block>
|
4202
4503
|
<xsl:apply-templates/>
|
4203
4504
|
</fo:block>
|
@@ -4232,19 +4533,140 @@
|
|
4232
4533
|
|
4233
4534
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
4234
4535
|
</fo:block>
|
4235
|
-
</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">
|
4536
|
+
</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">
|
4236
4537
|
<xsl:apply-templates mode="contents"/>
|
4237
4538
|
<xsl:text> </xsl:text>
|
4238
|
-
</xsl:template><xsl:template match="
|
4539
|
+
</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">
|
4540
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4541
|
+
<xsl:text> </xsl:text>
|
4542
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4543
|
+
<xsl:value-of select="."/>
|
4544
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
4239
4545
|
<xsl:value-of select="."/>
|
4240
|
-
</xsl:template><xsl:template match="
|
4546
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
4547
|
+
<xsl:apply-templates mode="contents"/>
|
4548
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
4549
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4550
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
4551
|
+
<xsl:apply-templates select="."/>
|
4552
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4553
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4554
|
+
</xsl:template><xsl:template name="addBookmarks">
|
4555
|
+
<xsl:param name="contents"/>
|
4556
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
4557
|
+
<fo:bookmark-tree>
|
4558
|
+
<xsl:choose>
|
4559
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
4560
|
+
<xsl:choose>
|
4561
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
4562
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4563
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
4564
|
+
<fo:bookmark-title>
|
4565
|
+
<xsl:variable name="bookmark-title_">
|
4566
|
+
<xsl:call-template name="getLangVersion">
|
4567
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4568
|
+
</xsl:call-template>
|
4569
|
+
</xsl:variable>
|
4570
|
+
<xsl:choose>
|
4571
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
4572
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
4573
|
+
</xsl:when>
|
4574
|
+
<xsl:otherwise>
|
4575
|
+
<xsl:choose>
|
4576
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
4577
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
4578
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
4579
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
4580
|
+
</xsl:choose>
|
4581
|
+
</xsl:otherwise>
|
4582
|
+
</xsl:choose>
|
4583
|
+
</fo:bookmark-title>
|
4584
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4585
|
+
</fo:bookmark>
|
4586
|
+
|
4587
|
+
</xsl:for-each>
|
4588
|
+
</xsl:when>
|
4589
|
+
<xsl:otherwise>
|
4590
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4591
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4592
|
+
</xsl:for-each>
|
4593
|
+
</xsl:otherwise>
|
4594
|
+
</xsl:choose>
|
4595
|
+
</xsl:when>
|
4596
|
+
<xsl:otherwise>
|
4597
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
4598
|
+
</xsl:otherwise>
|
4599
|
+
</xsl:choose>
|
4600
|
+
|
4601
|
+
|
4602
|
+
|
4603
|
+
<xsl:if test="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
|
4604
|
+
<fo:bookmark internal-destination="{//*[local-name() = 'figure'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
|
4605
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
4606
|
+
<xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]">
|
4607
|
+
<fo:bookmark internal-destination="{@id}">
|
4608
|
+
<fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']/text()" mode="bookmarks"/></fo:bookmark-title>
|
4609
|
+
</fo:bookmark>
|
4610
|
+
</xsl:for-each>
|
4611
|
+
</fo:bookmark>
|
4612
|
+
</xsl:if>
|
4613
|
+
|
4614
|
+
|
4615
|
+
|
4616
|
+
<xsl:if test="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
|
4617
|
+
<fo:bookmark internal-destination="{//*[local-name() = 'table'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide">
|
4618
|
+
<fo:bookmark-title>
|
4619
|
+
<xsl:choose>
|
4620
|
+
<xsl:when test="@lang = 'fr'">Tableaux</xsl:when>
|
4621
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
4622
|
+
</xsl:choose>
|
4623
|
+
</fo:bookmark-title>
|
4624
|
+
<xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']]">
|
4625
|
+
<fo:bookmark internal-destination="{@id}">
|
4626
|
+
<fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']//text()" mode="bookmarks"/></fo:bookmark-title>
|
4627
|
+
</fo:bookmark>
|
4628
|
+
</xsl:for-each>
|
4629
|
+
</fo:bookmark>
|
4630
|
+
</xsl:if>
|
4631
|
+
|
4632
|
+
|
4633
|
+
|
4634
|
+
|
4635
|
+
</fo:bookmark-tree>
|
4636
|
+
</xsl:if>
|
4637
|
+
</xsl:template><xsl:template name="getLangVersion">
|
4638
|
+
<xsl:param name="lang"/>
|
4639
|
+
<xsl:choose>
|
4640
|
+
<xsl:when test="$lang = 'en'">
|
4641
|
+
|
4642
|
+
|
4643
|
+
</xsl:when>
|
4644
|
+
<xsl:when test="$lang = 'fr'">
|
4645
|
+
|
4646
|
+
|
4647
|
+
</xsl:when>
|
4648
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
4649
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
4650
|
+
</xsl:choose>
|
4651
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
4652
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
4653
|
+
<fo:bookmark-title>
|
4654
|
+
<xsl:if test="@section != ''">
|
4655
|
+
<xsl:value-of select="@section"/>
|
4656
|
+
<xsl:text> </xsl:text>
|
4657
|
+
</xsl:if>
|
4658
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4659
|
+
</fo:bookmark-title>
|
4660
|
+
<xsl:apply-templates mode="bookmark"/>
|
4661
|
+
</fo:bookmark>
|
4662
|
+
</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">
|
4241
4663
|
<xsl:if test="normalize-space() != ''">
|
4242
4664
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
4243
4665
|
|
4244
4666
|
<xsl:if test="nist:dl">
|
4245
4667
|
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
4246
4668
|
</xsl:if>
|
4247
|
-
|
4669
|
+
|
4248
4670
|
<xsl:apply-templates/>
|
4249
4671
|
</fo:block>
|
4250
4672
|
</xsl:if>
|
@@ -4299,7 +4721,7 @@
|
|
4299
4721
|
<xsl:apply-templates/>
|
4300
4722
|
</xsl:otherwise>
|
4301
4723
|
</xsl:choose>
|
4302
|
-
</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">
|
4724
|
+
</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">
|
4303
4725
|
<xsl:text> </xsl:text>
|
4304
4726
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
4305
4727
|
<xsl:copy>
|
@@ -4829,9 +5251,12 @@
|
|
4829
5251
|
</fo:block>
|
4830
5252
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
4831
5253
|
<xsl:variable name="title-deprecated">
|
4832
|
-
|
4833
|
-
|
4834
|
-
|
5254
|
+
|
5255
|
+
|
5256
|
+
<xsl:call-template name="getTitle">
|
5257
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
5258
|
+
</xsl:call-template>
|
5259
|
+
|
4835
5260
|
</xsl:variable>
|
4836
5261
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
4837
5262
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -4877,13 +5302,14 @@
|
|
4877
5302
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
4878
5303
|
<fo:block>
|
4879
5304
|
<xsl:call-template name="setId"/>
|
5305
|
+
|
4880
5306
|
<xsl:apply-templates/>
|
4881
5307
|
</fo:block>
|
4882
5308
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
4883
5309
|
<fo:block id="{@id}">
|
4884
5310
|
<xsl:apply-templates/>
|
4885
5311
|
</fo:block>
|
4886
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
5312
|
+
</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']">
|
4887
5313
|
|
4888
5314
|
<fo:block break-after="page"/>
|
4889
5315
|
|
@@ -4904,20 +5330,30 @@
|
|
4904
5330
|
<!-- 0xA0 to space replacement -->
|
4905
5331
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4906
5332
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4907
|
-
<
|
4908
|
-
<xsl:
|
4909
|
-
<
|
4910
|
-
<xsl:
|
4911
|
-
<xsl:
|
4912
|
-
|
4913
|
-
|
4914
|
-
|
4915
|
-
|
4916
|
-
|
4917
|
-
|
4918
|
-
|
4919
|
-
|
4920
|
-
|
5333
|
+
<xsl:choose>
|
5334
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
5335
|
+
<fo:block-container>
|
5336
|
+
<xsl:attribute name="margin-left">
|
5337
|
+
<xsl:choose>
|
5338
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
5339
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
5340
|
+
</xsl:choose>
|
5341
|
+
</xsl:attribute>
|
5342
|
+
|
5343
|
+
|
5344
|
+
<fo:block-container margin-left="0mm">
|
5345
|
+
<fo:block>
|
5346
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
5347
|
+
</fo:block>
|
5348
|
+
</fo:block-container>
|
5349
|
+
</fo:block-container>
|
5350
|
+
</xsl:when>
|
5351
|
+
<xsl:otherwise>
|
5352
|
+
<fo:block>
|
5353
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
5354
|
+
</fo:block>
|
5355
|
+
</xsl:otherwise>
|
5356
|
+
</xsl:choose>
|
4921
5357
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4922
5358
|
<!-- <row>
|
4923
5359
|
<date>05-07-2013</date>
|
@@ -5090,6 +5526,7 @@
|
|
5090
5526
|
|
5091
5527
|
|
5092
5528
|
|
5529
|
+
|
5093
5530
|
|
5094
5531
|
</xsl:variable>
|
5095
5532
|
<xsl:choose>
|
@@ -5104,6 +5541,7 @@
|
|
5104
5541
|
<dc:creator>
|
5105
5542
|
|
5106
5543
|
|
5544
|
+
|
5107
5545
|
<xsl:for-each select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
5108
5546
|
<xsl:value-of select="*[local-name() = 'person']/*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
5109
5547
|
<xsl:if test="position() != last()">; </xsl:if>
|
@@ -5118,6 +5556,7 @@
|
|
5118
5556
|
<xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
5119
5557
|
|
5120
5558
|
|
5559
|
+
|
5121
5560
|
</xsl:variable>
|
5122
5561
|
<xsl:value-of select="normalize-space($abstract)"/>
|
5123
5562
|
</dc:description>
|
@@ -5189,13 +5628,22 @@
|
|
5189
5628
|
</xsl:template><xsl:template name="split">
|
5190
5629
|
<xsl:param name="pText" select="."/>
|
5191
5630
|
<xsl:param name="sep" select="','"/>
|
5631
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
5192
5632
|
<xsl:if test="string-length($pText) >0">
|
5193
5633
|
<item>
|
5194
|
-
<xsl:
|
5634
|
+
<xsl:choose>
|
5635
|
+
<xsl:when test="$normalize-space = 'true'">
|
5636
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
5637
|
+
</xsl:when>
|
5638
|
+
<xsl:otherwise>
|
5639
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
5640
|
+
</xsl:otherwise>
|
5641
|
+
</xsl:choose>
|
5195
5642
|
</item>
|
5196
5643
|
<xsl:call-template name="split">
|
5197
5644
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
5198
5645
|
<xsl:with-param name="sep" select="$sep"/>
|
5646
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
5199
5647
|
</xsl:call-template>
|
5200
5648
|
</xsl:if>
|
5201
5649
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -5218,6 +5666,7 @@
|
|
5218
5666
|
|
5219
5667
|
|
5220
5668
|
|
5669
|
+
|
5221
5670
|
</xsl:variable>
|
5222
5671
|
<xsl:if test="$documentNS != $XSLNS">
|
5223
5672
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -5243,4 +5692,40 @@
|
|
5243
5692
|
</xsl:otherwise>
|
5244
5693
|
</xsl:choose>
|
5245
5694
|
</xsl:attribute>
|
5695
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
5696
|
+
<xsl:param name="text"/>
|
5697
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
5698
|
+
<xsl:if test="string-length($text) > 0">
|
5699
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
5700
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
5701
|
+
<xsl:if test="$char = '®'">
|
5702
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
5703
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
5704
|
+
</xsl:if>
|
5705
|
+
<xsl:value-of select="$char"/>
|
5706
|
+
</fo:inline>
|
5707
|
+
<xsl:call-template name="add-letter-spacing">
|
5708
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
5709
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
5710
|
+
</xsl:call-template>
|
5711
|
+
</xsl:if>
|
5712
|
+
</xsl:template><xsl:template name="repeat">
|
5713
|
+
<xsl:param name="char" select="'*'"/>
|
5714
|
+
<xsl:param name="count"/>
|
5715
|
+
<xsl:if test="$count > 0">
|
5716
|
+
<xsl:value-of select="$char"/>
|
5717
|
+
<xsl:call-template name="repeat">
|
5718
|
+
<xsl:with-param name="char" select="$char"/>
|
5719
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
5720
|
+
</xsl:call-template>
|
5721
|
+
</xsl:if>
|
5722
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
5723
|
+
<xsl:param name="key"/>
|
5724
|
+
|
5725
|
+
<xsl:variable name="curr_lang">
|
5726
|
+
<xsl:call-template name="getLang"/>
|
5727
|
+
</xsl:variable>
|
5728
|
+
|
5729
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5730
|
+
|
5246
5731
|
</xsl:template></xsl:stylesheet>
|