metanorma-ogc 2.1.1 → 2.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -221,7 +221,10 @@
221
221
  <xsl:with-param name="letter-spacing" select="0.3"/>
222
222
  </xsl:call-template>
223
223
  </fo:block>
224
- <fo:block font-size="10pt">External identifier of this OGC<fo:inline font-size="58%" baseline-shift="30%">®</fo:inline> document: <fo:inline font-weight="normal"><xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:docidentifier[@type='ogc-external']"/></fo:inline></fo:block>
224
+ <xsl:variable name="ogc_external" select="/ogc:ogc-standard/ogc:bibdata/ogc:docidentifier[@type='ogc-external']"/>
225
+ <xsl:if test="normalize-space($ogc_external) != ''">
226
+ <fo:block font-size="10pt">External identifier of this OGC<fo:inline font-size="58%" baseline-shift="30%">®</fo:inline> document: <fo:inline font-weight="normal"><xsl:value-of select="$ogc_external"/></fo:inline></fo:block>
227
+ </xsl:if>
225
228
  </fo:table-cell>
226
229
  <fo:table-cell text-align="right">
227
230
  <fo:block>
@@ -263,7 +266,7 @@
263
266
  <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctype))"/>
264
267
  </xsl:call-template>
265
268
  <xsl:value-of select="$linebreak"/>
266
- <xsl:variable name="docsubtype" select="normalize-space(/ogc:ogc-standard/ogc:bibdata/ogc:ext/ogc:docsubtype)"/>
269
+ <xsl:variable name="docsubtype" select="normalize-space(/ogc:ogc-standard/ogc:bibdata/ogc:ext/ogc:subdoctype)"/>
267
270
  <xsl:variable name="docsubtype_str">
268
271
  <xsl:choose>
269
272
  <xsl:when test="$docsubtype = 'implementation'">Implementation</xsl:when>
@@ -576,7 +579,7 @@
576
579
  <fo:block line-height="125%">
577
580
  <!-- Abstract, Keywords, Preface, Submitting Organizations, Submitters -->
578
581
 
579
- <xsl:for-each select="/*/*[local-name()='preface']/*">
582
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
580
583
  <xsl:sort select="@displayorder" data-type="number"/>
581
584
 
582
585
  <xsl:if test="local-name() = 'foreword' or (local-name() = 'clause' and @type = 'security') or (local-name() = 'clause' and @type = 'submitting_orgs') or local-name() = 'introduction'">
@@ -1464,14 +1467,41 @@
1464
1467
  </fo:static-content>
1465
1468
  </xsl:template>
1466
1469
 
1467
- <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:param name="table_if_debug">false</xsl:param><xsl:variable name="isGenerateTableIF_">
1470
+ <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_">
1471
+ <xsl:for-each select="$table_widths_from_if//table">
1472
+ <xsl:copy>
1473
+ <xsl:copy-of select="@*"/>
1474
+ <xsl:call-template name="calculate-column-widths-autolayout-algorithm"/>
1475
+ </xsl:copy>
1476
+ </xsl:for-each>
1477
+ </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_">
1468
1478
  false
1469
1479
  </xsl:variable><xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/><xsl:variable name="lang">
1470
1480
  <xsl:call-template name="getLang"/>
1471
- </xsl:variable><xsl:variable name="pageWidth_">
1472
- 215.9
1481
+ </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_">
1482
+ <xsl:choose>
1483
+ <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
1484
+ <xsl:when test="$papersize = 'a4'">210</xsl:when>
1485
+ </xsl:choose>
1486
+ </xsl:variable><xsl:variable name="papersize_width" select="normalize-space($papersize_width_)"/><xsl:variable name="papersize_height_">
1487
+ <xsl:choose>
1488
+ <xsl:when test="$papersize = 'letter'">279.4</xsl:when>
1489
+ <xsl:when test="$papersize = 'a4'">297</xsl:when>
1490
+ </xsl:choose>
1491
+ </xsl:variable><xsl:variable name="papersize_height" select="normalize-space($papersize_height_)"/><xsl:variable name="pageWidth_">
1492
+ <xsl:choose>
1493
+ <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
1494
+ <xsl:otherwise>
1495
+ 215.9
1496
+ </xsl:otherwise>
1497
+ </xsl:choose>
1473
1498
  </xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
1474
- 279.4
1499
+ <xsl:choose>
1500
+ <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
1501
+ <xsl:otherwise>
1502
+ 279.4
1503
+ </xsl:otherwise>
1504
+ </xsl:choose>
1475
1505
  </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="marginLeftRight1_">
1476
1506
  35
1477
1507
  </xsl:variable><xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/><xsl:variable name="marginLeftRight2_">
@@ -1585,7 +1615,7 @@
1585
1615
  <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
1586
1616
  </xsl:otherwise>
1587
1617
  </xsl:choose>
1588
- </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">
1618
+ </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">
1589
1619
 
1590
1620
 
1591
1621
 
@@ -1599,7 +1629,9 @@
1599
1629
 
1600
1630
 
1601
1631
 
1602
- <xsl:attribute name="font-family">Lato, STIX Two Math, Source Han Sans</xsl:attribute>
1632
+
1633
+ <xsl:attribute name="font-family">Lato, STIX Two Math, <xsl:value-of select="$font_noto_sans"/></xsl:attribute>
1634
+ <xsl:attribute name="font-family-generic">Sans</xsl:attribute>
1603
1635
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1604
1636
  <xsl:attribute name="color"><xsl:value-of select="$color_main"/></xsl:attribute>
1605
1637
 
@@ -1617,17 +1649,60 @@
1617
1649
  </xsl:variable>
1618
1650
  <xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
1619
1651
 
1652
+ <xsl:variable name="font_family_generic" select="$root-style_/root-style/@font-family-generic"/>
1653
+
1620
1654
  <xsl:for-each select="$root-style_/root-style/@*">
1655
+
1621
1656
  <xsl:choose>
1622
- <xsl:when test="local-name() = 'font-family' and $additional_fonts != ''">
1657
+ <xsl:when test="local-name() = 'font-family-generic'"><!-- skip, it's using for determine 'sans' or 'serif' --></xsl:when>
1658
+ <xsl:when test="local-name() = 'font-family'">
1659
+
1660
+ <xsl:variable name="font_regional_prefix">
1661
+ <xsl:choose>
1662
+ <xsl:when test="$font_family_generic = 'Sans'">Noto Sans</xsl:when>
1663
+ <xsl:otherwise>Noto Serif</xsl:otherwise>
1664
+ </xsl:choose>
1665
+ </xsl:variable>
1666
+
1623
1667
  <xsl:attribute name="{local-name()}">
1624
- <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
1668
+
1669
+ <xsl:variable name="font_extended">
1670
+ <xsl:choose>
1671
+ <xsl:when test="$lang = 'zh'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
1672
+ <xsl:when test="$lang = 'hk'"><xsl:value-of select="$font_regional_prefix"/> HK</xsl:when>
1673
+ <xsl:when test="$lang = 'jp'"><xsl:value-of select="$font_regional_prefix"/> JP</xsl:when>
1674
+ <xsl:when test="$lang = 'kr'"><xsl:value-of select="$font_regional_prefix"/> KR</xsl:when>
1675
+ <xsl:when test="$lang = 'sc'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
1676
+ <xsl:when test="$lang = 'tc'"><xsl:value-of select="$font_regional_prefix"/> TC</xsl:when>
1677
+ </xsl:choose>
1678
+ </xsl:variable>
1679
+ <xsl:if test="normalize-space($font_extended) != ''">
1680
+ <xsl:value-of select="$font_regional_prefix"/><xsl:text>, </xsl:text>
1681
+ <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
1682
+ </xsl:if>
1683
+
1684
+ <xsl:value-of select="."/>
1685
+
1686
+ <xsl:if test="$additional_fonts != ''">
1687
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1688
+ </xsl:if>
1625
1689
  </xsl:attribute>
1626
1690
  </xsl:when>
1627
1691
  <xsl:otherwise>
1628
1692
  <xsl:copy-of select="."/>
1629
1693
  </xsl:otherwise>
1630
1694
  </xsl:choose>
1695
+
1696
+ <!-- <xsl:choose>
1697
+ <xsl:when test="local-name() = 'font-family'">
1698
+ <xsl:attribute name="{local-name()}">
1699
+ <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
1700
+ </xsl:attribute>
1701
+ </xsl:when>
1702
+ <xsl:otherwise>
1703
+ <xsl:copy-of select="."/>
1704
+ </xsl:otherwise>
1705
+ </xsl:choose> -->
1631
1706
  </xsl:for-each>
1632
1707
  </xsl:template><xsl:attribute-set name="copyright-statement-style">
1633
1708
 
@@ -1724,9 +1799,10 @@
1724
1799
 
1725
1800
 
1726
1801
 
1802
+
1727
1803
 
1728
1804
 
1729
- <xsl:attribute name="font-family">Fira Code</xsl:attribute>
1805
+ <xsl:attribute name="font-family">Fira Code, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1730
1806
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1731
1807
  <xsl:attribute name="line-height">113%</xsl:attribute>
1732
1808
 
@@ -1755,9 +1831,12 @@
1755
1831
 
1756
1832
  </xsl:attribute-set><xsl:attribute-set name="requirement-style">
1757
1833
 
1834
+
1758
1835
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
1759
1836
 
1760
1837
  </xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
1838
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1839
+
1761
1840
 
1762
1841
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1763
1842
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -1766,7 +1845,6 @@
1766
1845
  <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
1767
1846
  <xsl:attribute name="margin-bottom">1mm</xsl:attribute>
1768
1847
  <xsl:attribute name="background-color">rgb(165,165,165)</xsl:attribute>
1769
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1770
1848
 
1771
1849
  </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
1772
1850
 
@@ -1810,6 +1888,7 @@
1810
1888
 
1811
1889
 
1812
1890
 
1891
+
1813
1892
 
1814
1893
  </xsl:attribute-set><xsl:attribute-set name="example-style">
1815
1894
 
@@ -1819,6 +1898,7 @@
1819
1898
 
1820
1899
 
1821
1900
 
1901
+
1822
1902
 
1823
1903
  <xsl:attribute name="margin-top">10pt</xsl:attribute>
1824
1904
  <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
@@ -1846,6 +1926,7 @@
1846
1926
 
1847
1927
 
1848
1928
 
1929
+
1849
1930
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1850
1931
 
1851
1932
 
@@ -1879,10 +1960,12 @@
1879
1960
 
1880
1961
 
1881
1962
 
1963
+
1882
1964
 
1883
1965
 
1884
1966
  </xsl:attribute-set><xsl:variable name="table-border_">
1885
1967
 
1968
+
1886
1969
  </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
1887
1970
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
1888
1971
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -1902,6 +1985,7 @@
1902
1985
 
1903
1986
 
1904
1987
 
1988
+
1905
1989
  <xsl:attribute name="space-after">12pt</xsl:attribute>
1906
1990
 
1907
1991
 
@@ -1930,6 +2014,7 @@
1930
2014
 
1931
2015
 
1932
2016
 
2017
+
1933
2018
 
1934
2019
 
1935
2020
 
@@ -1942,6 +2027,7 @@
1942
2027
 
1943
2028
 
1944
2029
 
2030
+
1945
2031
 
1946
2032
 
1947
2033
 
@@ -2021,6 +2107,7 @@
2021
2107
 
2022
2108
 
2023
2109
 
2110
+
2024
2111
  <xsl:attribute name="border">solid 0pt white</xsl:attribute>
2025
2112
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
2026
2113
  <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
@@ -2041,7 +2128,7 @@
2041
2128
 
2042
2129
 
2043
2130
 
2044
-
2131
+
2045
2132
 
2046
2133
 
2047
2134
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
@@ -2058,6 +2145,7 @@
2058
2145
 
2059
2146
 
2060
2147
 
2148
+
2061
2149
  </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
2062
2150
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2063
2151
 
@@ -2066,6 +2154,8 @@
2066
2154
 
2067
2155
 
2068
2156
 
2157
+
2158
+
2069
2159
  </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
2070
2160
  <xsl:attribute name="font-size">80%</xsl:attribute>
2071
2161
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
@@ -2080,6 +2170,7 @@
2080
2170
 
2081
2171
 
2082
2172
 
2173
+
2083
2174
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2084
2175
 
2085
2176
 
@@ -2116,10 +2207,32 @@
2116
2207
 
2117
2208
 
2118
2209
 
2210
+
2119
2211
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
2120
2212
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2121
2213
 
2122
2214
 
2215
+ </xsl:attribute-set><xsl:attribute-set name="dl-name-style">
2216
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2217
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2218
+
2219
+
2220
+
2221
+
2222
+
2223
+
2224
+
2225
+
2226
+
2227
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2228
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2229
+
2230
+
2231
+
2232
+
2233
+
2234
+
2235
+
2123
2236
  </xsl:attribute-set><xsl:attribute-set name="dd-cell-style">
2124
2237
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
2125
2238
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
@@ -2160,6 +2273,7 @@
2160
2273
 
2161
2274
 
2162
2275
 
2276
+
2163
2277
 
2164
2278
 
2165
2279
 
@@ -2201,7 +2315,8 @@
2201
2315
 
2202
2316
 
2203
2317
 
2204
-
2318
+
2319
+
2205
2320
 
2206
2321
 
2207
2322
 
@@ -2217,6 +2332,7 @@
2217
2332
  </xsl:attribute-set><xsl:attribute-set name="termnote-style">
2218
2333
 
2219
2334
 
2335
+
2220
2336
 
2221
2337
 
2222
2338
 
@@ -2233,6 +2349,10 @@
2233
2349
 
2234
2350
 
2235
2351
 
2352
+ </xsl:attribute-set><xsl:attribute-set name="termnote-p-style">
2353
+
2354
+ <xsl:attribute name="space-before">4pt</xsl:attribute>
2355
+
2236
2356
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
2237
2357
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
2238
2358
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
@@ -2284,6 +2404,7 @@
2284
2404
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
2285
2405
 
2286
2406
 
2407
+
2287
2408
 
2288
2409
 
2289
2410
  <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
@@ -2331,6 +2452,7 @@
2331
2452
 
2332
2453
 
2333
2454
 
2455
+
2334
2456
  <xsl:attribute name="text-align">left</xsl:attribute>
2335
2457
 
2336
2458
 
@@ -2356,21 +2478,21 @@
2356
2478
  </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
2357
2479
 
2358
2480
  </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
2481
+ <xsl:attribute name="width">100%</xsl:attribute>
2482
+ <xsl:attribute name="content-height">100%</xsl:attribute>
2483
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
2359
2484
 
2360
2485
 
2361
- <xsl:attribute name="width">100%</xsl:attribute>
2362
2486
  <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
2363
- <xsl:attribute name="scaling">uniform</xsl:attribute>
2364
2487
 
2365
2488
 
2366
2489
 
2367
-
2368
-
2490
+
2369
2491
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
2370
2492
 
2371
2493
 
2372
2494
 
2373
- <xsl:attribute name="font-family">Fira Code</xsl:attribute>
2495
+ <xsl:attribute name="font-family">Fira Code, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
2374
2496
 
2375
2497
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
2376
2498
  <xsl:attribute name="font-size">11pt</xsl:attribute>
@@ -2446,6 +2568,7 @@
2446
2568
 
2447
2569
 
2448
2570
 
2571
+
2449
2572
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
2450
2573
  <xsl:attribute name="space-after">12pt</xsl:attribute>
2451
2574
  <xsl:attribute name="line-height">115%</xsl:attribute>
@@ -2454,6 +2577,25 @@
2454
2577
 
2455
2578
 
2456
2579
 
2580
+ </xsl:attribute-set><xsl:attribute-set name="list-name-style">
2581
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2582
+
2583
+
2584
+
2585
+
2586
+
2587
+
2588
+
2589
+
2590
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2591
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2592
+
2593
+
2594
+
2595
+
2596
+
2597
+
2598
+
2457
2599
  </xsl:attribute-set><xsl:attribute-set name="list-item-style">
2458
2600
 
2459
2601
 
@@ -2499,6 +2641,7 @@
2499
2641
 
2500
2642
 
2501
2643
 
2644
+
2502
2645
  <xsl:attribute name="font-size">65%</xsl:attribute>
2503
2646
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2504
2647
 
@@ -2524,6 +2667,7 @@
2524
2667
 
2525
2668
 
2526
2669
 
2670
+
2527
2671
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2528
2672
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2529
2673
  <xsl:attribute name="color"><xsl:value-of select="$color_main"/></xsl:attribute>
@@ -2550,6 +2694,7 @@
2550
2694
 
2551
2695
 
2552
2696
 
2697
+
2553
2698
  <xsl:attribute name="font-size">60%</xsl:attribute>
2554
2699
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2555
2700
 
@@ -2568,6 +2713,7 @@
2568
2713
 
2569
2714
 
2570
2715
 
2716
+
2571
2717
  <xsl:attribute name="border">0.5pt solid rgb(79, 129, 189)</xsl:attribute>
2572
2718
  <xsl:attribute name="color">rgb(79, 129, 189)</xsl:attribute>
2573
2719
  <xsl:attribute name="margin-left">16mm</xsl:attribute>
@@ -2578,6 +2724,9 @@
2578
2724
 
2579
2725
 
2580
2726
  </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
2727
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2728
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2729
+
2581
2730
 
2582
2731
 
2583
2732
 
@@ -2585,8 +2734,6 @@
2585
2734
 
2586
2735
 
2587
2736
 
2588
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2589
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2590
2737
  <xsl:attribute name="padding">2mm</xsl:attribute>
2591
2738
  <xsl:attribute name="padding-top">3mm</xsl:attribute>
2592
2739
 
@@ -2623,6 +2770,7 @@
2623
2770
 
2624
2771
 
2625
2772
 
2773
+
2626
2774
  <xsl:attribute name="font-style">italic</xsl:attribute>
2627
2775
 
2628
2776
 
@@ -2659,6 +2807,10 @@
2659
2807
 
2660
2808
 
2661
2809
 
2810
+ <!-- <xsl:if test="$namespace = 'ieee'">
2811
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2812
+ <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
2813
+ </xsl:if> -->
2662
2814
 
2663
2815
 
2664
2816
 
@@ -2686,6 +2838,7 @@
2686
2838
 
2687
2839
 
2688
2840
 
2841
+
2689
2842
 
2690
2843
  <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
2691
2844
 
@@ -2715,6 +2868,7 @@
2715
2868
 
2716
2869
 
2717
2870
 
2871
+
2718
2872
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2719
2873
 
2720
2874
 
@@ -2735,6 +2889,7 @@
2735
2889
 
2736
2890
 
2737
2891
 
2892
+
2738
2893
  <xsl:attribute name="font-size">60%</xsl:attribute>
2739
2894
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2740
2895
 
@@ -2755,6 +2910,7 @@
2755
2910
 
2756
2911
 
2757
2912
 
2913
+
2758
2914
  </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
2759
2915
 
2760
2916
 
@@ -2868,13 +3024,13 @@
2868
3024
 
2869
3025
  </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">
2870
3026
  <xsl:variable name="nodes_preface_">
2871
- <xsl:for-each select="/*/*[local-name()='preface']/*">
3027
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2872
3028
  <node id="{@id}"/>
2873
3029
  </xsl:for-each>
2874
3030
  </xsl:variable>
2875
3031
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
2876
3032
 
2877
- <xsl:for-each select="/*/*[local-name()='preface']/*">
3033
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2878
3034
  <xsl:sort select="@displayorder" data-type="number"/>
2879
3035
 
2880
3036
  <!-- process Section's title -->
@@ -2940,7 +3096,7 @@
2940
3096
  </xsl:for-each>
2941
3097
  </figures>
2942
3098
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2943
- <xsl:for-each select="/*/*[local-name()='preface']/*">
3099
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2944
3100
  <xsl:sort select="@displayorder" data-type="number"/>
2945
3101
  <xsl:apply-templates select="."/>
2946
3102
  </xsl:for-each>
@@ -3207,6 +3363,8 @@
3207
3363
 
3208
3364
 
3209
3365
 
3366
+
3367
+
3210
3368
 
3211
3369
 
3212
3370
 
@@ -3252,6 +3410,8 @@
3252
3410
 
3253
3411
 
3254
3412
 
3413
+
3414
+
3255
3415
  </xsl:element>
3256
3416
  </xsl:variable>
3257
3417
 
@@ -3394,23 +3554,29 @@
3394
3554
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
3395
3555
  <xsl:param name="continued"/>
3396
3556
  <xsl:if test="normalize-space() != ''">
3397
- <fo:block xsl:use-attribute-sets="table-name-style">
3398
-
3399
-
3400
-
3401
-
3557
+
3558
+
3402
3559
 
3403
- <xsl:choose>
3404
- <xsl:when test="$continued = 'true'">
3560
+ <fo:block xsl:use-attribute-sets="table-name-style">
3561
+
3405
3562
 
3406
- </xsl:when>
3407
- <xsl:otherwise>
3408
- <xsl:apply-templates/>
3409
- </xsl:otherwise>
3410
- </xsl:choose>
3411
-
3563
+
3564
+
3565
+
3566
+ <xsl:choose>
3567
+ <xsl:when test="$continued = 'true'">
3568
+
3569
+ </xsl:when>
3570
+ <xsl:otherwise>
3571
+ <xsl:apply-templates/>
3572
+ </xsl:otherwise>
3573
+ </xsl:choose>
3574
+
3575
+
3576
+ </fo:block>
3577
+
3412
3578
 
3413
- </fo:block>
3579
+
3414
3580
  </xsl:if>
3415
3581
  </xsl:template><xsl:template name="calculate-columns-numbers">
3416
3582
  <xsl:param name="table-row"/>
@@ -3573,8 +3739,9 @@
3573
3739
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
3574
3740
  </xsl:if>
3575
3741
  </xsl:template><xsl:template name="calculate-column-widths-autolayout-algorithm">
3576
- <xsl:param name="table"/>
3577
- <xsl:param name="if">false</xsl:param> <!-- via intermediate format -->
3742
+ <xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
3743
+
3744
+ <!-- via intermediate format -->
3578
3745
 
3579
3746
  <!-- The algorithm uses two passes through the table data and scales linearly with the size of the table -->
3580
3747
 
@@ -3585,9 +3752,8 @@
3585
3752
  <!-- get current table id -->
3586
3753
  <xsl:variable name="table_id" select="@id"/>
3587
3754
  <!-- find table by id in the file 'table_widths' -->
3588
- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
3589
- <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/>
3590
-
3755
+ <!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
3756
+ <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
3591
3757
 
3592
3758
  <!-- table='<xsl:copy-of select="$table"/>' -->
3593
3759
  <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
@@ -3595,24 +3761,13 @@
3595
3761
  <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
3596
3762
 
3597
3763
  <xsl:variable name="table_with_cell_widths_">
3598
- <xsl:choose>
3599
- <xsl:when test="$if = 'true' and normalize-space($table-if) != ''"> <!-- if we read column's width from IF and there is table in IF -->
3600
-
3601
- <!-- Example: <column>10</column>
3602
- <column>11</column>
3603
- -->
3604
- <xsl:apply-templates select="$table-if" mode="determine_cell_widths-if"/>
3605
- </xsl:when>
3606
- <xsl:otherwise>
3607
- <xsl:apply-templates select="xalan:nodeset($table)" mode="determine_cell_widths"/>
3608
- </xsl:otherwise>
3609
- </xsl:choose>
3764
+ <xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
3610
3765
  </xsl:variable>
3611
3766
  <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
3612
3767
 
3613
- <xsl:if test="$table_if_debug = 'true'">
3768
+ <!-- <xsl:if test="$table_if_debug = 'true'">
3614
3769
  <xsl:copy-of select="$table_with_cell_widths"/>
3615
- </xsl:if>
3770
+ </xsl:if> -->
3616
3771
 
3617
3772
 
3618
3773
  <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
@@ -3658,8 +3813,12 @@
3658
3813
 
3659
3814
  <xsl:variable name="page_width">
3660
3815
  <xsl:choose>
3661
- <xsl:when test="$if = 'true'"><xsl:value-of select="$table-if/@page-width"/></xsl:when>
3662
- <xsl:otherwise>75</xsl:otherwise>
3816
+ <xsl:when test="$parent_table_page-width != ''">
3817
+ <xsl:value-of select="$parent_table_page-width"/>
3818
+ </xsl:when>
3819
+ <xsl:otherwise>
3820
+ <xsl:value-of select="@page-width"/>
3821
+ </xsl:otherwise>
3663
3822
  </xsl:choose>
3664
3823
  </xsl:variable>
3665
3824
 
@@ -3667,9 +3826,6 @@
3667
3826
  <table_width>
3668
3827
  <xsl:copy-of select="$table_widths"/>
3669
3828
  </table_width>
3670
- <!-- <debug>$table_widths/@width_min=<xsl:value-of select="$table_widths/table/@width_min"/></debug>
3671
- <debug>$table_widths/@width_max=<xsl:value-of select="$table_widths/table/@width_max"/></debug>
3672
- -->
3673
3829
  <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
3674
3830
  </xsl:if>
3675
3831
 
@@ -3680,11 +3836,11 @@
3680
3836
  <xsl:when test="$table_widths/table/@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
3681
3837
  <!-- call old algorithm -->
3682
3838
  <case1/>
3683
- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
3839
+ <!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
3684
3840
  <xsl:call-template name="calculate-column-widths-proportional">
3685
3841
  <xsl:with-param name="cols-count" select="$cols-count"/>
3686
3842
  <xsl:with-param name="table" select="$table"/>
3687
- </xsl:call-template>
3843
+ </xsl:call-template> -->
3688
3844
  </xsl:when>
3689
3845
  <!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
3690
3846
  <xsl:when test="$table_widths/table/@width_max &lt;= $page_width">
@@ -3728,95 +3884,49 @@
3728
3884
  <xsl:otherwise><unknown_case/></xsl:otherwise>
3729
3885
  </xsl:choose>
3730
3886
 
3887
+ </xsl:template><xsl:template name="get-calculated-column-widths-autolayout-algorithm">
3731
3888
 
3732
- </xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths">
3733
- <xsl:copy>
3734
- <xsl:apply-templates select="@*|node()" mode="determine_cell_widths"/>
3735
- </xsl:copy>
3736
- </xsl:template><xsl:template match="td | th" mode="determine_cell_widths">
3737
- <xsl:copy>
3738
- <xsl:copy-of select="@*"/>
3889
+ <!-- if nested 'dl' or 'table' -->
3890
+ <xsl:variable name="parent_table_id" select="normalize-space(ancestor::*[local-name() = 'table' or local-name() = 'dl'][1]/@id)"/>
3891
+ <parent_table_id><xsl:value-of select="$parent_table_id"/></parent_table_id>
3739
3892
 
3740
- <!-- The maximum width is given by the widest line. -->
3741
- <xsl:variable name="widths_max">
3742
- <xsl:for-each select=".//*[local-name() = 'p']">
3743
- <xsl:call-template name="add_width"/>
3744
- </xsl:for-each>
3745
- <xsl:if test="not(*[local-name() = 'p'])">
3746
- <xsl:call-template name="add_width"/>
3747
- </xsl:if>
3748
- </xsl:variable>
3749
- <xsl:variable name="width_max">
3750
- <xsl:for-each select="xalan:nodeset($widths_max)//width">
3751
- <xsl:sort select="." data-type="number" order="descending"/>
3752
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3753
- </xsl:for-each>
3754
- </xsl:variable>
3755
- <xsl:attribute name="width_max">
3756
- <xsl:value-of select="$width_max"/>
3757
- </xsl:attribute>
3893
+ <parent_element><xsl:value-of select="local-name(..)"/></parent_element>
3758
3894
 
3759
- <!-- The minimum width is given by the widest text element (word, image, etc.) -->
3760
- <!-- To do: image width -->
3761
- <xsl:variable name="td_text">
3762
- <xsl:apply-templates select="." mode="td_text"/>
3763
- </xsl:variable>
3764
- <xsl:variable name="words">
3765
- <xsl:variable name="string_with_added_zerospaces">
3766
- <xsl:call-template name="add-zero-spaces-java">
3767
- <xsl:with-param name="text" select="$td_text"/>
3768
- </xsl:call-template>
3895
+ <xsl:variable name="parent_table_page-width_">
3896
+ <xsl:if test="$parent_table_id != ''">
3897
+ <!-- determine column number in the parent table -->
3898
+ <xsl:variable name="parent_table_column_number">
3899
+ <xsl:choose>
3900
+ <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
3901
+ <xsl:otherwise> <!-- parent is table -->
3902
+ <xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
3903
+ </xsl:otherwise>
3904
+ </xsl:choose>
3769
3905
  </xsl:variable>
3770
- <xsl:call-template name="tokenize">
3771
- <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
3772
- </xsl:call-template>
3773
- </xsl:variable>
3774
-
3775
- <xsl:variable name="max_word_length">
3776
- <xsl:call-template name="max_length">
3777
- <xsl:with-param name="words" select="xalan:nodeset($words)"/>
3778
- </xsl:call-template>
3779
- </xsl:variable>
3780
- <xsl:variable name="width_min">
3781
- <xsl:value-of select="$max_word_length"/>
3782
- </xsl:variable>
3783
- <xsl:attribute name="width_min">
3784
- <xsl:value-of select="$width_min"/>
3785
- </xsl:attribute>
3786
- <!-- width_max="1" width_min="1.5"> --> <!-- see 'tokenize' template, multiply 1.5 for all latin capitals -->
3787
- <xsl:if test="$width_min &gt; $width_max">
3788
- <xsl:attribute name="width_max">
3789
- <xsl:value-of select="$width_min"/>
3790
- </xsl:attribute>
3906
+ <!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
3907
+ <xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
3791
3908
  </xsl:if>
3792
- <xsl:if test="$width_min = 0">
3793
- <xsl:attribute name="width_min">1</xsl:attribute>
3794
- </xsl:if>
3795
-
3796
- <xsl:apply-templates select="node()" mode="determine_cell_widths"/>
3797
-
3798
- </xsl:copy>
3799
- </xsl:template><xsl:template name="add_width">
3800
- <xsl:variable name="p_text"><xsl:apply-templates select="." mode="td_text"/></xsl:variable>
3801
- <xsl:variable name="p_text_len_" select="string-length(normalize-space($p_text))"/>
3802
-
3803
- <xsl:variable name="p_text_len">
3804
- <xsl:choose>
3805
- <xsl:when test="normalize-space(translate($p_text, concat($upper,'0123456789'), '')) = ''"> <!-- english word in CAPITAL letters -->
3806
- <xsl:value-of select="$p_text_len_ * 1.5"/>
3807
- </xsl:when>
3808
- <xsl:otherwise><xsl:value-of select="$p_text_len_"/></xsl:otherwise>
3809
- </xsl:choose>
3810
3909
  </xsl:variable>
3910
+ <xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
3811
3911
 
3812
- <xsl:variable name="math_addon_text">
3813
- <xsl:for-each select=".//*[local-name() = 'math']">
3814
- <xsl:apply-templates mode="td_text"/>
3815
- </xsl:for-each>
3816
- </xsl:variable>
3817
- <xsl:variable name="math_addon_length" select="string-length(normalize-space($math_addon_text)) * 0.2"/> <!-- plus 20% -->
3912
+ <!-- get current table id -->
3913
+ <xsl:variable name="table_id" select="@id"/>
3914
+
3915
+ <xsl:choose>
3916
+ <xsl:when test="$parent_table_id = '' or $parent_table_page-width = ''">
3917
+ <!-- find table by id in the file 'table_widths' and get all `<column>...</column> -->
3918
+ <xsl:copy-of select="$table_widths_from_if_calculated//table[@id = $table_id]/node()"/>
3919
+ </xsl:when>
3920
+ <xsl:otherwise>
3921
+ <!-- recalculate columns width based on parent table width -->
3922
+ <xsl:for-each select="$table_widths_from_if//table[@id = $table_id]">
3923
+ <xsl:call-template name="calculate-column-widths-autolayout-algorithm">
3924
+ <xsl:with-param name="parent_table_page-width" select="$parent_table_page-width"/> <!-- padding-left = 2mm = 50000-->
3925
+ </xsl:call-template>
3926
+ </xsl:for-each>
3927
+ </xsl:otherwise>
3928
+ </xsl:choose>
3818
3929
 
3819
- <width><xsl:value-of select="$p_text_len + $math_addon_length"/></width>
3820
3930
  </xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths-if">
3821
3931
  <xsl:copy>
3822
3932
  <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
@@ -3864,12 +3974,18 @@
3864
3974
  <fo:table-row>
3865
3975
  <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">
3866
3976
 
3867
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
3868
- <xsl:with-param name="continued">true</xsl:with-param>
3869
- </xsl:apply-templates>
3870
3977
 
3871
3978
 
3872
3979
 
3980
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
3981
+ <xsl:with-param name="continued">true</xsl:with-param>
3982
+ </xsl:apply-templates>
3983
+
3984
+
3985
+
3986
+
3987
+
3988
+
3873
3989
  </fo:table-cell>
3874
3990
  </fo:table-row>
3875
3991
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -3909,77 +4025,91 @@
3909
4025
  </xsl:choose>
3910
4026
  </xsl:variable>
3911
4027
 
3912
- <fo:table keep-with-previous="always">
3913
- <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
3914
- <xsl:variable name="name" select="local-name()"/>
4028
+
4029
+ <xsl:variable name="tableWithNotesAndFootnotes">
4030
+
4031
+ <fo:table keep-with-previous="always">
4032
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
4033
+ <xsl:variable name="name" select="local-name()"/>
4034
+ <xsl:choose>
4035
+ <xsl:when test="$name = 'border-top'">
4036
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
4037
+ </xsl:when>
4038
+ <xsl:when test="$name = 'border'">
4039
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
4040
+ <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
4041
+ </xsl:when>
4042
+ <xsl:otherwise>
4043
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
4044
+ </xsl:otherwise>
4045
+ </xsl:choose>
4046
+ </xsl:for-each>
4047
+
4048
+
4049
+
3915
4050
  <xsl:choose>
3916
- <xsl:when test="$name = 'border-top'">
3917
- <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
3918
- </xsl:when>
3919
- <xsl:when test="$name = 'border'">
3920
- <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3921
- <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
4051
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
4052
+ <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
4053
+ <fo:table-column column-width="{@width}"/>
4054
+ </xsl:for-each>
3922
4055
  </xsl:when>
3923
4056
  <xsl:otherwise>
3924
- <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
4057
+ <!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
4058
+ <xsl:call-template name="insertTableColumnWidth">
4059
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4060
+ </xsl:call-template>
3925
4061
  </xsl:otherwise>
3926
4062
  </xsl:choose>
3927
- </xsl:for-each>
3928
-
3929
-
3930
-
3931
- <xsl:choose>
3932
- <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
3933
- <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
3934
- <fo:table-column column-width="{@width}"/>
3935
- </xsl:for-each>
3936
- </xsl:when>
3937
- <xsl:otherwise>
3938
- <!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
3939
- <xsl:call-template name="insertTableColumnWidth">
3940
- <xsl:with-param name="colwidths" select="$colwidths"/>
3941
- </xsl:call-template>
3942
- </xsl:otherwise>
3943
- </xsl:choose>
3944
-
3945
- <fo:table-body>
3946
- <fo:table-row>
3947
- <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
3948
-
3949
-
4063
+
4064
+ <fo:table-body>
4065
+ <fo:table-row>
4066
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
4067
+
4068
+
3950
4069
 
3951
-
3952
-
3953
- <!-- fn will be processed inside 'note' processing -->
3954
-
3955
-
3956
-
3957
-
3958
-
3959
-
3960
- <!-- for BSI (not PAS) display Notes before footnotes -->
3961
-
3962
-
3963
- <!-- except gb and bsi -->
3964
-
3965
- <xsl:apply-templates select="../*[local-name()='note']"/>
3966
4070
 
3967
-
3968
-
3969
- <!-- horizontal row separator -->
3970
-
3971
-
3972
- <!-- fn processing -->
3973
- <xsl:call-template name="table_fn_display"/>
3974
-
3975
- <!-- for PAS display Notes after footnotes -->
3976
-
3977
-
3978
- </fo:table-cell>
3979
- </fo:table-row>
3980
- </fo:table-body>
3981
-
3982
- </fo:table>
4071
+
4072
+ <!-- fn will be processed inside 'note' processing -->
4073
+
4074
+
4075
+
4076
+
4077
+
4078
+
4079
+ <!-- for BSI (not PAS) display Notes before footnotes -->
4080
+
4081
+
4082
+ <!-- except gb and bsi -->
4083
+
4084
+ <xsl:apply-templates select="../*[local-name()='note']"/>
4085
+
4086
+
4087
+
4088
+ <!-- horizontal row separator -->
4089
+
4090
+
4091
+ <!-- fn processing -->
4092
+
4093
+ <xsl:call-template name="table_fn_display"/>
4094
+
4095
+
4096
+
4097
+ <!-- for PAS display Notes after footnotes -->
4098
+
4099
+
4100
+ </fo:table-cell>
4101
+ </fo:table-row>
4102
+ </fo:table-body>
4103
+
4104
+ </fo:table>
4105
+ </xsl:variable>
4106
+
4107
+ <xsl:if test="normalize-space($tableWithNotesAndFootnotes) != ''">
4108
+ <xsl:copy-of select="$tableWithNotesAndFootnotes"/>
4109
+ </xsl:if>
4110
+
4111
+
4112
+
3983
4113
  </xsl:if>
3984
4114
  </xsl:template><xsl:template match="*[local-name()='tbody']">
3985
4115
 
@@ -4068,6 +4198,9 @@
4068
4198
 
4069
4199
 
4070
4200
 
4201
+
4202
+
4203
+
4071
4204
 
4072
4205
 
4073
4206
  <xsl:call-template name="setTableRowAttributes"/>
@@ -4084,6 +4217,8 @@
4084
4217
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
4085
4218
 
4086
4219
 
4220
+
4221
+
4087
4222
  <xsl:variable name="number"><xsl:number/></xsl:variable>
4088
4223
  <xsl:if test="$number mod 2 = 0">
4089
4224
  <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
@@ -4173,6 +4308,8 @@
4173
4308
 
4174
4309
 
4175
4310
 
4311
+
4312
+
4176
4313
 
4177
4314
 
4178
4315
 
@@ -4244,7 +4381,11 @@
4244
4381
 
4245
4382
  <xsl:variable name="gen_id" select="generate-id(.)"/>
4246
4383
  <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
4247
- <xsl:variable name="reference" select="@reference"/>
4384
+ <xsl:variable name="reference_">
4385
+ <xsl:value-of select="@reference"/>
4386
+ <xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
4387
+ </xsl:variable>
4388
+ <xsl:variable name="reference" select="normalize-space($reference_)"/>
4248
4389
  <!-- fn sequence number in document -->
4249
4390
  <xsl:variable name="current_fn_number">
4250
4391
  <xsl:choose>
@@ -4264,6 +4405,7 @@
4264
4405
  <xsl:variable name="footnote_inline">
4265
4406
  <fo:inline xsl:use-attribute-sets="fn-num-style">
4266
4407
 
4408
+
4267
4409
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
4268
4410
  <xsl:value-of select="$current_fn_number_text"/>
4269
4411
  </fo:basic-link>
@@ -4285,8 +4427,12 @@
4285
4427
  <fo:block xsl:use-attribute-sets="fn-body-style">
4286
4428
 
4287
4429
 
4430
+
4288
4431
  <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
4289
4432
 
4433
+
4434
+
4435
+
4290
4436
  <xsl:value-of select="$current_fn_number_text"/>
4291
4437
  </fo:inline>
4292
4438
  <xsl:apply-templates/>
@@ -4319,7 +4465,7 @@
4319
4465
  <xsl:copy-of select="node()"/>
4320
4466
  </fn>
4321
4467
  </xsl:for-each>
4322
- <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']/*">
4468
+ <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']/*">
4323
4469
  <xsl:sort select="@displayorder" data-type="number"/>
4324
4470
  <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])]">
4325
4471
  <!-- copy unique fn -->
@@ -4610,11 +4756,19 @@
4610
4756
 
4611
4757
 
4612
4758
 
4759
+
4760
+ <xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
4761
+ <xsl:attribute name="margin-top">0</xsl:attribute>
4762
+ </xsl:if>
4763
+
4613
4764
  <fo:block>
4614
4765
 
4615
4766
 
4616
4767
 
4617
4768
 
4769
+ <xsl:apply-templates select="*[local-name() = 'name']">
4770
+ <xsl:with-param name="process">true</xsl:with-param>
4771
+ </xsl:apply-templates>
4618
4772
 
4619
4773
  <xsl:if test="$isGenerateTableIF = 'true'">
4620
4774
  <!-- to determine start of table -->
@@ -4637,6 +4791,7 @@
4637
4791
  </xsl:choose>
4638
4792
 
4639
4793
 
4794
+
4640
4795
  <xsl:choose>
4641
4796
  <xsl:when test="$isGenerateTableIF = 'true'">
4642
4797
  <!-- generate IF for table widths -->
@@ -4765,6 +4920,18 @@
4765
4920
  </xsl:if> <!-- END: a few components -->
4766
4921
  </fo:block-container>
4767
4922
  </fo:block-container>
4923
+
4924
+ <xsl:if test="$isGenerateTableIF = 'true'"> <!-- process nested 'dl' -->
4925
+ <xsl:apply-templates select="*[local-name() = 'dd']/*[local-name() = 'dl']"/>
4926
+ </xsl:if>
4927
+
4928
+ </xsl:template><xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
4929
+ <xsl:param name="process">false</xsl:param>
4930
+ <xsl:if test="$process = 'true'">
4931
+ <fo:block xsl:use-attribute-sets="dl-name-style">
4932
+ <xsl:apply-templates/>
4933
+ </fo:block>
4934
+ </xsl:if>
4768
4935
  </xsl:template><xsl:template name="setColumnWidth_dl">
4769
4936
  <xsl:param name="colwidths"/>
4770
4937
  <xsl:param name="maxlength_dt"/>
@@ -4773,6 +4940,11 @@
4773
4940
  <!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
4774
4941
 
4775
4942
  <xsl:choose>
4943
+ <xsl:when test="xalan:nodeset($colwidths)/autolayout">
4944
+ <xsl:call-template name="insertTableColumnWidth">
4945
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4946
+ </xsl:call-template>
4947
+ </xsl:when>
4776
4948
  <xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
4777
4949
  <fo:table-column column-width="50%"/>
4778
4950
  <fo:table-column column-width="50%"/>
@@ -5025,12 +5197,24 @@
5025
5197
  </td>
5026
5198
  <td>
5027
5199
 
5028
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()"/>
5200
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
5201
+
5202
+ <!-- get paragraphs from nested 'dl' -->
5203
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
5204
+
5029
5205
 
5030
5206
  </td>
5031
5207
  </tr>
5032
5208
 
5033
- </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='em']">
5209
+ </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
5210
+ <xsl:for-each select="*[local-name() = 'dt']">
5211
+ <p>
5212
+ <xsl:copy-of select="node()"/>
5213
+ <xsl:text> </xsl:text>
5214
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'p']/node()"/>
5215
+ </p>
5216
+ </xsl:for-each>
5217
+ </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if_nested"/><xsl:template match="*[local-name()='em']">
5034
5218
  <fo:inline font-style="italic">
5035
5219
  <xsl:apply-templates/>
5036
5220
  </fo:inline>
@@ -5061,7 +5245,7 @@
5061
5245
 
5062
5246
 
5063
5247
 
5064
-
5248
+ <!-- 10 -->
5065
5249
 
5066
5250
 
5067
5251
 
@@ -5933,6 +6117,13 @@
5933
6117
  </xsl:variable>
5934
6118
  <fo:inline xsl:use-attribute-sets="link-style">
5935
6119
 
6120
+ <xsl:if test="starts-with(normalize-space(@target), 'mailto:')">
6121
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
6122
+ </xsl:if>
6123
+
6124
+
6125
+
6126
+
5936
6127
 
5937
6128
 
5938
6129
 
@@ -6150,6 +6341,7 @@
6150
6341
 
6151
6342
 
6152
6343
 
6344
+
6153
6345
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
6154
6346
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
6155
6347
  <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
@@ -6171,6 +6363,7 @@
6171
6363
  </xsl:when>
6172
6364
  <xsl:otherwise>
6173
6365
 
6366
+
6174
6367
  <xsl:text>:</xsl:text>
6175
6368
 
6176
6369
 
@@ -6190,6 +6383,7 @@
6190
6383
  </xsl:when>
6191
6384
  <xsl:otherwise>
6192
6385
 
6386
+
6193
6387
  <xsl:text>:</xsl:text>
6194
6388
 
6195
6389
 
@@ -6201,7 +6395,19 @@
6201
6395
  <xsl:value-of select="$suffix"/>
6202
6396
  </xsl:if>
6203
6397
  </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
6204
- <fo:inline><xsl:apply-templates/></fo:inline>
6398
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
6399
+ <xsl:choose>
6400
+ <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
6401
+ <fo:inline xsl:use-attribute-sets="termnote-p-style">
6402
+ <xsl:apply-templates/>
6403
+ </fo:inline>
6404
+ </xsl:when>
6405
+ <xsl:otherwise>
6406
+ <fo:block xsl:use-attribute-sets="termnote-p-style">
6407
+ <xsl:apply-templates/>
6408
+ </fo:block>
6409
+ </xsl:otherwise>
6410
+ </xsl:choose>
6205
6411
  </xsl:template><xsl:template match="*[local-name() = 'terms']">
6206
6412
  <!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
6207
6413
  <fo:block id="{@id}">
@@ -6971,6 +7177,9 @@
6971
7177
  <fo:block xsl:use-attribute-sets="figure-name-style">
6972
7178
 
6973
7179
 
7180
+
7181
+
7182
+
6974
7183
  <xsl:apply-templates/>
6975
7184
  </fo:block>
6976
7185
  </xsl:if>
@@ -7031,9 +7240,9 @@
7031
7240
  <xsl:apply-templates/>
7032
7241
  </xsl:otherwise>
7033
7242
  </xsl:choose>
7034
- </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">
7243
+ </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">
7035
7244
  <xsl:value-of select="."/>
7036
- </xsl:template><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
7245
+ </xsl:template><xsl:template match="*[local-name() = 'review']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
7037
7246
  <xsl:text> </xsl:text>
7038
7247
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
7039
7248
  <xsl:copy>
@@ -7108,9 +7317,12 @@
7108
7317
 
7109
7318
 
7110
7319
 
7320
+ <!-- 9 -->
7111
7321
 
7112
7322
 
7113
-
7323
+ <!-- <xsl:if test="$namespace = 'ieee'">
7324
+ <xsl:if test="$doctype = 'standard' and $stage = 'published'">8</xsl:if>
7325
+ </xsl:if> -->
7114
7326
 
7115
7327
 
7116
7328
 
@@ -7200,7 +7412,7 @@
7200
7412
  <xsl:for-each select="xalan:nodeset($text_step4)/node()">
7201
7413
  <xsl:choose>
7202
7414
  <xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
7203
- <xsl:call-template name="interspers">
7415
+ <xsl:call-template name="interspers-java">
7204
7416
  <xsl:with-param name="str" select="."/>
7205
7417
  </xsl:call-template>
7206
7418
  </xsl:when>
@@ -7250,6 +7462,10 @@
7250
7462
  <xsl:with-param name="char" select="$char"/>
7251
7463
  </xsl:call-template>
7252
7464
  </xsl:if>
7465
+ </xsl:template><xsl:template name="interspers-java">
7466
+ <xsl:param name="str"/>
7467
+ <xsl:param name="char" select="$zero_width_space"/>
7468
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($str),'([^ -.:=_—])',concat('$1', $char))"/> <!-- insert $char after each char excep space, - . : = _ etc. -->
7253
7469
  </xsl:template><xsl:template match="*" mode="syntax_highlight">
7254
7470
  <xsl:apply-templates mode="syntax_highlight"/>
7255
7471
  </xsl:template><xsl:variable name="syntax_highlight_styles_">
@@ -7569,10 +7785,14 @@
7569
7785
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
7570
7786
  <xsl:variable name="element">inline
7571
7787
 
7788
+
7572
7789
  </xsl:variable>
7573
7790
  <xsl:choose>
7574
7791
  <xsl:when test="contains($element, 'block')">
7575
7792
  <fo:block xsl:use-attribute-sets="example-p-style">
7793
+
7794
+
7795
+
7576
7796
  <xsl:apply-templates/>
7577
7797
  </fo:block>
7578
7798
  </xsl:when>
@@ -7680,6 +7900,7 @@
7680
7900
  </xsl:if>
7681
7901
  <fo:block xsl:use-attribute-sets="example-p-style">
7682
7902
 
7903
+
7683
7904
  <xsl:apply-templates/>
7684
7905
  </fo:block>
7685
7906
  </fo:block-container>
@@ -7836,6 +8057,8 @@
7836
8057
 
7837
8058
 
7838
8059
 
8060
+
8061
+
7839
8062
  <fo:basic-link fox:alt-text="{@citeas}">
7840
8063
  <xsl:if test="normalize-space(@citeas) = ''">
7841
8064
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
@@ -7895,6 +8118,7 @@
7895
8118
 
7896
8119
 
7897
8120
 
8121
+
7898
8122
  <xsl:choose>
7899
8123
  <xsl:when test="$depth = 2">2</xsl:when>
7900
8124
  <xsl:otherwise>1</xsl:otherwise>
@@ -8208,6 +8432,11 @@
8208
8432
  </xsl:otherwise>
8209
8433
  </xsl:choose>
8210
8434
  </xsl:template><xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
8435
+
8436
+ <xsl:apply-templates select="*[local-name() = 'name']">
8437
+ <xsl:with-param name="process">true</xsl:with-param>
8438
+ </xsl:apply-templates>
8439
+
8211
8440
  <fo:list-block xsl:use-attribute-sets="list-style">
8212
8441
 
8213
8442
 
@@ -8218,12 +8447,23 @@
8218
8447
 
8219
8448
 
8220
8449
 
8450
+ <xsl:if test="*[local-name() = 'name']">
8451
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
8452
+ </xsl:if>
8453
+
8221
8454
  <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
8222
8455
  </fo:list-block>
8223
8456
  <!-- <xsl:for-each select="./iho:note">
8224
8457
  <xsl:call-template name="note"/>
8225
8458
  </xsl:for-each> -->
8226
8459
  <xsl:apply-templates select="./*[local-name() = 'note']"/>
8460
+ </xsl:template><xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
8461
+ <xsl:param name="process">false</xsl:param>
8462
+ <xsl:if test="$process = 'true'">
8463
+ <fo:block xsl:use-attribute-sets="list-name-style">
8464
+ <xsl:apply-templates/>
8465
+ </fo:block>
8466
+ </xsl:if>
8227
8467
  </xsl:template><xsl:template match="*[local-name()='li']">
8228
8468
  <fo:list-item xsl:use-attribute-sets="list-item-style">
8229
8469
  <xsl:copy-of select="@id"/>
@@ -8235,6 +8475,8 @@
8235
8475
 
8236
8476
 
8237
8477
 
8478
+
8479
+
8238
8480
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8239
8481
  <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8240
8482
  <xsl:call-template name="append_add-style"/>
@@ -8500,9 +8742,9 @@
8500
8742
  </fo:block>
8501
8743
 
8502
8744
 
8503
- </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
8745
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
8504
8746
 
8505
- <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
8747
+ <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
8506
8748
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
8507
8749
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
8508
8750
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
@@ -8511,7 +8753,7 @@
8511
8753
  <fo:block>
8512
8754
  <fo:inline>
8513
8755
 
8514
- <xsl:number format="1."/>
8756
+ <xsl:number format="1." count="*[local-name()='bibitem'][not(@hidden = 'true')]"/>
8515
8757
 
8516
8758
  </fo:inline>
8517
8759
  </fo:block>
@@ -8532,145 +8774,7 @@
8532
8774
  <xsl:if test=".//ogc:fn">
8533
8775
  <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
8534
8776
  </xsl:if>
8535
- <xsl:choose>
8536
- <xsl:when test="*[local-name() = 'formattedref']">
8537
- <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
8538
- </xsl:when>
8539
- <xsl:otherwise>
8540
- <xsl:variable name="personalAuthors">
8541
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'person']">
8542
- <xsl:call-template name="processPersonalAuthor"/>
8543
- </xsl:for-each>
8544
- <xsl:if test="not(*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'person'])">
8545
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='editor']/*[local-name() = 'person']">
8546
- <xsl:call-template name="processPersonalAuthor"/>
8547
- </xsl:for-each>
8548
- </xsl:if>
8549
- </xsl:variable>
8550
-
8551
- <xsl:variable name="city" select="*[local-name() = 'place']"/>
8552
- <xsl:variable name="year">
8553
- <xsl:choose>
8554
- <xsl:when test="*[local-name() = 'date'][@type = 'published']">
8555
- <xsl:for-each select="*[local-name() = 'date'][@type = 'published']">
8556
- <xsl:call-template name="renderDate"/>
8557
- </xsl:for-each>
8558
- </xsl:when>
8559
- <xsl:when test="*[local-name() = 'date'][@type = 'issued']">
8560
- <xsl:for-each select="*[local-name() = 'date'][@type = 'issued']">
8561
- <xsl:call-template name="renderDate"/>
8562
- </xsl:for-each>
8563
- </xsl:when>
8564
- <xsl:when test="*[local-name() = 'date'][@type = 'circulated']">
8565
- <xsl:for-each select="*[local-name() = 'date'][@type = 'circulated']">
8566
- <xsl:call-template name="renderDate"/>
8567
- </xsl:for-each>
8568
- </xsl:when>
8569
- <xsl:otherwise>
8570
- <xsl:for-each select="*[local-name() = 'date']">
8571
- <xsl:call-template name="renderDate"/>
8572
- </xsl:for-each>
8573
- </xsl:otherwise>
8574
- </xsl:choose>
8575
- </xsl:variable>
8576
-
8577
- <xsl:variable name="uri" select="*[local-name() = 'uri']"/>
8578
-
8579
-
8580
- <!-- citation structure:
8581
- {personal names | organisation}: {document identifier}, {title}. {publisher}, {city} ({year})
8582
- -->
8583
-
8584
- <!-- Author(s) -->
8585
- <xsl:choose>
8586
- <xsl:when test="xalan:nodeset($personalAuthors)//author">
8587
- <xsl:for-each select="xalan:nodeset($personalAuthors)//author">
8588
- <xsl:apply-templates/>
8589
- <xsl:if test="position() != last()">, </xsl:if>
8590
- </xsl:for-each>
8591
- <xsl:text>: </xsl:text>
8592
- </xsl:when>
8593
- <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'abbreviation']">
8594
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'abbreviation']">
8595
- <xsl:value-of select="."/>
8596
- <xsl:if test="position() != last()">/</xsl:if>
8597
- </xsl:for-each>
8598
- <xsl:text>: </xsl:text>
8599
- </xsl:when>
8600
- <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
8601
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
8602
- <xsl:value-of select="."/>
8603
- <xsl:if test="position() != last()">, </xsl:if>
8604
- </xsl:for-each>
8605
- <xsl:text>: </xsl:text>
8606
- </xsl:when>
8607
- </xsl:choose>
8608
-
8609
-
8610
- <xsl:variable name="document_identifier">
8611
- <xsl:call-template name="processBibitemDocId"/>
8612
- </xsl:variable>
8613
-
8614
- <xsl:value-of select="$document_identifier"/>
8615
-
8616
- <xsl:apply-templates select="*[local-name() = 'note']"/>
8617
-
8618
- <xsl:variable name="isDraft">
8619
- <xsl:variable name="stage" select="normalize-space(*[local-name() = 'status']/*[local-name() = 'stage'])"/>
8620
- <xsl:if test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization'][*[local-name() = 'name']/text() = 'Open Geospatial Consortium'] and $stage != '' and $stage != 'published' and $stage != 'deprecated' and $stage != 'retired'">true</xsl:if>
8621
- </xsl:variable>
8622
-
8623
- <xsl:if test="$isDraft = 'true'">
8624
- <xsl:text> (Draft)</xsl:text>
8625
- </xsl:if>
8626
-
8627
- <xsl:text>, </xsl:text>
8628
-
8629
- <xsl:choose>
8630
- <xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = 'en']">
8631
- <xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = 'en']"/>
8632
- </xsl:when>
8633
- <xsl:otherwise>
8634
- <xsl:apply-templates select="*[local-name() = 'title']"/>
8635
- </xsl:otherwise>
8636
- </xsl:choose>
8637
-
8638
- <xsl:text>. </xsl:text>
8639
-
8640
- <xsl:if test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
8641
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
8642
- <xsl:value-of select="."/>
8643
- <xsl:if test="position() != last()">, </xsl:if>
8644
- </xsl:for-each>
8645
- <xsl:if test="normalize-space($city) != ''">, </xsl:if>
8646
- </xsl:if>
8647
-
8648
- <xsl:value-of select="$city"/>
8649
-
8650
- <xsl:if test="(*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name'] or normalize-space($city) != '') and normalize-space($year) != ''">
8651
- <xsl:text> </xsl:text>
8652
- </xsl:if>
8653
-
8654
- <xsl:if test="normalize-space($year) != ''">
8655
- <xsl:text>(</xsl:text>
8656
- <xsl:value-of select="$year"/>
8657
- <xsl:text>). </xsl:text>
8658
- </xsl:if>
8659
-
8660
- <xsl:if test="normalize-space($uri) != ''">
8661
- <fo:inline>
8662
-
8663
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
8664
-
8665
- <xsl:text> </xsl:text>
8666
- <fo:basic-link external-destination="{$uri}" fox:alt-text="{$uri}">
8667
- <xsl:value-of select="$uri"/>
8668
- </fo:basic-link>
8669
- </fo:inline>
8670
- </xsl:if>
8671
-
8672
- </xsl:otherwise>
8673
- </xsl:choose>
8777
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
8674
8778
  <!-- end OGC bibitem processing-->
8675
8779
 
8676
8780
  </xsl:template><xsl:template name="processBibitemDocId">
@@ -8980,12 +9084,16 @@
8980
9084
  <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
8981
9085
 
8982
9086
 
9087
+
9088
+
8983
9089
 
8984
9090
 
8985
9091
 
8986
9092
  <fo:block-container xsl:use-attribute-sets="admonition-container-style">
8987
9093
 
8988
9094
 
9095
+
9096
+
8989
9097
  <fo:block xsl:use-attribute-sets="admonition-name-style">
8990
9098
  <xsl:call-template name="displayAdmonitionName"/>
8991
9099
  </fo:block>
@@ -8998,25 +9106,32 @@
8998
9106
  </fo:block-container>
8999
9107
 
9000
9108
  </xsl:template><xsl:template name="displayAdmonitionName">
9001
-
9109
+ <xsl:param name="sep"/> <!-- Example: ' - ' -->
9110
+ <!-- <xsl:choose>
9111
+ <xsl:when test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
9112
+ <xsl:choose>
9113
+ <xsl:when test="@type='important'"><xsl:apply-templates select="@type"/></xsl:when>
9114
+ <xsl:otherwise>
9115
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
9116
+ </xsl:otherwise>
9117
+ </xsl:choose>
9118
+ </xsl:when>
9119
+ <xsl:otherwise>
9002
9120
  <xsl:apply-templates select="*[local-name() = 'name']"/>
9003
9121
  <xsl:if test="not(*[local-name() = 'name'])">
9004
9122
  <xsl:apply-templates select="@type"/>
9005
9123
  </xsl:if>
9006
-
9007
- </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
9008
- <xsl:apply-templates/>
9009
- </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
9010
- <xsl:variable name="admonition_type_">
9011
- <xsl:call-template name="getLocalizedString">
9012
- <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
9013
- </xsl:call-template>
9124
+ </xsl:otherwise>
9125
+ </xsl:choose> -->
9126
+ <xsl:variable name="name">
9127
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
9014
9128
  </xsl:variable>
9015
- <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
9016
- <xsl:value-of select="$admonition_type"/>
9017
- <xsl:if test="$admonition_type = ''">
9018
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
9129
+ <xsl:copy-of select="$name"/>
9130
+ <xsl:if test="normalize-space($name) != ''">
9131
+ <xsl:value-of select="$sep"/>
9019
9132
  </xsl:if>
9133
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
9134
+ <xsl:apply-templates/>
9020
9135
  </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
9021
9136
 
9022
9137
  <fo:block xsl:use-attribute-sets="admonition-p-style">
@@ -9187,6 +9302,8 @@
9187
9302
  </xsl:when>
9188
9303
  <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
9189
9304
  </xsl:choose>
9305
+ </xsl:template><xsl:template match="*[local-name() = 'lang_none']">
9306
+ <fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
9190
9307
  </xsl:template><xsl:template name="printEdition">
9191
9308
  <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
9192
9309
  <xsl:text> </xsl:text>
@@ -9293,6 +9410,27 @@
9293
9410
  </xsl:when>
9294
9411
  <xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
9295
9412
  </xsl:choose>
9413
+ </xsl:template><xsl:template name="getMonthLocalizedByNum">
9414
+ <xsl:param name="num"/>
9415
+ <xsl:variable name="monthStr">
9416
+ <xsl:choose>
9417
+ <xsl:when test="$num = '01'">january</xsl:when>
9418
+ <xsl:when test="$num = '02'">february</xsl:when>
9419
+ <xsl:when test="$num = '03'">march</xsl:when>
9420
+ <xsl:when test="$num = '04'">april</xsl:when>
9421
+ <xsl:when test="$num = '05'">may</xsl:when>
9422
+ <xsl:when test="$num = '06'">june</xsl:when>
9423
+ <xsl:when test="$num = '07'">july</xsl:when>
9424
+ <xsl:when test="$num = '08'">august</xsl:when>
9425
+ <xsl:when test="$num = '09'">september</xsl:when>
9426
+ <xsl:when test="$num = '10'">october</xsl:when>
9427
+ <xsl:when test="$num = '11'">november</xsl:when>
9428
+ <xsl:when test="$num = '12'">december</xsl:when>
9429
+ </xsl:choose>
9430
+ </xsl:variable>
9431
+ <xsl:call-template name="getLocalizedString">
9432
+ <xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param>
9433
+ </xsl:call-template>
9296
9434
  </xsl:template><xsl:template name="insertKeywords">
9297
9435
  <xsl:param name="sorting" select="'true'"/>
9298
9436
  <xsl:param name="charAtEnd" select="'.'"/>
@@ -9364,7 +9502,7 @@
9364
9502
  <dc:description>
9365
9503
  <xsl:variable name="abstract">
9366
9504
 
9367
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
9505
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
9368
9506
 
9369
9507
  </xsl:variable>
9370
9508
  <xsl:value-of select="normalize-space($abstract)"/>
@@ -9488,6 +9626,7 @@
9488
9626
 
9489
9627
 
9490
9628
 
9629
+
9491
9630
  <xsl:value-of select="document('')//*/namespace::ogc"/>
9492
9631
 
9493
9632