metanorma-bipm 2.1.1 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/bipm/base_convert.rb +3 -1
- data/lib/isodoc/bipm/bipm.brochure.xsl +582 -294
- data/lib/isodoc/bipm/bipm.guide.xsl +582 -294
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +582 -294
- data/lib/isodoc/bipm/bipm.rapport.xsl +582 -294
- data/lib/isodoc/bipm/html/htmlstyle.css +6 -0
- data/lib/isodoc/bipm/html/htmlstyle.scss +1 -0
- data/lib/isodoc/bipm/html_convert.rb +4 -4
- data/lib/isodoc/bipm/jcgm.standard.xsl +533 -266
- data/lib/isodoc/bipm/presentation_xml_convert.rb +3 -5
- data/lib/isodoc/bipm/xref.rb +22 -28
- data/lib/metanorma/bipm/biblio.rng +134 -39
- data/lib/metanorma/bipm/bipm.rng +3 -0
- data/lib/metanorma/bipm/converter.rb +6 -3
- data/lib/metanorma/bipm/isodoc.rng +21 -0
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +3 -3
@@ -440,7 +440,7 @@
|
|
440
440
|
</xsl:for-each>
|
441
441
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]">
|
442
442
|
<fo:block break-after="page"/>
|
443
|
-
<xsl:apply-templates select="./*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
443
|
+
<xsl:apply-templates select="./*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements' and local-name() != 'note' and local-name() != 'admonition']"/>
|
444
444
|
</xsl:for-each>
|
445
445
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]">
|
446
446
|
<fo:block break-after="page"/>
|
@@ -1724,14 +1724,41 @@
|
|
1724
1724
|
</fo:block-container>
|
1725
1725
|
</xsl:template>
|
1726
1726
|
|
1727
|
-
<xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:param name="add_math_as_text">true</xsl:param><xsl:param name="table_if">false</xsl:param><xsl:param name="table_widths"/><xsl:variable name="table_widths_from_if" select="xalan:nodeset($table_widths)"/><xsl:
|
1727
|
+
<xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:param name="add_math_as_text">true</xsl:param><xsl:param name="table_if">false</xsl:param><xsl:param name="table_widths"/><xsl:variable name="table_widths_from_if" select="xalan:nodeset($table_widths)"/><xsl:variable name="table_widths_from_if_calculated_">
|
1728
|
+
<xsl:for-each select="$table_widths_from_if//table">
|
1729
|
+
<xsl:copy>
|
1730
|
+
<xsl:copy-of select="@*"/>
|
1731
|
+
<xsl:call-template name="calculate-column-widths-autolayout-algorithm"/>
|
1732
|
+
</xsl:copy>
|
1733
|
+
</xsl:for-each>
|
1734
|
+
</xsl:variable><xsl:variable name="table_widths_from_if_calculated" select="xalan:nodeset($table_widths_from_if_calculated_)"/><xsl:param name="table_if_debug">false</xsl:param><xsl:variable name="isGenerateTableIF_">
|
1728
1735
|
false
|
1729
1736
|
</xsl:variable><xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/><xsl:variable name="lang">
|
1730
1737
|
<xsl:call-template name="getLang"/>
|
1731
|
-
</xsl:variable><xsl:variable name="
|
1732
|
-
|
1738
|
+
</xsl:variable><xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/><xsl:variable name="papersize_width_">
|
1739
|
+
<xsl:choose>
|
1740
|
+
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
1741
|
+
<xsl:when test="$papersize = 'a4'">210</xsl:when>
|
1742
|
+
</xsl:choose>
|
1743
|
+
</xsl:variable><xsl:variable name="papersize_width" select="normalize-space($papersize_width_)"/><xsl:variable name="papersize_height_">
|
1744
|
+
<xsl:choose>
|
1745
|
+
<xsl:when test="$papersize = 'letter'">279.4</xsl:when>
|
1746
|
+
<xsl:when test="$papersize = 'a4'">297</xsl:when>
|
1747
|
+
</xsl:choose>
|
1748
|
+
</xsl:variable><xsl:variable name="papersize_height" select="normalize-space($papersize_height_)"/><xsl:variable name="pageWidth_">
|
1749
|
+
<xsl:choose>
|
1750
|
+
<xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
|
1751
|
+
<xsl:otherwise>
|
1752
|
+
210
|
1753
|
+
</xsl:otherwise>
|
1754
|
+
</xsl:choose>
|
1733
1755
|
</xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
|
1734
|
-
|
1756
|
+
<xsl:choose>
|
1757
|
+
<xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
|
1758
|
+
<xsl:otherwise>
|
1759
|
+
297
|
1760
|
+
</xsl:otherwise>
|
1761
|
+
</xsl:choose>
|
1735
1762
|
</xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="marginLeftRight1_">
|
1736
1763
|
25
|
1737
1764
|
</xsl:variable><xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/><xsl:variable name="marginLeftRight2_">
|
@@ -1843,9 +1870,10 @@
|
|
1843
1870
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
1844
1871
|
</xsl:otherwise>
|
1845
1872
|
</xsl:choose>
|
1846
|
-
</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:attribute-set name="root-style">
|
1873
|
+
</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="font_noto_sans">Noto Sans, Noto Sans HK, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Sans TC</xsl:variable><xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable><xsl:variable name="font_noto_serif">Noto Serif, Noto Serif HK, Noto Serif JP, Noto Serif KR, Noto Serif SC, Noto Serif TC</xsl:variable><xsl:attribute-set name="root-style">
|
1847
1874
|
|
1848
|
-
<xsl:attribute name="font-family">Times New Roman, STIX Two Math,
|
1875
|
+
<xsl:attribute name="font-family">Times New Roman, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
|
1876
|
+
<xsl:attribute name="font-family-generic">Serif</xsl:attribute>
|
1849
1877
|
<xsl:attribute name="font-size">10.5pt</xsl:attribute>
|
1850
1878
|
|
1851
1879
|
|
@@ -1863,6 +1891,7 @@
|
|
1863
1891
|
|
1864
1892
|
|
1865
1893
|
|
1894
|
+
|
1866
1895
|
</xsl:attribute-set><xsl:template name="insertRootStyle">
|
1867
1896
|
<xsl:param name="root-style"/>
|
1868
1897
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
@@ -1874,17 +1903,60 @@
|
|
1874
1903
|
</xsl:variable>
|
1875
1904
|
<xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
|
1876
1905
|
|
1906
|
+
<xsl:variable name="font_family_generic" select="$root-style_/root-style/@font-family-generic"/>
|
1907
|
+
|
1877
1908
|
<xsl:for-each select="$root-style_/root-style/@*">
|
1909
|
+
|
1878
1910
|
<xsl:choose>
|
1879
|
-
<xsl:when test="local-name() = 'font-family'
|
1911
|
+
<xsl:when test="local-name() = 'font-family-generic'"><!-- skip, it's using for determine 'sans' or 'serif' --></xsl:when>
|
1912
|
+
<xsl:when test="local-name() = 'font-family'">
|
1913
|
+
|
1914
|
+
<xsl:variable name="font_regional_prefix">
|
1915
|
+
<xsl:choose>
|
1916
|
+
<xsl:when test="$font_family_generic = 'Sans'">Noto Sans</xsl:when>
|
1917
|
+
<xsl:otherwise>Noto Serif</xsl:otherwise>
|
1918
|
+
</xsl:choose>
|
1919
|
+
</xsl:variable>
|
1920
|
+
|
1880
1921
|
<xsl:attribute name="{local-name()}">
|
1881
|
-
|
1922
|
+
|
1923
|
+
<xsl:variable name="font_extended">
|
1924
|
+
<xsl:choose>
|
1925
|
+
<xsl:when test="$lang = 'zh'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
|
1926
|
+
<xsl:when test="$lang = 'hk'"><xsl:value-of select="$font_regional_prefix"/> HK</xsl:when>
|
1927
|
+
<xsl:when test="$lang = 'jp'"><xsl:value-of select="$font_regional_prefix"/> JP</xsl:when>
|
1928
|
+
<xsl:when test="$lang = 'kr'"><xsl:value-of select="$font_regional_prefix"/> KR</xsl:when>
|
1929
|
+
<xsl:when test="$lang = 'sc'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
|
1930
|
+
<xsl:when test="$lang = 'tc'"><xsl:value-of select="$font_regional_prefix"/> TC</xsl:when>
|
1931
|
+
</xsl:choose>
|
1932
|
+
</xsl:variable>
|
1933
|
+
<xsl:if test="normalize-space($font_extended) != ''">
|
1934
|
+
<xsl:value-of select="$font_regional_prefix"/><xsl:text>, </xsl:text>
|
1935
|
+
<xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
|
1936
|
+
</xsl:if>
|
1937
|
+
|
1938
|
+
<xsl:value-of select="."/>
|
1939
|
+
|
1940
|
+
<xsl:if test="$additional_fonts != ''">
|
1941
|
+
<xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
|
1942
|
+
</xsl:if>
|
1882
1943
|
</xsl:attribute>
|
1883
1944
|
</xsl:when>
|
1884
1945
|
<xsl:otherwise>
|
1885
1946
|
<xsl:copy-of select="."/>
|
1886
1947
|
</xsl:otherwise>
|
1887
1948
|
</xsl:choose>
|
1949
|
+
|
1950
|
+
<!-- <xsl:choose>
|
1951
|
+
<xsl:when test="local-name() = 'font-family'">
|
1952
|
+
<xsl:attribute name="{local-name()}">
|
1953
|
+
<xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
|
1954
|
+
</xsl:attribute>
|
1955
|
+
</xsl:when>
|
1956
|
+
<xsl:otherwise>
|
1957
|
+
<xsl:copy-of select="."/>
|
1958
|
+
</xsl:otherwise>
|
1959
|
+
</xsl:choose> -->
|
1888
1960
|
</xsl:for-each>
|
1889
1961
|
</xsl:template><xsl:attribute-set name="copyright-statement-style">
|
1890
1962
|
|
@@ -1958,7 +2030,8 @@
|
|
1958
2030
|
|
1959
2031
|
|
1960
2032
|
|
1961
|
-
|
2033
|
+
|
2034
|
+
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
1962
2035
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1963
2036
|
|
1964
2037
|
|
@@ -1975,7 +2048,10 @@
|
|
1975
2048
|
|
1976
2049
|
</xsl:attribute-set><xsl:attribute-set name="requirement-style">
|
1977
2050
|
|
2051
|
+
|
1978
2052
|
</xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
|
2053
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2054
|
+
|
1979
2055
|
|
1980
2056
|
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
1981
2057
|
|
@@ -1999,6 +2075,7 @@
|
|
1999
2075
|
|
2000
2076
|
|
2001
2077
|
|
2078
|
+
|
2002
2079
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2003
2080
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
2004
2081
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
@@ -2011,6 +2088,7 @@
|
|
2011
2088
|
|
2012
2089
|
|
2013
2090
|
|
2091
|
+
|
2014
2092
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2015
2093
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
2016
2094
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
@@ -2046,6 +2124,7 @@
|
|
2046
2124
|
|
2047
2125
|
|
2048
2126
|
|
2127
|
+
|
2049
2128
|
|
2050
2129
|
|
2051
2130
|
|
@@ -2078,10 +2157,12 @@
|
|
2078
2157
|
|
2079
2158
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
2080
2159
|
|
2160
|
+
|
2081
2161
|
|
2082
2162
|
|
2083
2163
|
</xsl:attribute-set><xsl:variable name="table-border_">
|
2084
2164
|
|
2165
|
+
|
2085
2166
|
</xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
|
2086
2167
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2087
2168
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -2096,6 +2177,7 @@
|
|
2096
2177
|
|
2097
2178
|
|
2098
2179
|
|
2180
|
+
|
2099
2181
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2100
2182
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2101
2183
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
@@ -2126,6 +2208,7 @@
|
|
2126
2208
|
|
2127
2209
|
|
2128
2210
|
|
2211
|
+
|
2129
2212
|
<xsl:attribute name="border">1.5pt solid black</xsl:attribute>
|
2130
2213
|
|
2131
2214
|
|
@@ -2143,6 +2226,7 @@
|
|
2143
2226
|
|
2144
2227
|
|
2145
2228
|
|
2229
|
+
|
2146
2230
|
|
2147
2231
|
|
2148
2232
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
@@ -2222,6 +2306,7 @@
|
|
2222
2306
|
|
2223
2307
|
|
2224
2308
|
|
2309
|
+
|
2225
2310
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
2226
2311
|
|
2227
2312
|
|
@@ -2241,7 +2326,7 @@
|
|
2241
2326
|
|
2242
2327
|
|
2243
2328
|
|
2244
|
-
|
2329
|
+
|
2245
2330
|
|
2246
2331
|
<xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
|
2247
2332
|
|
@@ -2257,6 +2342,7 @@
|
|
2257
2342
|
|
2258
2343
|
|
2259
2344
|
|
2345
|
+
|
2260
2346
|
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
2261
2347
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2262
2348
|
|
@@ -2272,6 +2358,8 @@
|
|
2272
2358
|
|
2273
2359
|
|
2274
2360
|
|
2361
|
+
|
2362
|
+
|
2275
2363
|
</xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
|
2276
2364
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
2277
2365
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
@@ -2289,6 +2377,7 @@
|
|
2289
2377
|
|
2290
2378
|
|
2291
2379
|
|
2380
|
+
|
2292
2381
|
</xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
|
2293
2382
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
2294
2383
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
@@ -2318,11 +2407,32 @@
|
|
2318
2407
|
|
2319
2408
|
|
2320
2409
|
|
2410
|
+
|
2321
2411
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
2322
2412
|
|
2323
2413
|
|
2324
2414
|
|
2325
2415
|
|
2416
|
+
</xsl:attribute-set><xsl:attribute-set name="dl-name-style">
|
2417
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2418
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2419
|
+
|
2420
|
+
|
2421
|
+
|
2422
|
+
|
2423
|
+
|
2424
|
+
|
2425
|
+
|
2426
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2427
|
+
|
2428
|
+
|
2429
|
+
|
2430
|
+
|
2431
|
+
|
2432
|
+
|
2433
|
+
|
2434
|
+
|
2435
|
+
|
2326
2436
|
</xsl:attribute-set><xsl:attribute-set name="dd-cell-style">
|
2327
2437
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
2328
2438
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
@@ -2364,6 +2474,7 @@
|
|
2364
2474
|
|
2365
2475
|
|
2366
2476
|
|
2477
|
+
|
2367
2478
|
|
2368
2479
|
|
2369
2480
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
@@ -2406,7 +2517,8 @@
|
|
2406
2517
|
|
2407
2518
|
|
2408
2519
|
|
2409
|
-
|
2520
|
+
|
2521
|
+
|
2410
2522
|
|
2411
2523
|
|
2412
2524
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
@@ -2422,6 +2534,7 @@
|
|
2422
2534
|
</xsl:attribute-set><xsl:attribute-set name="termnote-style">
|
2423
2535
|
|
2424
2536
|
|
2537
|
+
|
2425
2538
|
|
2426
2539
|
|
2427
2540
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
@@ -2437,6 +2550,8 @@
|
|
2437
2550
|
|
2438
2551
|
|
2439
2552
|
|
2553
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-p-style">
|
2554
|
+
|
2440
2555
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2441
2556
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
2442
2557
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
@@ -2485,6 +2600,7 @@
|
|
2485
2600
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
2486
2601
|
|
2487
2602
|
|
2603
|
+
|
2488
2604
|
|
2489
2605
|
|
2490
2606
|
|
@@ -2527,6 +2643,7 @@
|
|
2527
2643
|
|
2528
2644
|
|
2529
2645
|
|
2646
|
+
|
2530
2647
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
2531
2648
|
<xsl:attribute name="margin-left">25mm</xsl:attribute>
|
2532
2649
|
|
@@ -2553,20 +2670,20 @@
|
|
2553
2670
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
2554
2671
|
|
2555
2672
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
2673
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
2674
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
2675
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2556
2676
|
|
2557
2677
|
|
2558
|
-
<xsl:attribute name="width">100%</xsl:attribute>
|
2559
2678
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
2560
|
-
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2561
2679
|
|
2562
2680
|
|
2563
2681
|
|
2564
|
-
|
2565
|
-
|
2682
|
+
|
2566
2683
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
2567
2684
|
|
2568
2685
|
|
2569
|
-
<xsl:attribute name="font-family">Courier New
|
2686
|
+
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
2570
2687
|
|
2571
2688
|
|
2572
2689
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
@@ -2642,6 +2759,7 @@
|
|
2642
2759
|
|
2643
2760
|
|
2644
2761
|
|
2762
|
+
|
2645
2763
|
<xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
|
2646
2764
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
2647
2765
|
|
@@ -2654,6 +2772,25 @@
|
|
2654
2772
|
|
2655
2773
|
|
2656
2774
|
|
2775
|
+
</xsl:attribute-set><xsl:attribute-set name="list-name-style">
|
2776
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2777
|
+
|
2778
|
+
|
2779
|
+
|
2780
|
+
|
2781
|
+
|
2782
|
+
|
2783
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
2784
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2785
|
+
|
2786
|
+
|
2787
|
+
|
2788
|
+
|
2789
|
+
|
2790
|
+
|
2791
|
+
|
2792
|
+
|
2793
|
+
|
2657
2794
|
</xsl:attribute-set><xsl:attribute-set name="list-item-style">
|
2658
2795
|
|
2659
2796
|
|
@@ -2701,6 +2838,7 @@
|
|
2701
2838
|
|
2702
2839
|
|
2703
2840
|
|
2841
|
+
|
2704
2842
|
</xsl:attribute-set><xsl:attribute-set name="fn-body-style">
|
2705
2843
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
2706
2844
|
<xsl:attribute name="font-style">normal</xsl:attribute>
|
@@ -2729,6 +2867,7 @@
|
|
2729
2867
|
|
2730
2868
|
|
2731
2869
|
|
2870
|
+
|
2732
2871
|
</xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
|
2733
2872
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
2734
2873
|
|
@@ -2752,6 +2891,7 @@
|
|
2752
2891
|
|
2753
2892
|
|
2754
2893
|
|
2894
|
+
|
2755
2895
|
</xsl:attribute-set><xsl:attribute-set name="admonition-style">
|
2756
2896
|
|
2757
2897
|
|
@@ -2761,6 +2901,7 @@
|
|
2761
2901
|
|
2762
2902
|
|
2763
2903
|
|
2904
|
+
|
2764
2905
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2765
2906
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2766
2907
|
|
@@ -2771,6 +2912,9 @@
|
|
2771
2912
|
|
2772
2913
|
|
2773
2914
|
</xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
|
2915
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2916
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2917
|
+
|
2774
2918
|
|
2775
2919
|
|
2776
2920
|
|
@@ -2808,6 +2952,7 @@
|
|
2808
2952
|
|
2809
2953
|
|
2810
2954
|
|
2955
|
+
|
2811
2956
|
</xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
|
2812
2957
|
|
2813
2958
|
|
@@ -2836,6 +2981,10 @@
|
|
2836
2981
|
|
2837
2982
|
|
2838
2983
|
|
2984
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
2985
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2986
|
+
<xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
|
2987
|
+
</xsl:if> -->
|
2839
2988
|
|
2840
2989
|
|
2841
2990
|
|
@@ -2860,6 +3009,7 @@
|
|
2860
3009
|
|
2861
3010
|
|
2862
3011
|
|
3012
|
+
|
2863
3013
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2864
3014
|
|
2865
3015
|
|
@@ -2886,6 +3036,7 @@
|
|
2886
3036
|
|
2887
3037
|
|
2888
3038
|
|
3039
|
+
|
2889
3040
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
2890
3041
|
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
2891
3042
|
|
@@ -2907,6 +3058,7 @@
|
|
2907
3058
|
|
2908
3059
|
|
2909
3060
|
|
3061
|
+
|
2910
3062
|
<xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
|
2911
3063
|
<xsl:attribute name="padding-right">3mm</xsl:attribute>
|
2912
3064
|
|
@@ -2928,6 +3080,7 @@
|
|
2928
3080
|
|
2929
3081
|
|
2930
3082
|
|
3083
|
+
|
2931
3084
|
<xsl:attribute name="margin-bottom">4pt</xsl:attribute>
|
2932
3085
|
|
2933
3086
|
|
@@ -3050,13 +3203,13 @@
|
|
3050
3203
|
|
3051
3204
|
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
|
3052
3205
|
<xsl:variable name="nodes_preface_">
|
3053
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
3206
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
3054
3207
|
<node id="{@id}"/>
|
3055
3208
|
</xsl:for-each>
|
3056
3209
|
</xsl:variable>
|
3057
3210
|
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
3058
3211
|
|
3059
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
3212
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
3060
3213
|
<xsl:sort select="@displayorder" data-type="number"/>
|
3061
3214
|
|
3062
3215
|
<!-- process Section's title -->
|
@@ -3122,7 +3275,7 @@
|
|
3122
3275
|
</xsl:for-each>
|
3123
3276
|
</figures>
|
3124
3277
|
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
3125
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
3278
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
3126
3279
|
<xsl:sort select="@displayorder" data-type="number"/>
|
3127
3280
|
<xsl:apply-templates select="."/>
|
3128
3281
|
</xsl:for-each>
|
@@ -3363,6 +3516,8 @@
|
|
3363
3516
|
|
3364
3517
|
|
3365
3518
|
|
3519
|
+
|
3520
|
+
|
3366
3521
|
|
3367
3522
|
|
3368
3523
|
|
@@ -3397,6 +3552,8 @@
|
|
3397
3552
|
|
3398
3553
|
|
3399
3554
|
|
3555
|
+
|
3556
|
+
|
3400
3557
|
<xsl:if test="*[local-name()='thead']">
|
3401
3558
|
<xsl:attribute name="border-top">1pt solid black</xsl:attribute>
|
3402
3559
|
</xsl:if>
|
@@ -3548,25 +3705,31 @@
|
|
3548
3705
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
3549
3706
|
<xsl:param name="continued"/>
|
3550
3707
|
<xsl:if test="normalize-space() != ''">
|
3551
|
-
|
3552
|
-
|
3553
|
-
|
3554
|
-
|
3555
|
-
|
3708
|
+
|
3709
|
+
|
3556
3710
|
|
3557
|
-
|
3558
|
-
|
3711
|
+
<fo:block xsl:use-attribute-sets="table-name-style">
|
3712
|
+
|
3559
3713
|
|
3560
|
-
<xsl:apply-templates/>
|
3561
3714
|
|
3562
|
-
|
3563
|
-
|
3564
|
-
<xsl:
|
3565
|
-
|
3566
|
-
|
3567
|
-
|
3715
|
+
|
3716
|
+
|
3717
|
+
<xsl:choose>
|
3718
|
+
<xsl:when test="$continued = 'true'">
|
3719
|
+
|
3720
|
+
<xsl:apply-templates/>
|
3721
|
+
|
3722
|
+
</xsl:when>
|
3723
|
+
<xsl:otherwise>
|
3724
|
+
<xsl:apply-templates/>
|
3725
|
+
</xsl:otherwise>
|
3726
|
+
</xsl:choose>
|
3727
|
+
|
3728
|
+
|
3729
|
+
</fo:block>
|
3730
|
+
|
3568
3731
|
|
3569
|
-
|
3732
|
+
|
3570
3733
|
</xsl:if>
|
3571
3734
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
3572
3735
|
<xsl:param name="table-row"/>
|
@@ -3729,8 +3892,9 @@
|
|
3729
3892
|
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
3730
3893
|
</xsl:if>
|
3731
3894
|
</xsl:template><xsl:template name="calculate-column-widths-autolayout-algorithm">
|
3732
|
-
<xsl:param name="
|
3733
|
-
|
3895
|
+
<xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
|
3896
|
+
|
3897
|
+
<!-- via intermediate format -->
|
3734
3898
|
|
3735
3899
|
<!-- The algorithm uses two passes through the table data and scales linearly with the size of the table -->
|
3736
3900
|
|
@@ -3741,9 +3905,8 @@
|
|
3741
3905
|
<!-- get current table id -->
|
3742
3906
|
<xsl:variable name="table_id" select="@id"/>
|
3743
3907
|
<!-- find table by id in the file 'table_widths' -->
|
3744
|
-
|
3745
|
-
<xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/>
|
3746
|
-
|
3908
|
+
<!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
|
3909
|
+
<xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
|
3747
3910
|
|
3748
3911
|
<!-- table='<xsl:copy-of select="$table"/>' -->
|
3749
3912
|
<!-- table_id='<xsl:value-of select="$table_id"/>\ -->
|
@@ -3751,24 +3914,13 @@
|
|
3751
3914
|
<!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
|
3752
3915
|
|
3753
3916
|
<xsl:variable name="table_with_cell_widths_">
|
3754
|
-
<xsl:
|
3755
|
-
<xsl:when test="$if = 'true' and normalize-space($table-if) != ''"> <!-- if we read column's width from IF and there is table in IF -->
|
3756
|
-
|
3757
|
-
<!-- Example: <column>10</column>
|
3758
|
-
<column>11</column>
|
3759
|
-
-->
|
3760
|
-
<xsl:apply-templates select="$table-if" mode="determine_cell_widths-if"/>
|
3761
|
-
</xsl:when>
|
3762
|
-
<xsl:otherwise>
|
3763
|
-
<xsl:apply-templates select="xalan:nodeset($table)" mode="determine_cell_widths"/>
|
3764
|
-
</xsl:otherwise>
|
3765
|
-
</xsl:choose>
|
3917
|
+
<xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
|
3766
3918
|
</xsl:variable>
|
3767
3919
|
<xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
|
3768
3920
|
|
3769
|
-
<xsl:if test="$table_if_debug = 'true'">
|
3921
|
+
<!-- <xsl:if test="$table_if_debug = 'true'">
|
3770
3922
|
<xsl:copy-of select="$table_with_cell_widths"/>
|
3771
|
-
</xsl:if>
|
3923
|
+
</xsl:if> -->
|
3772
3924
|
|
3773
3925
|
|
3774
3926
|
<!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
|
@@ -3814,8 +3966,12 @@
|
|
3814
3966
|
|
3815
3967
|
<xsl:variable name="page_width">
|
3816
3968
|
<xsl:choose>
|
3817
|
-
<xsl:when test="$
|
3818
|
-
|
3969
|
+
<xsl:when test="$parent_table_page-width != ''">
|
3970
|
+
<xsl:value-of select="$parent_table_page-width"/>
|
3971
|
+
</xsl:when>
|
3972
|
+
<xsl:otherwise>
|
3973
|
+
<xsl:value-of select="@page-width"/>
|
3974
|
+
</xsl:otherwise>
|
3819
3975
|
</xsl:choose>
|
3820
3976
|
</xsl:variable>
|
3821
3977
|
|
@@ -3823,9 +3979,6 @@
|
|
3823
3979
|
<table_width>
|
3824
3980
|
<xsl:copy-of select="$table_widths"/>
|
3825
3981
|
</table_width>
|
3826
|
-
<!-- <debug>$table_widths/@width_min=<xsl:value-of select="$table_widths/table/@width_min"/></debug>
|
3827
|
-
<debug>$table_widths/@width_max=<xsl:value-of select="$table_widths/table/@width_max"/></debug>
|
3828
|
-
-->
|
3829
3982
|
<debug>$page_width=<xsl:value-of select="$page_width"/></debug>
|
3830
3983
|
</xsl:if>
|
3831
3984
|
|
@@ -3836,11 +3989,11 @@
|
|
3836
3989
|
<xsl:when test="$table_widths/table/@width_min >= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
|
3837
3990
|
<!-- call old algorithm -->
|
3838
3991
|
<case1/>
|
3839
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
|
3992
|
+
<!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
|
3840
3993
|
<xsl:call-template name="calculate-column-widths-proportional">
|
3841
3994
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3842
3995
|
<xsl:with-param name="table" select="$table"/>
|
3843
|
-
</xsl:call-template>
|
3996
|
+
</xsl:call-template> -->
|
3844
3997
|
</xsl:when>
|
3845
3998
|
<!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
|
3846
3999
|
<xsl:when test="$table_widths/table/@width_max <= $page_width">
|
@@ -3884,95 +4037,49 @@
|
|
3884
4037
|
<xsl:otherwise><unknown_case/></xsl:otherwise>
|
3885
4038
|
</xsl:choose>
|
3886
4039
|
|
4040
|
+
</xsl:template><xsl:template name="get-calculated-column-widths-autolayout-algorithm">
|
3887
4041
|
|
3888
|
-
|
3889
|
-
<xsl:
|
3890
|
-
|
3891
|
-
</xsl:copy>
|
3892
|
-
</xsl:template><xsl:template match="td | th" mode="determine_cell_widths">
|
3893
|
-
<xsl:copy>
|
3894
|
-
<xsl:copy-of select="@*"/>
|
4042
|
+
<!-- if nested 'dl' or 'table' -->
|
4043
|
+
<xsl:variable name="parent_table_id" select="normalize-space(ancestor::*[local-name() = 'table' or local-name() = 'dl'][1]/@id)"/>
|
4044
|
+
<parent_table_id><xsl:value-of select="$parent_table_id"/></parent_table_id>
|
3895
4045
|
|
3896
|
-
|
3897
|
-
<xsl:variable name="widths_max">
|
3898
|
-
<xsl:for-each select=".//*[local-name() = 'p']">
|
3899
|
-
<xsl:call-template name="add_width"/>
|
3900
|
-
</xsl:for-each>
|
3901
|
-
<xsl:if test="not(*[local-name() = 'p'])">
|
3902
|
-
<xsl:call-template name="add_width"/>
|
3903
|
-
</xsl:if>
|
3904
|
-
</xsl:variable>
|
3905
|
-
<xsl:variable name="width_max">
|
3906
|
-
<xsl:for-each select="xalan:nodeset($widths_max)//width">
|
3907
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
3908
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
3909
|
-
</xsl:for-each>
|
3910
|
-
</xsl:variable>
|
3911
|
-
<xsl:attribute name="width_max">
|
3912
|
-
<xsl:value-of select="$width_max"/>
|
3913
|
-
</xsl:attribute>
|
4046
|
+
<parent_element><xsl:value-of select="local-name(..)"/></parent_element>
|
3914
4047
|
|
3915
|
-
|
3916
|
-
|
3917
|
-
|
3918
|
-
<xsl:
|
3919
|
-
|
3920
|
-
|
3921
|
-
|
3922
|
-
|
3923
|
-
|
3924
|
-
</xsl:
|
4048
|
+
<xsl:variable name="parent_table_page-width_">
|
4049
|
+
<xsl:if test="$parent_table_id != ''">
|
4050
|
+
<!-- determine column number in the parent table -->
|
4051
|
+
<xsl:variable name="parent_table_column_number">
|
4052
|
+
<xsl:choose>
|
4053
|
+
<xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
|
4054
|
+
<xsl:otherwise> <!-- parent is table -->
|
4055
|
+
<xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
|
4056
|
+
</xsl:otherwise>
|
4057
|
+
</xsl:choose>
|
3925
4058
|
</xsl:variable>
|
3926
|
-
|
3927
|
-
|
3928
|
-
</xsl:call-template>
|
3929
|
-
</xsl:variable>
|
3930
|
-
|
3931
|
-
<xsl:variable name="max_word_length">
|
3932
|
-
<xsl:call-template name="max_length">
|
3933
|
-
<xsl:with-param name="words" select="xalan:nodeset($words)"/>
|
3934
|
-
</xsl:call-template>
|
3935
|
-
</xsl:variable>
|
3936
|
-
<xsl:variable name="width_min">
|
3937
|
-
<xsl:value-of select="$max_word_length"/>
|
3938
|
-
</xsl:variable>
|
3939
|
-
<xsl:attribute name="width_min">
|
3940
|
-
<xsl:value-of select="$width_min"/>
|
3941
|
-
</xsl:attribute>
|
3942
|
-
<!-- width_max="1" width_min="1.5"> --> <!-- see 'tokenize' template, multiply 1.5 for all latin capitals -->
|
3943
|
-
<xsl:if test="$width_min > $width_max">
|
3944
|
-
<xsl:attribute name="width_max">
|
3945
|
-
<xsl:value-of select="$width_min"/>
|
3946
|
-
</xsl:attribute>
|
4059
|
+
<!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
|
4060
|
+
<xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
|
3947
4061
|
</xsl:if>
|
3948
|
-
<xsl:if test="$width_min = 0">
|
3949
|
-
<xsl:attribute name="width_min">1</xsl:attribute>
|
3950
|
-
</xsl:if>
|
3951
|
-
|
3952
|
-
<xsl:apply-templates select="node()" mode="determine_cell_widths"/>
|
3953
|
-
|
3954
|
-
</xsl:copy>
|
3955
|
-
</xsl:template><xsl:template name="add_width">
|
3956
|
-
<xsl:variable name="p_text"><xsl:apply-templates select="." mode="td_text"/></xsl:variable>
|
3957
|
-
<xsl:variable name="p_text_len_" select="string-length(normalize-space($p_text))"/>
|
3958
|
-
|
3959
|
-
<xsl:variable name="p_text_len">
|
3960
|
-
<xsl:choose>
|
3961
|
-
<xsl:when test="normalize-space(translate($p_text, concat($upper,'0123456789'), '')) = ''"> <!-- english word in CAPITAL letters -->
|
3962
|
-
<xsl:value-of select="$p_text_len_ * 1.5"/>
|
3963
|
-
</xsl:when>
|
3964
|
-
<xsl:otherwise><xsl:value-of select="$p_text_len_"/></xsl:otherwise>
|
3965
|
-
</xsl:choose>
|
3966
4062
|
</xsl:variable>
|
4063
|
+
<xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
|
3967
4064
|
|
3968
|
-
|
3969
|
-
|
3970
|
-
|
3971
|
-
|
3972
|
-
|
3973
|
-
|
4065
|
+
<!-- get current table id -->
|
4066
|
+
<xsl:variable name="table_id" select="@id"/>
|
4067
|
+
|
4068
|
+
<xsl:choose>
|
4069
|
+
<xsl:when test="$parent_table_id = '' or $parent_table_page-width = ''">
|
4070
|
+
<!-- find table by id in the file 'table_widths' and get all `<column>...</column> -->
|
4071
|
+
<xsl:copy-of select="$table_widths_from_if_calculated//table[@id = $table_id]/node()"/>
|
4072
|
+
</xsl:when>
|
4073
|
+
<xsl:otherwise>
|
4074
|
+
<!-- recalculate columns width based on parent table width -->
|
4075
|
+
<xsl:for-each select="$table_widths_from_if//table[@id = $table_id]">
|
4076
|
+
<xsl:call-template name="calculate-column-widths-autolayout-algorithm">
|
4077
|
+
<xsl:with-param name="parent_table_page-width" select="$parent_table_page-width"/> <!-- padding-left = 2mm = 50000-->
|
4078
|
+
</xsl:call-template>
|
4079
|
+
</xsl:for-each>
|
4080
|
+
</xsl:otherwise>
|
4081
|
+
</xsl:choose>
|
3974
4082
|
|
3975
|
-
<width><xsl:value-of select="$p_text_len + $math_addon_length"/></width>
|
3976
4083
|
</xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths-if">
|
3977
4084
|
<xsl:copy>
|
3978
4085
|
<xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
|
@@ -4024,19 +4131,25 @@
|
|
4024
4131
|
<fo:table-row>
|
4025
4132
|
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
4026
4133
|
|
4027
|
-
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
4028
|
-
<xsl:with-param name="continued">true</xsl:with-param>
|
4029
|
-
</xsl:apply-templates>
|
4030
4134
|
|
4031
4135
|
|
4032
|
-
|
4033
|
-
<xsl:
|
4034
|
-
|
4136
|
+
|
4137
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
4138
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
4139
|
+
</xsl:apply-templates>
|
4140
|
+
|
4141
|
+
|
4142
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
4143
|
+
<xsl:call-template name="table_name_fn_display"/>
|
4144
|
+
</xsl:for-each>
|
4035
4145
|
|
4036
|
-
|
4037
|
-
|
4038
|
-
|
4039
|
-
|
4146
|
+
<fo:block text-align="right" font-style="italic">
|
4147
|
+
<xsl:text> </xsl:text>
|
4148
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
4149
|
+
</fo:block>
|
4150
|
+
|
4151
|
+
|
4152
|
+
|
4040
4153
|
|
4041
4154
|
|
4042
4155
|
</fo:table-cell>
|
@@ -4078,77 +4191,91 @@
|
|
4078
4191
|
</xsl:choose>
|
4079
4192
|
</xsl:variable>
|
4080
4193
|
|
4081
|
-
|
4082
|
-
|
4083
|
-
|
4194
|
+
|
4195
|
+
<xsl:variable name="tableWithNotesAndFootnotes">
|
4196
|
+
|
4197
|
+
<fo:table keep-with-previous="always">
|
4198
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
|
4199
|
+
<xsl:variable name="name" select="local-name()"/>
|
4200
|
+
<xsl:choose>
|
4201
|
+
<xsl:when test="$name = 'border-top'">
|
4202
|
+
<xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
|
4203
|
+
</xsl:when>
|
4204
|
+
<xsl:when test="$name = 'border'">
|
4205
|
+
<xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
|
4206
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
4207
|
+
</xsl:when>
|
4208
|
+
<xsl:otherwise>
|
4209
|
+
<xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
|
4210
|
+
</xsl:otherwise>
|
4211
|
+
</xsl:choose>
|
4212
|
+
</xsl:for-each>
|
4213
|
+
|
4214
|
+
|
4215
|
+
|
4084
4216
|
<xsl:choose>
|
4085
|
-
<xsl:when test="$name
|
4086
|
-
<xsl:
|
4087
|
-
|
4088
|
-
|
4089
|
-
<xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
|
4090
|
-
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
4217
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
4218
|
+
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
4219
|
+
<fo:table-column column-width="{@width}"/>
|
4220
|
+
</xsl:for-each>
|
4091
4221
|
</xsl:when>
|
4092
4222
|
<xsl:otherwise>
|
4093
|
-
|
4223
|
+
<!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
|
4224
|
+
<xsl:call-template name="insertTableColumnWidth">
|
4225
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
4226
|
+
</xsl:call-template>
|
4094
4227
|
</xsl:otherwise>
|
4095
4228
|
</xsl:choose>
|
4096
|
-
|
4097
|
-
|
4098
|
-
|
4099
|
-
|
4100
|
-
|
4101
|
-
|
4102
|
-
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
4103
|
-
<fo:table-column column-width="{@width}"/>
|
4104
|
-
</xsl:for-each>
|
4105
|
-
</xsl:when>
|
4106
|
-
<xsl:otherwise>
|
4107
|
-
<!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
|
4108
|
-
<xsl:call-template name="insertTableColumnWidth">
|
4109
|
-
<xsl:with-param name="colwidths" select="$colwidths"/>
|
4110
|
-
</xsl:call-template>
|
4111
|
-
</xsl:otherwise>
|
4112
|
-
</xsl:choose>
|
4113
|
-
|
4114
|
-
<fo:table-body>
|
4115
|
-
<fo:table-row>
|
4116
|
-
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
4117
|
-
|
4118
|
-
|
4229
|
+
|
4230
|
+
<fo:table-body>
|
4231
|
+
<fo:table-row>
|
4232
|
+
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
4233
|
+
|
4234
|
+
|
4119
4235
|
|
4120
|
-
|
4121
|
-
|
4122
|
-
<!-- fn will be processed inside 'note' processing -->
|
4123
|
-
|
4124
|
-
|
4125
|
-
|
4126
|
-
|
4127
|
-
|
4128
|
-
|
4129
|
-
<!-- for BSI (not PAS) display Notes before footnotes -->
|
4130
|
-
|
4131
|
-
|
4132
|
-
<!-- except gb and bsi -->
|
4133
|
-
|
4134
|
-
<xsl:apply-templates select="../*[local-name()='note']"/>
|
4135
4236
|
|
4136
|
-
|
4137
|
-
|
4138
|
-
|
4139
|
-
|
4140
|
-
|
4141
|
-
|
4142
|
-
|
4143
|
-
|
4144
|
-
|
4145
|
-
|
4146
|
-
|
4147
|
-
|
4148
|
-
|
4149
|
-
|
4150
|
-
|
4151
|
-
|
4237
|
+
|
4238
|
+
<!-- fn will be processed inside 'note' processing -->
|
4239
|
+
|
4240
|
+
|
4241
|
+
|
4242
|
+
|
4243
|
+
|
4244
|
+
|
4245
|
+
<!-- for BSI (not PAS) display Notes before footnotes -->
|
4246
|
+
|
4247
|
+
|
4248
|
+
<!-- except gb and bsi -->
|
4249
|
+
|
4250
|
+
<xsl:apply-templates select="../*[local-name()='note']"/>
|
4251
|
+
|
4252
|
+
|
4253
|
+
|
4254
|
+
<!-- horizontal row separator -->
|
4255
|
+
|
4256
|
+
|
4257
|
+
<!-- fn processing -->
|
4258
|
+
|
4259
|
+
<xsl:call-template name="table_fn_display"/>
|
4260
|
+
|
4261
|
+
|
4262
|
+
|
4263
|
+
<!-- for PAS display Notes after footnotes -->
|
4264
|
+
|
4265
|
+
|
4266
|
+
</fo:table-cell>
|
4267
|
+
</fo:table-row>
|
4268
|
+
</fo:table-body>
|
4269
|
+
|
4270
|
+
</fo:table>
|
4271
|
+
</xsl:variable>
|
4272
|
+
|
4273
|
+
<xsl:if test="normalize-space($tableWithNotesAndFootnotes) != ''">
|
4274
|
+
<xsl:copy-of select="$tableWithNotesAndFootnotes"/>
|
4275
|
+
</xsl:if>
|
4276
|
+
|
4277
|
+
|
4278
|
+
|
4152
4279
|
</xsl:if>
|
4153
4280
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
4154
4281
|
|
@@ -4293,6 +4420,9 @@
|
|
4293
4420
|
</xsl:choose>
|
4294
4421
|
|
4295
4422
|
|
4423
|
+
|
4424
|
+
|
4425
|
+
|
4296
4426
|
|
4297
4427
|
|
4298
4428
|
<xsl:call-template name="setTableRowAttributes"/>
|
@@ -4312,6 +4442,8 @@
|
|
4312
4442
|
|
4313
4443
|
|
4314
4444
|
|
4445
|
+
|
4446
|
+
|
4315
4447
|
<xsl:call-template name="setTableRowAttributes"/>
|
4316
4448
|
<xsl:apply-templates/>
|
4317
4449
|
</fo:table-row>
|
@@ -4393,6 +4525,8 @@
|
|
4393
4525
|
|
4394
4526
|
|
4395
4527
|
|
4528
|
+
|
4529
|
+
|
4396
4530
|
|
4397
4531
|
|
4398
4532
|
<xsl:if test="count(*) = 1 and (local-name(*[1]) = 'stem' or local-name(*[1]) = 'figure')">
|
@@ -4471,7 +4605,11 @@
|
|
4471
4605
|
|
4472
4606
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
4473
4607
|
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
4474
|
-
<xsl:variable name="
|
4608
|
+
<xsl:variable name="reference_">
|
4609
|
+
<xsl:value-of select="@reference"/>
|
4610
|
+
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
4611
|
+
</xsl:variable>
|
4612
|
+
<xsl:variable name="reference" select="normalize-space($reference_)"/>
|
4475
4613
|
<!-- fn sequence number in document -->
|
4476
4614
|
<xsl:variable name="current_fn_number">
|
4477
4615
|
<xsl:choose>
|
@@ -4491,6 +4629,7 @@
|
|
4491
4629
|
<xsl:variable name="footnote_inline">
|
4492
4630
|
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
4493
4631
|
|
4632
|
+
|
4494
4633
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
4495
4634
|
<xsl:value-of select="$current_fn_number_text"/>
|
4496
4635
|
</fo:basic-link>
|
@@ -4512,8 +4651,12 @@
|
|
4512
4651
|
<fo:block xsl:use-attribute-sets="fn-body-style">
|
4513
4652
|
|
4514
4653
|
|
4654
|
+
|
4515
4655
|
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
4516
4656
|
|
4657
|
+
|
4658
|
+
|
4659
|
+
|
4517
4660
|
<xsl:value-of select="$current_fn_number_text"/>
|
4518
4661
|
</fo:inline>
|
4519
4662
|
<xsl:apply-templates/>
|
@@ -4546,7 +4689,7 @@
|
|
4546
4689
|
<xsl:copy-of select="node()"/>
|
4547
4690
|
</fn>
|
4548
4691
|
</xsl:for-each>
|
4549
|
-
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
4692
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='boilerplate']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
4550
4693
|
<xsl:sort select="@displayorder" data-type="number"/>
|
4551
4694
|
<xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
4552
4695
|
<!-- copy unique fn -->
|
@@ -4845,11 +4988,19 @@
|
|
4845
4988
|
|
4846
4989
|
|
4847
4990
|
|
4991
|
+
|
4992
|
+
<xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
|
4993
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
4994
|
+
</xsl:if>
|
4995
|
+
|
4848
4996
|
<fo:block>
|
4849
4997
|
|
4850
4998
|
|
4851
4999
|
|
4852
5000
|
|
5001
|
+
<xsl:apply-templates select="*[local-name() = 'name']">
|
5002
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
5003
|
+
</xsl:apply-templates>
|
4853
5004
|
|
4854
5005
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
4855
5006
|
<!-- to determine start of table -->
|
@@ -4872,6 +5023,7 @@
|
|
4872
5023
|
</xsl:choose>
|
4873
5024
|
|
4874
5025
|
|
5026
|
+
|
4875
5027
|
<xsl:choose>
|
4876
5028
|
<xsl:when test="$isGenerateTableIF = 'true'">
|
4877
5029
|
<!-- generate IF for table widths -->
|
@@ -5000,6 +5152,18 @@
|
|
5000
5152
|
</xsl:if> <!-- END: a few components -->
|
5001
5153
|
</fo:block-container>
|
5002
5154
|
</fo:block-container>
|
5155
|
+
|
5156
|
+
<xsl:if test="$isGenerateTableIF = 'true'"> <!-- process nested 'dl' -->
|
5157
|
+
<xsl:apply-templates select="*[local-name() = 'dd']/*[local-name() = 'dl']"/>
|
5158
|
+
</xsl:if>
|
5159
|
+
|
5160
|
+
</xsl:template><xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
|
5161
|
+
<xsl:param name="process">false</xsl:param>
|
5162
|
+
<xsl:if test="$process = 'true'">
|
5163
|
+
<fo:block xsl:use-attribute-sets="dl-name-style">
|
5164
|
+
<xsl:apply-templates/>
|
5165
|
+
</fo:block>
|
5166
|
+
</xsl:if>
|
5003
5167
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
5004
5168
|
<xsl:param name="colwidths"/>
|
5005
5169
|
<xsl:param name="maxlength_dt"/>
|
@@ -5008,6 +5172,11 @@
|
|
5008
5172
|
<!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
|
5009
5173
|
|
5010
5174
|
<xsl:choose>
|
5175
|
+
<xsl:when test="xalan:nodeset($colwidths)/autolayout">
|
5176
|
+
<xsl:call-template name="insertTableColumnWidth">
|
5177
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
5178
|
+
</xsl:call-template>
|
5179
|
+
</xsl:when>
|
5011
5180
|
<xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
|
5012
5181
|
<fo:table-column column-width="50%"/>
|
5013
5182
|
<fo:table-column column-width="50%"/>
|
@@ -5260,12 +5429,24 @@
|
|
5260
5429
|
</td>
|
5261
5430
|
<td>
|
5262
5431
|
|
5263
|
-
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()"/>
|
5432
|
+
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
|
5433
|
+
|
5434
|
+
<!-- get paragraphs from nested 'dl' -->
|
5435
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
5436
|
+
|
5264
5437
|
|
5265
5438
|
</td>
|
5266
5439
|
</tr>
|
5267
5440
|
|
5268
|
-
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='
|
5441
|
+
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
|
5442
|
+
<xsl:for-each select="*[local-name() = 'dt']">
|
5443
|
+
<p>
|
5444
|
+
<xsl:copy-of select="node()"/>
|
5445
|
+
<xsl:text> </xsl:text>
|
5446
|
+
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'p']/node()"/>
|
5447
|
+
</p>
|
5448
|
+
</xsl:for-each>
|
5449
|
+
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if_nested"/><xsl:template match="*[local-name()='em']">
|
5269
5450
|
<fo:inline font-style="italic">
|
5270
5451
|
<xsl:apply-templates/>
|
5271
5452
|
</fo:inline>
|
@@ -5296,7 +5477,7 @@
|
|
5296
5477
|
|
5297
5478
|
|
5298
5479
|
|
5299
|
-
|
5480
|
+
<!-- 10 -->
|
5300
5481
|
|
5301
5482
|
10
|
5302
5483
|
|
@@ -6175,6 +6356,13 @@
|
|
6175
6356
|
</xsl:variable>
|
6176
6357
|
<fo:inline xsl:use-attribute-sets="link-style">
|
6177
6358
|
|
6359
|
+
<xsl:if test="starts-with(normalize-space(@target), 'mailto:')">
|
6360
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
6361
|
+
</xsl:if>
|
6362
|
+
|
6363
|
+
|
6364
|
+
|
6365
|
+
|
6178
6366
|
|
6179
6367
|
|
6180
6368
|
|
@@ -6388,6 +6576,7 @@
|
|
6388
6576
|
|
6389
6577
|
|
6390
6578
|
|
6579
|
+
|
6391
6580
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
6392
6581
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
6393
6582
|
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
@@ -6410,6 +6599,7 @@
|
|
6410
6599
|
<xsl:otherwise>
|
6411
6600
|
|
6412
6601
|
|
6602
|
+
|
6413
6603
|
</xsl:otherwise>
|
6414
6604
|
</xsl:choose>
|
6415
6605
|
</xsl:variable>
|
@@ -6426,6 +6616,7 @@
|
|
6426
6616
|
</xsl:when>
|
6427
6617
|
<xsl:otherwise>
|
6428
6618
|
|
6619
|
+
|
6429
6620
|
<xsl:text>:</xsl:text>
|
6430
6621
|
|
6431
6622
|
|
@@ -6437,7 +6628,19 @@
|
|
6437
6628
|
<xsl:value-of select="$suffix"/>
|
6438
6629
|
</xsl:if>
|
6439
6630
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
|
6440
|
-
<
|
6631
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
6632
|
+
<xsl:choose>
|
6633
|
+
<xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
|
6634
|
+
<fo:inline xsl:use-attribute-sets="termnote-p-style">
|
6635
|
+
<xsl:apply-templates/>
|
6636
|
+
</fo:inline>
|
6637
|
+
</xsl:when>
|
6638
|
+
<xsl:otherwise>
|
6639
|
+
<fo:block xsl:use-attribute-sets="termnote-p-style">
|
6640
|
+
<xsl:apply-templates/>
|
6641
|
+
</fo:block>
|
6642
|
+
</xsl:otherwise>
|
6643
|
+
</xsl:choose>
|
6441
6644
|
</xsl:template><xsl:template match="*[local-name() = 'terms']">
|
6442
6645
|
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
6443
6646
|
<fo:block id="{@id}">
|
@@ -7192,6 +7395,9 @@
|
|
7192
7395
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
7193
7396
|
|
7194
7397
|
|
7398
|
+
|
7399
|
+
|
7400
|
+
|
7195
7401
|
<xsl:apply-templates/>
|
7196
7402
|
</fo:block>
|
7197
7403
|
</xsl:if>
|
@@ -7252,9 +7458,9 @@
|
|
7252
7458
|
<xsl:apply-templates/>
|
7253
7459
|
</xsl:otherwise>
|
7254
7460
|
</xsl:choose>
|
7255
|
-
</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() = 'xref']" mode="contents">
|
7461
|
+
</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() = 'xref'] | *[local-name() = 'eref']" mode="contents">
|
7256
7462
|
<xsl:value-of select="."/>
|
7257
|
-
</xsl:template><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
7463
|
+
</xsl:template><xsl:template match="*[local-name() = 'review']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
7258
7464
|
<xsl:text> </xsl:text>
|
7259
7465
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
7260
7466
|
<xsl:copy>
|
@@ -7325,9 +7531,12 @@
|
|
7325
7531
|
|
7326
7532
|
|
7327
7533
|
|
7328
|
-
|
7534
|
+
<!-- 9 -->
|
7329
7535
|
|
7330
7536
|
9
|
7537
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
7538
|
+
<xsl:if test="$doctype = 'standard' and $stage = 'published'">8</xsl:if>
|
7539
|
+
</xsl:if> -->
|
7331
7540
|
|
7332
7541
|
|
7333
7542
|
|
@@ -7409,7 +7618,7 @@
|
|
7409
7618
|
<xsl:for-each select="xalan:nodeset($text_step4)/node()">
|
7410
7619
|
<xsl:choose>
|
7411
7620
|
<xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
|
7412
|
-
<xsl:call-template name="interspers">
|
7621
|
+
<xsl:call-template name="interspers-java">
|
7413
7622
|
<xsl:with-param name="str" select="."/>
|
7414
7623
|
</xsl:call-template>
|
7415
7624
|
</xsl:when>
|
@@ -7459,6 +7668,10 @@
|
|
7459
7668
|
<xsl:with-param name="char" select="$char"/>
|
7460
7669
|
</xsl:call-template>
|
7461
7670
|
</xsl:if>
|
7671
|
+
</xsl:template><xsl:template name="interspers-java">
|
7672
|
+
<xsl:param name="str"/>
|
7673
|
+
<xsl:param name="char" select="$zero_width_space"/>
|
7674
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($str),'([^ -.:=_—])',concat('$1', $char))"/> <!-- insert $char after each char excep space, - . : = _ etc. -->
|
7462
7675
|
</xsl:template><xsl:template match="*" mode="syntax_highlight">
|
7463
7676
|
<xsl:apply-templates mode="syntax_highlight"/>
|
7464
7677
|
</xsl:template><xsl:variable name="syntax_highlight_styles_">
|
@@ -7768,10 +7981,14 @@
|
|
7768
7981
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
7769
7982
|
<xsl:variable name="element">inline
|
7770
7983
|
|
7984
|
+
|
7771
7985
|
</xsl:variable>
|
7772
7986
|
<xsl:choose>
|
7773
7987
|
<xsl:when test="contains($element, 'block')">
|
7774
7988
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
7989
|
+
|
7990
|
+
|
7991
|
+
|
7775
7992
|
<xsl:apply-templates/>
|
7776
7993
|
</fo:block>
|
7777
7994
|
</xsl:when>
|
@@ -7884,6 +8101,7 @@
|
|
7884
8101
|
</xsl:if>
|
7885
8102
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
7886
8103
|
|
8104
|
+
|
7887
8105
|
<xsl:apply-templates/>
|
7888
8106
|
</fo:block>
|
7889
8107
|
</fo:block-container>
|
@@ -8050,6 +8268,8 @@
|
|
8050
8268
|
|
8051
8269
|
|
8052
8270
|
|
8271
|
+
|
8272
|
+
|
8053
8273
|
<fo:basic-link fox:alt-text="{@citeas}">
|
8054
8274
|
<xsl:if test="normalize-space(@citeas) = ''">
|
8055
8275
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
@@ -8103,6 +8323,7 @@
|
|
8103
8323
|
|
8104
8324
|
|
8105
8325
|
|
8326
|
+
|
8106
8327
|
<xsl:choose>
|
8107
8328
|
<xsl:when test="$depth = 2">3</xsl:when>
|
8108
8329
|
<xsl:otherwise>4</xsl:otherwise>
|
@@ -8428,6 +8649,11 @@
|
|
8428
8649
|
</xsl:otherwise>
|
8429
8650
|
</xsl:choose>
|
8430
8651
|
</xsl:template><xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
|
8652
|
+
|
8653
|
+
<xsl:apply-templates select="*[local-name() = 'name']">
|
8654
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
8655
|
+
</xsl:apply-templates>
|
8656
|
+
|
8431
8657
|
<fo:list-block xsl:use-attribute-sets="list-style">
|
8432
8658
|
|
8433
8659
|
|
@@ -8438,12 +8664,23 @@
|
|
8438
8664
|
|
8439
8665
|
|
8440
8666
|
|
8667
|
+
<xsl:if test="*[local-name() = 'name']">
|
8668
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
8669
|
+
</xsl:if>
|
8670
|
+
|
8441
8671
|
<xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
|
8442
8672
|
</fo:list-block>
|
8443
8673
|
<!-- <xsl:for-each select="./iho:note">
|
8444
8674
|
<xsl:call-template name="note"/>
|
8445
8675
|
</xsl:for-each> -->
|
8446
8676
|
<xsl:apply-templates select="./*[local-name() = 'note']"/>
|
8677
|
+
</xsl:template><xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
|
8678
|
+
<xsl:param name="process">false</xsl:param>
|
8679
|
+
<xsl:if test="$process = 'true'">
|
8680
|
+
<fo:block xsl:use-attribute-sets="list-name-style">
|
8681
|
+
<xsl:apply-templates/>
|
8682
|
+
</fo:block>
|
8683
|
+
</xsl:if>
|
8447
8684
|
</xsl:template><xsl:template match="*[local-name()='li']">
|
8448
8685
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
8449
8686
|
<xsl:copy-of select="@id"/>
|
@@ -8455,6 +8692,8 @@
|
|
8455
8692
|
|
8456
8693
|
|
8457
8694
|
|
8695
|
+
|
8696
|
+
|
8458
8697
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
8459
8698
|
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
8460
8699
|
<xsl:call-template name="append_add-style"/>
|
@@ -8712,9 +8951,9 @@
|
|
8712
8951
|
</fo:block>
|
8713
8952
|
|
8714
8953
|
|
8715
|
-
</xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
|
8954
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
|
8716
8955
|
|
8717
|
-
<!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
8956
|
+
<!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
8718
8957
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
8719
8958
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
8720
8959
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
@@ -8725,7 +8964,7 @@
|
|
8725
8964
|
|
8726
8965
|
<xsl:value-of select="*[local-name()='docidentifier'][@type = 'metanorma-ordinal']"/>
|
8727
8966
|
<xsl:if test="not(*[local-name()='docidentifier'][@type = 'metanorma-ordinal'])">
|
8728
|
-
<xsl:number format="[1]"/>
|
8967
|
+
<xsl:number format="[1]" count="*[local-name()='bibitem'][not(@hidden = 'true')]"/>
|
8729
8968
|
</xsl:if>
|
8730
8969
|
|
8731
8970
|
</fo:inline>
|
@@ -8747,32 +8986,14 @@
|
|
8747
8986
|
<xsl:variable name="docidentifier">
|
8748
8987
|
<xsl:choose>
|
8749
8988
|
<xsl:when test="*[local-name()='docidentifier']/@type = 'metanorma'"/>
|
8750
|
-
<xsl:otherwise><xsl:value-of select="*[local-name()='docidentifier'][not(@type = 'metanorma-ordinal')]"/></xsl:otherwise>
|
8989
|
+
<xsl:otherwise><xsl:value-of select="*[local-name()='docidentifier'][not(@type = 'metanorma-ordinal') and not(@type = 'BIPM')]"/></xsl:otherwise>
|
8751
8990
|
</xsl:choose>
|
8752
8991
|
</xsl:variable>
|
8753
8992
|
<xsl:value-of select="$docidentifier"/>
|
8754
8993
|
|
8755
|
-
<xsl:
|
8756
|
-
|
8757
|
-
|
8758
|
-
<xsl:apply-templates select="*[local-name()='formattedref']"/>
|
8759
|
-
</xsl:when>
|
8760
|
-
<xsl:otherwise>
|
8761
|
-
<xsl:apply-templates select="*[local-name()='note']"/>
|
8762
|
-
<xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
|
8763
|
-
<xsl:choose>
|
8764
|
-
<xsl:when test="*[local-name()='title'][@type = 'main' and @language = $lang]">
|
8765
|
-
<xsl:apply-templates select="*[local-name()='title'][@type = 'main' and @language = $lang]"/>
|
8766
|
-
</xsl:when>
|
8767
|
-
<xsl:when test="*[local-name()='title'][@type = 'main' and @language = 'en']">
|
8768
|
-
<xsl:apply-templates select="*[local-name()='title'][@type = 'main' and @language = 'en']"/>
|
8769
|
-
</xsl:when>
|
8770
|
-
<xsl:otherwise>
|
8771
|
-
<xsl:apply-templates select="*[local-name()='title']"/>
|
8772
|
-
</xsl:otherwise>
|
8773
|
-
</xsl:choose>
|
8774
|
-
</xsl:otherwise>
|
8775
|
-
</xsl:choose>
|
8994
|
+
<xsl:if test="*[local-name()='formattedref'] and normalize-space($docidentifier) != ''">, </xsl:if>
|
8995
|
+
<xsl:apply-templates select="*[local-name()='formattedref']"/>
|
8996
|
+
|
8776
8997
|
<!-- end JCGM bibitem processing -->
|
8777
8998
|
|
8778
8999
|
</xsl:template><xsl:template name="processBibitemDocId">
|
@@ -9078,36 +9299,58 @@
|
|
9078
9299
|
|
9079
9300
|
|
9080
9301
|
|
9302
|
+
<xsl:if test="@type = 'editorial'">
|
9303
|
+
<xsl:attribute name="color">green</xsl:attribute>
|
9304
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
9305
|
+
|
9306
|
+
<!-- <xsl:variable name="note-style">
|
9307
|
+
<style xsl:use-attribute-sets="note-style"></style>
|
9308
|
+
</xsl:variable>
|
9309
|
+
<xsl:for-each select="xalan:nodeset($note-style)//style/@*">
|
9310
|
+
<xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
|
9311
|
+
</xsl:for-each> -->
|
9312
|
+
</xsl:if>
|
9313
|
+
|
9081
9314
|
|
9082
9315
|
|
9083
9316
|
|
9084
|
-
|
9085
|
-
|
9317
|
+
|
9318
|
+
|
9319
|
+
<xsl:call-template name="displayAdmonitionName">
|
9320
|
+
<xsl:with-param name="sep"> — </xsl:with-param>
|
9321
|
+
</xsl:call-template>
|
9086
9322
|
|
9087
9323
|
|
9088
9324
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
9089
9325
|
</fo:block>
|
9090
9326
|
|
9091
9327
|
</xsl:template><xsl:template name="displayAdmonitionName">
|
9092
|
-
|
9328
|
+
<xsl:param name="sep"/> <!-- Example: ' - ' -->
|
9329
|
+
<!-- <xsl:choose>
|
9330
|
+
<xsl:when test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
9331
|
+
<xsl:choose>
|
9332
|
+
<xsl:when test="@type='important'"><xsl:apply-templates select="@type"/></xsl:when>
|
9333
|
+
<xsl:otherwise>
|
9334
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
9335
|
+
</xsl:otherwise>
|
9336
|
+
</xsl:choose>
|
9337
|
+
</xsl:when>
|
9338
|
+
<xsl:otherwise>
|
9093
9339
|
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
9094
9340
|
<xsl:if test="not(*[local-name() = 'name'])">
|
9095
9341
|
<xsl:apply-templates select="@type"/>
|
9096
9342
|
</xsl:if>
|
9097
|
-
|
9098
|
-
|
9099
|
-
<xsl:
|
9100
|
-
|
9101
|
-
<xsl:variable name="admonition_type_">
|
9102
|
-
<xsl:call-template name="getLocalizedString">
|
9103
|
-
<xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
|
9104
|
-
</xsl:call-template>
|
9343
|
+
</xsl:otherwise>
|
9344
|
+
</xsl:choose> -->
|
9345
|
+
<xsl:variable name="name">
|
9346
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
9105
9347
|
</xsl:variable>
|
9106
|
-
<xsl:
|
9107
|
-
<xsl:
|
9108
|
-
|
9109
|
-
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
|
9348
|
+
<xsl:copy-of select="$name"/>
|
9349
|
+
<xsl:if test="normalize-space($name) != ''">
|
9350
|
+
<xsl:value-of select="$sep"/>
|
9110
9351
|
</xsl:if>
|
9352
|
+
</xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
|
9353
|
+
<xsl:apply-templates/>
|
9111
9354
|
</xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
|
9112
9355
|
|
9113
9356
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
@@ -9278,6 +9521,8 @@
|
|
9278
9521
|
</xsl:when>
|
9279
9522
|
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
|
9280
9523
|
</xsl:choose>
|
9524
|
+
</xsl:template><xsl:template match="*[local-name() = 'lang_none']">
|
9525
|
+
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
9281
9526
|
</xsl:template><xsl:template name="printEdition">
|
9282
9527
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
9283
9528
|
<xsl:text> </xsl:text>
|
@@ -9384,6 +9629,27 @@
|
|
9384
9629
|
</xsl:when>
|
9385
9630
|
<xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
|
9386
9631
|
</xsl:choose>
|
9632
|
+
</xsl:template><xsl:template name="getMonthLocalizedByNum">
|
9633
|
+
<xsl:param name="num"/>
|
9634
|
+
<xsl:variable name="monthStr">
|
9635
|
+
<xsl:choose>
|
9636
|
+
<xsl:when test="$num = '01'">january</xsl:when>
|
9637
|
+
<xsl:when test="$num = '02'">february</xsl:when>
|
9638
|
+
<xsl:when test="$num = '03'">march</xsl:when>
|
9639
|
+
<xsl:when test="$num = '04'">april</xsl:when>
|
9640
|
+
<xsl:when test="$num = '05'">may</xsl:when>
|
9641
|
+
<xsl:when test="$num = '06'">june</xsl:when>
|
9642
|
+
<xsl:when test="$num = '07'">july</xsl:when>
|
9643
|
+
<xsl:when test="$num = '08'">august</xsl:when>
|
9644
|
+
<xsl:when test="$num = '09'">september</xsl:when>
|
9645
|
+
<xsl:when test="$num = '10'">october</xsl:when>
|
9646
|
+
<xsl:when test="$num = '11'">november</xsl:when>
|
9647
|
+
<xsl:when test="$num = '12'">december</xsl:when>
|
9648
|
+
</xsl:choose>
|
9649
|
+
</xsl:variable>
|
9650
|
+
<xsl:call-template name="getLocalizedString">
|
9651
|
+
<xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param>
|
9652
|
+
</xsl:call-template>
|
9387
9653
|
</xsl:template><xsl:template name="insertKeywords">
|
9388
9654
|
<xsl:param name="sorting" select="'true'"/>
|
9389
9655
|
<xsl:param name="charAtEnd" select="'.'"/>
|
@@ -9580,6 +9846,7 @@
|
|
9580
9846
|
|
9581
9847
|
|
9582
9848
|
|
9849
|
+
|
9583
9850
|
|
9584
9851
|
|
9585
9852
|
|