metanorma-bipm 2.6.7 → 2.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:jcgm="https://www.metanorma.org/ns/standoc" xmlns:bipm="https://www.metanorma.org/ns/standoc" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java redirect" extension-element-prefixes="redirect" version="1.0">
1
+ <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:jcgm="https://www.metanorma.org/ns/standoc" xmlns:bipm="https://www.metanorma.org/ns/standoc" xmlns:mn="https://www.metanorma.org/ns/xslt" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java redirect" extension-element-prefixes="redirect" version="1.0">
2
2
 
3
3
  <xsl:output method="xml" encoding="UTF-8" indent="no"/>
4
4
 
@@ -97,8 +97,8 @@
97
97
  <xsl:variable name="docid">
98
98
  <xsl:call-template name="getDocumentId"/>
99
99
  </xsl:variable>
100
- <doc id="{$docid}" lang="{$lang}">
101
- <contents>
100
+ <mn:doc id="{$docid}" lang="{$lang}">
101
+ <mn:contents>
102
102
  <xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
103
103
  <xsl:call-template name="processMainSectionsDefault_Contents"/>
104
104
  <!-- Index -->
@@ -106,8 +106,8 @@
106
106
  <xsl:apply-templates select="//jcgm:indexsect" mode="contents"/>
107
107
 
108
108
  <xsl:call-template name="processTablesFigures_Contents"/>
109
- </contents>
110
- </doc>
109
+ </mn:contents>
110
+ </mn:doc>
111
111
  </xsl:for-each>
112
112
  </xsl:for-each>
113
113
  </xsl:variable>
@@ -599,8 +599,8 @@
599
599
  <xsl:call-template name="getDocumentId"/>
600
600
  </xsl:variable>
601
601
 
602
- <xsl:for-each select="$contents/doc[@id=$docid]//item[@display = 'true']"> <!-- and not (@type = 'annex') and not (@type = 'references') -->
603
- <xsl:if test="@type = 'annex' and not(preceding-sibling::item[@display = 'true' and @type = 'annex'])">
602
+ <xsl:for-each select="$contents/mn:doc[@id=$docid]//mn:item[@display = 'true']"> <!-- and not (@type = 'annex') and not (@type = 'references') -->
603
+ <xsl:if test="@type = 'annex' and not(preceding-sibling::mn:item[@display = 'true' and @type = 'annex'])">
604
604
  <fo:block font-size="12pt" space-before="16pt" font-weight="bold" role="TOCI">
605
605
  <xsl:call-template name="getLocalizedString">
606
606
  <xsl:with-param name="key">Annex.pl</xsl:with-param>
@@ -611,21 +611,21 @@
611
611
  </xsl:for-each>
612
612
 
613
613
  <!-- List of Tables -->
614
- <xsl:if test="$contents//tables/table">
614
+ <xsl:if test="$contents//mn:tables/mn:table">
615
615
  <xsl:call-template name="insertListOf_Title">
616
616
  <xsl:with-param name="title" select="$title-list-tables"/>
617
617
  </xsl:call-template>
618
- <xsl:for-each select="$contents//tables/table">
618
+ <xsl:for-each select="$contents//mn:tables/mn:table">
619
619
  <xsl:call-template name="insertListOf_Item"/>
620
620
  </xsl:for-each>
621
621
  </xsl:if>
622
622
 
623
623
  <!-- List of Figures -->
624
- <xsl:if test="$contents//figures/figure">
624
+ <xsl:if test="$contents//mn:figures/mn:figure">
625
625
  <xsl:call-template name="insertListOf_Title">
626
626
  <xsl:with-param name="title" select="$title-list-figures"/>
627
627
  </xsl:call-template>
628
- <xsl:for-each select="$contents//figures/figure">
628
+ <xsl:for-each select="$contents//mn:figures/mn:figure">
629
629
  <xsl:call-template name="insertListOf_Item"/>
630
630
  </xsl:for-each>
631
631
  </xsl:if>
@@ -733,17 +733,17 @@
733
733
  <xsl:if test="ancestor-or-self::*[local-name()='annex']">annex</xsl:if>
734
734
  </xsl:variable>
735
735
 
736
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
736
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
737
737
  <xsl:if test="$type = 'index'">
738
738
  <xsl:attribute name="level">1</xsl:attribute>
739
739
  </xsl:if>
740
- <title>
740
+ <mn:title>
741
741
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
742
- </title>
742
+ </mn:title>
743
743
  <xsl:if test="$type != 'index'">
744
744
  <xsl:apply-templates mode="contents"/>
745
745
  </xsl:if>
746
- </item>
746
+ </mn:item>
747
747
  </xsl:if>
748
748
  </xsl:template>
749
749
 
@@ -983,12 +983,12 @@
983
983
  </fo:list-item-label>
984
984
  <fo:list-item-body start-indent="body-start()">
985
985
  <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
986
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
986
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{mn:title}">
987
987
  <fo:inline>
988
988
  <xsl:if test="@level = 1">
989
989
  <xsl:attribute name="font-weight">bold</xsl:attribute>
990
990
  </xsl:if>
991
- <xsl:apply-templates select="title"/>
991
+ <xsl:apply-templates select="mn:title"/>
992
992
  </fo:inline>
993
993
  <xsl:text> </xsl:text>
994
994
  <fo:inline keep-together.within-line="always" font-weight="normal">
@@ -1949,34 +1949,25 @@
1949
1949
  </fo:block-container>
1950
1950
  </xsl:template>
1951
1951
 
1952
- <!-- <xsl:strip-space elements="jcgm:xref"/> -->
1952
+ <!-- https://www.metanorma.org/ns/standoc -->
1953
+ <xsl:variable name="namespace_full" select="namespace-uri(//*[local-name() = 'metanorma'][1])"/>
1953
1954
 
1954
- <xsl:variable name="namespace_full_">
1955
- <xsl:choose>
1956
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
1957
- <xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
1958
- </xsl:choose>
1959
- </xsl:variable>
1960
- <xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
1955
+ <!-- https://www.metanorma.org/ns/xsl -->
1956
+ <xsl:variable name="namespace_mn_xsl">https://www.metanorma.org/ns/xslt</xsl:variable>
1961
1957
 
1962
- <xsl:variable name="root_element_">
1963
- <xsl:choose>
1964
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
1965
- <xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
1966
- </xsl:choose>
1967
- </xsl:variable>
1968
- <xsl:variable name="root_element" select="normalize-space($root_element_)"/>
1958
+ <xsl:variable name="root_element">metanorma</xsl:variable>
1969
1959
 
1960
+ <!---examples: 2013, 2024 -->
1970
1961
  <xsl:variable name="document_scheme" select="normalize-space(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
1971
1962
 
1972
1963
  <!-- external parameters -->
1973
-
1974
1964
  <xsl:param name="svg_images"/> <!-- svg images array -->
1975
1965
  <xsl:variable name="images" select="document($svg_images)"/>
1976
1966
  <xsl:param name="basepath"/> <!-- base path for images -->
1977
1967
  <xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
1978
1968
  <xsl:param name="inputxml_filename"/> <!-- input xml file name -->
1979
1969
  <xsl:param name="output_path"/> <!-- output PDF file name -->
1970
+ <xsl:param name="outputpdf_basepath"/> <!-- output PDF folder -->
1980
1971
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
1981
1972
  <xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
1982
1973
  <xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
@@ -2023,20 +2014,13 @@
2023
2014
 
2024
2015
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
2025
2016
 
2026
- <xsl:variable name="isApplyAutolayoutAlgorithm_">
2027
- true
2017
+ <!-- don't remove and rename this variable, it's using in mn2pdf tool -->
2018
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">true
2028
2019
  </xsl:variable>
2029
2020
  <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
2030
2021
 
2031
- <xsl:variable name="isGenerateTableIF_">
2032
- <xsl:choose>
2033
- <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
2034
- <xsl:value-of select="normalize-space($table_if) = 'true'"/>
2035
- </xsl:when>
2036
- <xsl:otherwise>false</xsl:otherwise>
2037
- </xsl:choose>
2038
- </xsl:variable>
2039
- <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
2022
+ <xsl:variable name="isGenerateTableIF"><xsl:value-of select="$table_if"/></xsl:variable>
2023
+ <!-- <xsl:variable name="isGenerateTableIF" select="normalize-space(normalize-space($table_if) = 'true' and 1 = 1)"/> -->
2040
2024
 
2041
2025
  <xsl:variable name="lang">
2042
2026
  <xsl:call-template name="getLang"/>
@@ -2088,8 +2072,7 @@
2088
2072
  <xsl:variable name="pageWidth_">
2089
2073
  <xsl:choose>
2090
2074
  <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
2091
- <xsl:otherwise>
2092
- 210
2075
+ <xsl:otherwise>210
2093
2076
  </xsl:otherwise>
2094
2077
  </xsl:choose>
2095
2078
  </xsl:variable>
@@ -2099,8 +2082,7 @@
2099
2082
  <xsl:variable name="pageHeight_">
2100
2083
  <xsl:choose>
2101
2084
  <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
2102
- <xsl:otherwise>
2103
- 297
2085
+ <xsl:otherwise>297
2104
2086
  </xsl:otherwise>
2105
2087
  </xsl:choose>
2106
2088
  </xsl:variable>
@@ -2109,23 +2091,19 @@
2109
2091
  <!-- Page margins in mm (just digits, without 'mm')-->
2110
2092
  <!-- marginLeftRight1 and marginLeftRight2 - is left or right margin depends on odd/even page,
2111
2093
  for example, left margin on odd page and right margin on even page -->
2112
- <xsl:variable name="marginLeftRight1_">
2113
- 25
2094
+ <xsl:variable name="marginLeftRight1_">25
2114
2095
  </xsl:variable>
2115
2096
  <xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/>
2116
2097
 
2117
- <xsl:variable name="marginLeftRight2_">
2118
- 15
2098
+ <xsl:variable name="marginLeftRight2_">15
2119
2099
  </xsl:variable>
2120
2100
  <xsl:variable name="marginLeftRight2" select="normalize-space($marginLeftRight2_)"/>
2121
2101
 
2122
- <xsl:variable name="marginTop_">
2123
- 29.5
2102
+ <xsl:variable name="marginTop_">29.5
2124
2103
  </xsl:variable>
2125
2104
  <xsl:variable name="marginTop" select="normalize-space($marginTop_)"/>
2126
2105
 
2127
- <xsl:variable name="marginBottom_">
2128
- 23.5
2106
+ <xsl:variable name="marginBottom_">23.5
2129
2107
  </xsl:variable>
2130
2108
  <xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
2131
2109
 
@@ -2174,13 +2152,10 @@
2174
2152
  <title-toc lang="zh">目次</title-toc>
2175
2153
 
2176
2154
  <title-part lang="en">
2177
-
2178
2155
  </title-part>
2179
2156
  <title-part lang="fr">
2180
-
2181
2157
  </title-part>
2182
2158
  <title-part lang="ru">
2183
-
2184
2159
  </title-part>
2185
2160
  <title-part lang="zh">第 # 部分:</title-part>
2186
2161
 
@@ -2234,6 +2209,7 @@
2234
2209
  <xsl:variable name="hair_space"> </xsl:variable>
2235
2210
  <xsl:variable name="en_dash">–</xsl:variable>
2236
2211
  <xsl:variable name="em_dash">—</xsl:variable>
2212
+ <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
2237
2213
  <xsl:variable name="cr">&#13;</xsl:variable>
2238
2214
  <xsl:variable name="lf">
2239
2215
  </xsl:variable>
@@ -2275,11 +2251,9 @@
2275
2251
  <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>
2276
2252
  <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>
2277
2253
  <xsl:attribute-set name="root-style">
2278
-
2279
- <xsl:attribute name="font-family">Times New Roman, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
2280
- <xsl:attribute name="font-family-generic">Serif</xsl:attribute>
2281
- <xsl:attribute name="font-size">10.5pt</xsl:attribute>
2282
-
2254
+ <xsl:attribute name="font-family">Times New Roman, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
2255
+ <xsl:attribute name="font-family-generic">Serif</xsl:attribute>
2256
+ <xsl:attribute name="font-size">10.5pt</xsl:attribute>
2283
2257
  </xsl:attribute-set> <!-- root-style -->
2284
2258
 
2285
2259
  <xsl:template name="insertRootStyle">
@@ -2367,28 +2341,22 @@
2367
2341
 
2368
2342
  <!-- Preface sections styles -->
2369
2343
  <xsl:attribute-set name="copyright-statement-style">
2370
-
2371
2344
  </xsl:attribute-set> <!-- copyright-statement-style -->
2372
2345
 
2373
2346
  <xsl:attribute-set name="copyright-statement-title-style">
2374
-
2375
2347
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
2376
2348
 
2377
2349
  <xsl:attribute-set name="copyright-statement-p-style">
2378
-
2379
2350
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
2380
2351
 
2381
2352
  <xsl:attribute-set name="license-statement-style">
2382
-
2383
2353
  </xsl:attribute-set>
2384
2354
 
2385
2355
  <xsl:attribute-set name="license-statement-title-style">
2386
2356
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2387
-
2388
2357
  </xsl:attribute-set> <!-- license-statement-title-style -->
2389
2358
 
2390
2359
  <xsl:attribute-set name="license-statement-p-style">
2391
-
2392
2360
  </xsl:attribute-set> <!-- license-statement-p-style -->
2393
2361
 
2394
2362
  <xsl:attribute-set name="legal-statement-style">
@@ -2397,88 +2365,68 @@
2397
2365
 
2398
2366
  <xsl:attribute-set name="legal-statement-title-style">
2399
2367
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2400
-
2401
2368
  </xsl:attribute-set> <!-- legal-statement-title-style -->
2402
2369
 
2403
2370
  <xsl:attribute-set name="legal-statement-p-style">
2404
-
2405
2371
  </xsl:attribute-set> <!-- legal-statement-p-style -->
2406
2372
 
2407
2373
  <xsl:attribute-set name="feedback-statement-style">
2408
-
2409
2374
  </xsl:attribute-set> <!-- feedback-statement-style -->
2410
2375
 
2411
2376
  <xsl:attribute-set name="feedback-statement-title-style">
2412
2377
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2413
-
2414
2378
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
2415
2379
 
2416
2380
  <xsl:attribute-set name="feedback-statement-p-style">
2417
-
2418
2381
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
2419
2382
 
2420
2383
  <!-- End Preface sections styles -->
2421
2384
 
2422
2385
  <xsl:attribute-set name="link-style">
2423
-
2424
- <xsl:attribute name="color">blue</xsl:attribute>
2425
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
2426
-
2386
+ <xsl:attribute name="color">blue</xsl:attribute>
2387
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2427
2388
  </xsl:attribute-set>
2428
2389
 
2429
2390
  <xsl:template name="refine_link-style">
2430
-
2431
2391
  </xsl:template> <!-- refine_link-style -->
2432
2392
 
2433
2393
  <xsl:attribute-set name="sourcecode-container-style">
2434
-
2435
2394
  </xsl:attribute-set>
2436
2395
 
2437
2396
  <xsl:attribute-set name="sourcecode-style">
2438
2397
  <xsl:attribute name="white-space">pre</xsl:attribute>
2439
2398
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
2440
2399
  <xsl:attribute name="role">Code</xsl:attribute>
2441
-
2442
- <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
2443
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2444
-
2400
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
2401
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2445
2402
  </xsl:attribute-set>
2446
2403
 
2447
2404
  <xsl:template name="refine_sourcecode-style">
2448
-
2449
2405
  </xsl:template> <!-- refine_sourcecode-style -->
2450
2406
 
2451
2407
  <xsl:attribute-set name="pre-style">
2452
2408
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
2453
2409
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2454
-
2455
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2456
-
2410
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2457
2411
  </xsl:attribute-set>
2458
2412
 
2459
2413
  <xsl:attribute-set name="permission-style">
2460
-
2461
2414
  </xsl:attribute-set>
2462
2415
 
2463
2416
  <xsl:attribute-set name="permission-name-style">
2464
-
2465
2417
  </xsl:attribute-set>
2466
2418
 
2467
2419
  <xsl:attribute-set name="permission-label-style">
2468
-
2469
2420
  </xsl:attribute-set>
2470
2421
 
2471
2422
  <xsl:attribute-set name="requirement-style">
2472
-
2473
2423
  </xsl:attribute-set>
2474
2424
 
2475
2425
  <xsl:attribute-set name="requirement-name-style">
2476
2426
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2477
-
2478
2427
  </xsl:attribute-set>
2479
2428
 
2480
2429
  <xsl:attribute-set name="requirement-label-style">
2481
-
2482
2430
  </xsl:attribute-set>
2483
2431
 
2484
2432
  <xsl:attribute-set name="subject-style">
@@ -2506,135 +2454,106 @@
2506
2454
  </xsl:attribute-set>
2507
2455
 
2508
2456
  <xsl:attribute-set name="recommendation-style">
2509
-
2510
2457
  </xsl:attribute-set>
2511
2458
 
2512
2459
  <xsl:attribute-set name="recommendation-name-style">
2513
-
2514
2460
  </xsl:attribute-set>
2515
2461
 
2516
2462
  <xsl:attribute-set name="recommendation-label-style">
2517
-
2518
2463
  </xsl:attribute-set>
2519
2464
 
2520
2465
  <xsl:attribute-set name="termexample-style">
2521
-
2522
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2523
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
2524
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2525
- <xsl:attribute name="text-align">justify</xsl:attribute>
2526
-
2466
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2467
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
2468
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2469
+ <xsl:attribute name="text-align">justify</xsl:attribute>
2527
2470
  </xsl:attribute-set>
2528
2471
 
2529
2472
  <xsl:template name="refine_termexample-style">
2530
-
2531
2473
  </xsl:template>
2532
2474
 
2533
2475
  <xsl:attribute-set name="example-style">
2534
-
2535
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2536
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
2537
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2538
-
2476
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2477
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
2478
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2539
2479
  </xsl:attribute-set> <!-- example-style -->
2540
2480
 
2541
2481
  <xsl:template name="refine_example-style">
2542
-
2543
2482
  </xsl:template> <!-- refine_example-style -->
2544
2483
 
2545
2484
  <xsl:attribute-set name="example-body-style">
2546
-
2547
2485
  </xsl:attribute-set> <!-- example-body-style -->
2548
2486
 
2549
2487
  <xsl:attribute-set name="example-name-style">
2550
-
2551
- <xsl:attribute name="padding-right">5mm</xsl:attribute>
2552
-
2488
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
2553
2489
  </xsl:attribute-set> <!-- example-name-style -->
2554
2490
 
2555
2491
  <xsl:template name="refine_example-name-style">
2556
-
2557
2492
  </xsl:template>
2558
2493
 
2559
2494
  <xsl:attribute-set name="example-p-style">
2560
-
2561
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2562
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
2563
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2495
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2496
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
2497
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2564
2498
 
2565
2499
  </xsl:attribute-set> <!-- example-p-style -->
2566
2500
 
2567
2501
  <xsl:template name="refine_example-p-style">
2568
-
2569
2502
  </xsl:template> <!-- refine_example-p-style -->
2570
2503
 
2571
2504
  <xsl:attribute-set name="termexample-name-style">
2572
-
2573
- <xsl:attribute name="padding-right">5mm</xsl:attribute>
2574
-
2505
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
2575
2506
  </xsl:attribute-set> <!-- termexample-name-style -->
2576
2507
 
2577
2508
  <xsl:template name="refine_termexample-name-style">
2578
-
2579
2509
  </xsl:template>
2580
2510
 
2581
2511
  <!-- ========================== -->
2582
2512
  <!-- Table styles -->
2583
2513
  <!-- ========================== -->
2584
2514
  <xsl:variable name="table-border_">
2585
-
2586
2515
  </xsl:variable>
2587
2516
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
2588
2517
 
2589
2518
  <xsl:variable name="table-cell-border_">
2590
-
2591
2519
  </xsl:variable>
2592
2520
  <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
2593
2521
 
2594
2522
  <xsl:attribute-set name="table-container-style">
2595
2523
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2596
2524
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
2597
-
2598
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2599
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2600
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2601
-
2525
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2526
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2527
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2602
2528
  </xsl:attribute-set> <!-- table-container-style -->
2603
2529
 
2604
2530
  <xsl:template name="refine_table-container-style">
2605
2531
  <xsl:param name="margin-side"/>
2606
-
2607
2532
  <!-- end table block-container attributes -->
2608
2533
  </xsl:template> <!-- refine_table-container-style -->
2609
2534
 
2610
2535
  <xsl:attribute-set name="table-style">
2611
2536
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
2612
2537
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
2613
-
2614
- <xsl:attribute name="border">1.5pt solid black</xsl:attribute>
2615
-
2538
+ <xsl:attribute name="border">1.5pt solid black</xsl:attribute>
2616
2539
  </xsl:attribute-set><!-- table-style -->
2617
2540
 
2618
2541
  <xsl:template name="refine_table-style">
2619
2542
  <xsl:param name="margin-side"/>
2620
2543
 
2621
2544
  <xsl:call-template name="setBordersTableArray"/>
2622
-
2623
- <xsl:if test="*[local-name()='thead']">
2624
- <xsl:attribute name="border-top">1pt solid black</xsl:attribute>
2625
- </xsl:if>
2626
-
2545
+ <xsl:if test="*[local-name()='thead']">
2546
+ <xsl:attribute name="border-top">1pt solid black</xsl:attribute>
2547
+ </xsl:if>
2627
2548
  </xsl:template> <!-- refine_table-style -->
2628
2549
 
2629
2550
  <xsl:attribute-set name="table-name-style">
2630
2551
  <xsl:attribute name="role">Caption</xsl:attribute>
2631
2552
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2632
-
2633
- <xsl:attribute name="font-size">11pt</xsl:attribute>
2634
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2635
- <xsl:attribute name="text-align">center</xsl:attribute>
2636
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
2637
-
2553
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
2554
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2555
+ <xsl:attribute name="text-align">center</xsl:attribute>
2556
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
2638
2557
  </xsl:attribute-set> <!-- table-name-style -->
2639
2558
 
2640
2559
  <xsl:template name="refine_table-name-style">
@@ -2642,49 +2561,40 @@
2642
2561
  <xsl:if test="$continued = 'true'">
2643
2562
  <xsl:attribute name="role">SKIP</xsl:attribute>
2644
2563
  </xsl:if>
2645
-
2646
2564
  </xsl:template> <!-- refine_table-name-style -->
2647
2565
 
2648
2566
  <xsl:attribute-set name="table-row-style">
2649
2567
  <xsl:attribute name="min-height">4mm</xsl:attribute>
2650
-
2651
2568
  </xsl:attribute-set>
2652
2569
 
2653
2570
  <xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
2654
2571
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2655
-
2656
- <xsl:attribute name="border-top">solid black 1pt</xsl:attribute>
2657
- <xsl:attribute name="border-bottom">solid black 1pt</xsl:attribute>
2658
-
2572
+ <xsl:attribute name="border-top">solid black 1pt</xsl:attribute>
2573
+ <xsl:attribute name="border-bottom">solid black 1pt</xsl:attribute>
2659
2574
  </xsl:attribute-set>
2660
2575
 
2661
2576
  <xsl:template name="refine_table-header-row-style">
2662
2577
 
2663
2578
  <xsl:call-template name="setBordersTableArray"/>
2664
-
2665
- <xsl:choose>
2666
- <xsl:when test="position() = 1">
2667
- <xsl:attribute name="border-top">solid black 1.5pt</xsl:attribute>
2668
- <xsl:attribute name="border-bottom">solid black 1pt</xsl:attribute>
2669
- </xsl:when>
2670
- <xsl:when test="position() = last()">
2671
- <xsl:attribute name="border-top">solid black 1pt</xsl:attribute>
2672
- <xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
2673
- </xsl:when>
2674
- </xsl:choose>
2675
-
2579
+ <xsl:choose>
2580
+ <xsl:when test="position() = 1">
2581
+ <xsl:attribute name="border-top">solid black 1.5pt</xsl:attribute>
2582
+ <xsl:attribute name="border-bottom">solid black 1pt</xsl:attribute>
2583
+ </xsl:when>
2584
+ <xsl:when test="position() = last()">
2585
+ <xsl:attribute name="border-top">solid black 1pt</xsl:attribute>
2586
+ <xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
2587
+ </xsl:when>
2588
+ </xsl:choose>
2676
2589
  </xsl:template> <!-- refine_table-header-row-style -->
2677
2590
 
2678
2591
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
2679
-
2680
- <xsl:attribute name="font-size">9pt</xsl:attribute>
2681
- <xsl:attribute name="border-left">solid black 1pt</xsl:attribute>
2682
- <xsl:attribute name="border-right">solid black 1pt</xsl:attribute>
2683
-
2592
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
2593
+ <xsl:attribute name="border-left">solid black 1pt</xsl:attribute>
2594
+ <xsl:attribute name="border-right">solid black 1pt</xsl:attribute>
2684
2595
  </xsl:attribute-set>
2685
2596
 
2686
2597
  <xsl:template name="refine_table-footer-row-style">
2687
-
2688
2598
  </xsl:template> <!-- refine_table-footer-row-style -->
2689
2599
 
2690
2600
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
@@ -2694,7 +2604,6 @@
2694
2604
  <xsl:template name="refine_table-body-row-style">
2695
2605
 
2696
2606
  <xsl:call-template name="setBordersTableArray"/>
2697
-
2698
2607
  </xsl:template> <!-- refine_table-body-row-style -->
2699
2608
 
2700
2609
  <xsl:attribute-set name="table-header-cell-style">
@@ -2702,10 +2611,8 @@
2702
2611
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
2703
2612
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2704
2613
  <xsl:attribute name="display-align">center</xsl:attribute>
2705
-
2706
- <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2707
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
2708
-
2614
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2615
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
2709
2616
  </xsl:attribute-set> <!-- table-header-cell-style -->
2710
2617
 
2711
2618
  <xsl:template name="refine_table-header-cell-style">
@@ -2717,17 +2624,14 @@
2717
2624
  </xsl:if>
2718
2625
 
2719
2626
  <xsl:call-template name="setTableCellAttributes"/>
2720
-
2721
2627
  </xsl:template> <!-- refine_table-header-cell-style -->
2722
2628
 
2723
2629
  <xsl:attribute-set name="table-cell-style">
2724
2630
  <xsl:attribute name="display-align">center</xsl:attribute>
2725
2631
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
2726
2632
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2727
-
2728
- <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2729
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2730
-
2633
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2634
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2731
2635
  </xsl:attribute-set> <!-- table-cell-style -->
2732
2636
 
2733
2637
  <xsl:template name="refine_table-cell-style">
@@ -2736,16 +2640,13 @@
2736
2640
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2737
2641
  </xsl:if>
2738
2642
 
2739
- <!-- bsi -->
2740
-
2741
2643
  <xsl:call-template name="setBordersTableArray"/>
2742
-
2743
- <xsl:if test="count(*) = 1 and (local-name(*[1]) = 'stem' or local-name(*[1]) = 'figure')">
2744
- <xsl:attribute name="padding-left">0mm</xsl:attribute>
2745
- </xsl:if>
2746
- <xsl:if test="ancestor::*[local-name() = 'tfoot']">
2747
- <xsl:attribute name="border">solid black 0</xsl:attribute>
2748
- </xsl:if>
2644
+ <xsl:if test="count(*) = 1 and (local-name(*[1]) = 'stem' or local-name(*[1]) = 'figure')">
2645
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
2646
+ </xsl:if>
2647
+ <xsl:if test="ancestor::*[local-name() = 'tfoot']">
2648
+ <xsl:attribute name="border">solid black 0</xsl:attribute>
2649
+ </xsl:if>
2749
2650
 
2750
2651
  </xsl:template> <!-- refine_table-cell-style -->
2751
2652
 
@@ -2754,64 +2655,49 @@
2754
2655
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
2755
2656
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2756
2657
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
2757
-
2758
- <xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
2759
-
2658
+ <xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
2760
2659
  </xsl:attribute-set> <!-- table-footer-cell-style -->
2761
2660
 
2762
2661
  <xsl:template name="refine_table-footer-cell-style">
2763
-
2764
2662
  </xsl:template> <!-- refine_table-footer-cell-style -->
2765
2663
 
2766
2664
  <xsl:attribute-set name="table-note-style">
2767
2665
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2768
2666
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2769
-
2770
- <xsl:attribute name="font-size">9pt</xsl:attribute>
2771
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2772
-
2667
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
2668
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2773
2669
  </xsl:attribute-set><!-- table-note-style -->
2774
2670
 
2775
2671
  <xsl:template name="refine_table-note-style">
2776
-
2777
2672
  </xsl:template> <!-- refine_table-note-style -->
2778
2673
 
2779
2674
  <xsl:attribute-set name="table-fn-style">
2780
2675
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2781
-
2782
- <xsl:attribute name="font-size">9pt</xsl:attribute>
2783
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2784
-
2676
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
2677
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2785
2678
  </xsl:attribute-set> <!-- table-fn-style -->
2786
2679
 
2787
2680
  <xsl:template name="refine_table-fn-style">
2788
-
2789
2681
  </xsl:template>
2790
2682
 
2791
2683
  <xsl:attribute-set name="table-fn-number-style">
2792
2684
  <!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
2793
-
2794
2685
  </xsl:attribute-set> <!-- table-fn-number-style -->
2795
2686
 
2796
2687
  <xsl:attribute-set name="table-fmt-fn-label-style">
2797
2688
  <xsl:attribute name="font-size">80%</xsl:attribute>
2798
-
2799
- <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
2800
-
2689
+ <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
2801
2690
  </xsl:attribute-set> <!-- table-fmt-fn-label-style -->
2802
2691
 
2803
2692
  <xsl:template name="refine_table-fmt-fn-label-style">
2804
-
2805
2693
  </xsl:template>
2806
2694
 
2807
2695
  <xsl:attribute-set name="fn-container-body-style">
2808
2696
  <xsl:attribute name="text-indent">0</xsl:attribute>
2809
2697
  <xsl:attribute name="start-indent">0</xsl:attribute>
2810
-
2811
2698
  </xsl:attribute-set>
2812
2699
 
2813
2700
  <xsl:attribute-set name="table-fn-body-style">
2814
-
2815
2701
  </xsl:attribute-set>
2816
2702
 
2817
2703
  <xsl:attribute-set name="figure-fn-number-style">
@@ -2821,17 +2707,14 @@
2821
2707
  <xsl:attribute-set name="figure-fmt-fn-label-style">
2822
2708
  <xsl:attribute name="font-size">80%</xsl:attribute>
2823
2709
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2824
-
2825
2710
  </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
2826
2711
 
2827
2712
  <xsl:template name="refine_figure-fmt-fn-label-style">
2828
-
2829
2713
  </xsl:template>
2830
2714
 
2831
2715
  <xsl:attribute-set name="figure-fn-body-style">
2832
2716
  <xsl:attribute name="text-align">justify</xsl:attribute>
2833
2717
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2834
-
2835
2718
  </xsl:attribute-set>
2836
2719
  <!-- ========================== -->
2837
2720
  <!-- END Table styles -->
@@ -2842,45 +2725,35 @@
2842
2725
  <!-- ========================== -->
2843
2726
 
2844
2727
  <xsl:attribute-set name="dl-block-style">
2845
-
2846
2728
  </xsl:attribute-set>
2847
2729
 
2848
2730
  <xsl:attribute-set name="dt-row-style">
2849
-
2850
2731
  </xsl:attribute-set>
2851
2732
 
2852
2733
  <xsl:attribute-set name="dt-cell-style">
2853
-
2854
2734
  </xsl:attribute-set>
2855
2735
 
2856
2736
  <xsl:template name="refine_dt-cell-style">
2857
-
2858
2737
  </xsl:template> <!-- refine_dt-cell-style -->
2859
2738
 
2860
2739
  <xsl:attribute-set name="dt-block-style">
2861
2740
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
2862
-
2863
2741
  </xsl:attribute-set>
2864
2742
 
2865
2743
  <xsl:template name="refine_dt-block-style">
2866
-
2867
2744
  </xsl:template> <!-- refine_dt-block-style -->
2868
2745
 
2869
2746
  <xsl:attribute-set name="dl-name-style">
2870
2747
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2871
2748
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2872
-
2873
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2874
-
2749
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2875
2750
  </xsl:attribute-set> <!-- dl-name-style -->
2876
2751
 
2877
2752
  <xsl:attribute-set name="dd-cell-style">
2878
2753
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
2879
-
2880
2754
  </xsl:attribute-set>
2881
2755
 
2882
2756
  <xsl:template name="refine_dd-cell-style">
2883
-
2884
2757
  </xsl:template> <!-- refine_dd-cell-style -->
2885
2758
 
2886
2759
  <!-- ========================== -->
@@ -2888,255 +2761,193 @@
2888
2761
  <!-- ========================== -->
2889
2762
 
2890
2763
  <xsl:attribute-set name="appendix-style">
2891
-
2892
- <xsl:attribute name="font-size">12pt</xsl:attribute>
2893
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2894
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2895
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2896
-
2764
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
2765
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2766
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2767
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2897
2768
  </xsl:attribute-set>
2898
2769
 
2899
2770
  <xsl:attribute-set name="appendix-example-style">
2900
-
2901
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2902
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
2903
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2904
-
2771
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2772
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
2773
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2905
2774
  </xsl:attribute-set>
2906
2775
 
2907
2776
  <xsl:attribute-set name="xref-style">
2908
-
2909
- <xsl:attribute name="color">blue</xsl:attribute>
2910
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
2911
-
2777
+ <xsl:attribute name="color">blue</xsl:attribute>
2778
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2912
2779
  </xsl:attribute-set>
2913
2780
 
2914
2781
  <xsl:attribute-set name="eref-style">
2915
-
2916
2782
  </xsl:attribute-set>
2917
2783
 
2918
2784
  <xsl:template name="refine_eref-style">
2919
2785
  <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
2920
2786
  <xsl:variable name="text" select="normalize-space()"/>
2921
-
2922
2787
  </xsl:template> <!-- refine_eref-style -->
2923
2788
 
2924
2789
  <xsl:attribute-set name="note-style">
2925
-
2926
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2927
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
2928
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2929
- <xsl:attribute name="text-align">justify</xsl:attribute>
2930
-
2790
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2791
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
2792
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2793
+ <xsl:attribute name="text-align">justify</xsl:attribute>
2931
2794
  </xsl:attribute-set>
2932
2795
 
2933
2796
  <xsl:template name="refine_note-style">
2934
-
2935
2797
  </xsl:template>
2936
2798
 
2937
2799
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
2938
2800
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
2939
2801
 
2940
2802
  <xsl:attribute-set name="note-name-style">
2941
-
2942
- <xsl:attribute name="padding-right">6mm</xsl:attribute>
2943
-
2803
+ <xsl:attribute name="padding-right">6mm</xsl:attribute>
2944
2804
  </xsl:attribute-set>
2945
2805
 
2946
2806
  <xsl:template name="refine_note-name-style">
2947
-
2948
2807
  </xsl:template> <!-- refine_note-name-style -->
2949
2808
 
2950
2809
  <xsl:attribute-set name="table-note-name-style">
2951
2810
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
2952
-
2953
2811
  </xsl:attribute-set>
2954
2812
 
2955
2813
  <xsl:template name="refine_table-note-name-style">
2956
-
2957
2814
  </xsl:template> <!-- refine_table-note-name-style -->
2958
2815
 
2959
2816
  <xsl:attribute-set name="note-p-style">
2960
-
2961
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
2962
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2963
-
2817
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
2818
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2964
2819
  </xsl:attribute-set>
2965
2820
 
2966
2821
  <xsl:attribute-set name="termnote-style">
2967
-
2968
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2969
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
2970
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2971
- <xsl:attribute name="text-align">justify</xsl:attribute>
2972
-
2822
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2823
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
2824
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2825
+ <xsl:attribute name="text-align">justify</xsl:attribute>
2973
2826
  </xsl:attribute-set>
2974
2827
 
2975
2828
  <xsl:template name="refine_termnote-style">
2976
-
2977
2829
  </xsl:template> <!-- refine_termnote-style -->
2978
2830
 
2979
2831
  <xsl:attribute-set name="termnote-name-style">
2980
-
2981
2832
  </xsl:attribute-set>
2982
2833
 
2983
2834
  <xsl:template name="refine_termnote-name-style">
2984
-
2985
- <!-- <xsl:if test="$namespace = 'ieee'">
2986
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
2987
- </xsl:if> -->
2988
-
2989
2835
  </xsl:template>
2990
2836
 
2991
2837
  <xsl:attribute-set name="termnote-p-style">
2992
-
2993
2838
  </xsl:attribute-set>
2994
2839
 
2995
2840
  <xsl:attribute-set name="quote-style">
2996
2841
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
2997
2842
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
2998
-
2999
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
3000
- <xsl:attribute name="font-style">italic</xsl:attribute>
3001
- <xsl:attribute name="text-align">justify</xsl:attribute>
3002
-
2843
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2844
+ <xsl:attribute name="font-style">italic</xsl:attribute>
2845
+ <xsl:attribute name="text-align">justify</xsl:attribute>
3003
2846
  </xsl:attribute-set>
3004
2847
 
3005
2848
  <xsl:template name="refine_quote-style">
3006
-
3007
- <xsl:if test="ancestor::*[local-name() = 'boilerplate']">
3008
- <xsl:attribute name="margin-left">7mm</xsl:attribute>
3009
- <xsl:attribute name="margin-right">7mm</xsl:attribute>
3010
- <xsl:attribute name="font-style">normal</xsl:attribute>
3011
- </xsl:if>
3012
-
2849
+ <xsl:if test="ancestor::*[local-name() = 'boilerplate']">
2850
+ <xsl:attribute name="margin-left">7mm</xsl:attribute>
2851
+ <xsl:attribute name="margin-right">7mm</xsl:attribute>
2852
+ <xsl:attribute name="font-style">normal</xsl:attribute>
2853
+ </xsl:if>
3013
2854
  </xsl:template>
3014
2855
 
3015
2856
  <xsl:attribute-set name="quote-source-style">
3016
2857
  <xsl:attribute name="text-align">right</xsl:attribute>
3017
-
3018
2858
  </xsl:attribute-set>
3019
2859
 
3020
2860
  <xsl:attribute-set name="termsource-style">
3021
-
3022
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
3023
-
2861
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
3024
2862
  </xsl:attribute-set>
3025
2863
 
3026
2864
  <xsl:template name="refine_termsource-style">
3027
-
3028
2865
  </xsl:template> <!-- refine_termsource-style -->
3029
2866
 
3030
2867
  <xsl:attribute-set name="termsource-text-style">
3031
-
3032
2868
  </xsl:attribute-set>
3033
2869
 
3034
2870
  <xsl:attribute-set name="origin-style">
3035
-
3036
2871
  </xsl:attribute-set>
3037
2872
 
3038
2873
  <xsl:attribute-set name="term-style">
3039
-
3040
- <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
3041
-
2874
+ <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
3042
2875
  </xsl:attribute-set>
3043
2876
 
3044
2877
  <xsl:attribute-set name="term-name-style">
3045
2878
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3046
2879
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3047
-
3048
2880
  </xsl:attribute-set>
3049
2881
 
3050
2882
  <xsl:attribute-set name="figure-block-style">
3051
2883
  <xsl:attribute name="role">SKIP</xsl:attribute>
3052
-
3053
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3054
-
2884
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3055
2885
  </xsl:attribute-set>
3056
2886
 
3057
2887
  <xsl:template name="refine_figure-block-style">
3058
-
3059
2888
  </xsl:template>
3060
2889
 
3061
2890
  <xsl:attribute-set name="figure-style">
3062
-
3063
2891
  </xsl:attribute-set>
3064
2892
 
3065
2893
  <xsl:attribute-set name="figure-name-style">
3066
2894
  <xsl:attribute name="role">Caption</xsl:attribute>
3067
-
3068
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3069
- <xsl:attribute name="text-align">center</xsl:attribute>
3070
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
3071
- <xsl:attribute name="space-after">12pt</xsl:attribute>
3072
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
3073
-
2895
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2896
+ <xsl:attribute name="text-align">center</xsl:attribute>
2897
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2898
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
2899
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
3074
2900
  </xsl:attribute-set>
3075
2901
 
3076
2902
  <xsl:template name="refine_figure-name-style">
3077
-
3078
2903
  </xsl:template> <!-- refine_figure-name-style -->
3079
2904
 
3080
2905
  <xsl:attribute-set name="figure-source-style">
3081
-
3082
2906
  </xsl:attribute-set>
3083
2907
 
3084
2908
  <!-- Formula's styles -->
3085
2909
  <xsl:attribute-set name="formula-style">
3086
2910
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
3087
2911
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3088
-
3089
2912
  </xsl:attribute-set> <!-- formula-style -->
3090
2913
 
3091
2914
  <xsl:attribute-set name="formula-stem-block-style">
3092
2915
  <xsl:attribute name="text-align">center</xsl:attribute>
3093
-
3094
- <xsl:attribute name="text-align">left</xsl:attribute>
3095
- <xsl:attribute name="margin-left">25mm</xsl:attribute>
3096
-
2916
+ <xsl:attribute name="text-align">left</xsl:attribute>
2917
+ <xsl:attribute name="margin-left">25mm</xsl:attribute>
3097
2918
  </xsl:attribute-set> <!-- formula-stem-block-style -->
3098
2919
 
3099
2920
  <xsl:template name="refine_formula-stem-block-style">
3100
-
3101
2921
  </xsl:template> <!-- refine_formula-stem-block-style -->
3102
2922
 
3103
2923
  <xsl:attribute-set name="formula-stem-number-style">
3104
2924
  <xsl:attribute name="text-align">right</xsl:attribute>
3105
-
3106
2925
  </xsl:attribute-set> <!-- formula-stem-number-style -->
3107
2926
  <!-- End Formula's styles -->
3108
2927
 
3109
2928
  <xsl:template name="refine_formula-stem-number-style">
3110
-
3111
2929
  </xsl:template>
3112
2930
 
3113
2931
  <xsl:attribute-set name="image-style">
3114
2932
  <xsl:attribute name="role">SKIP</xsl:attribute>
3115
2933
  <xsl:attribute name="text-align">center</xsl:attribute>
3116
-
3117
2934
  </xsl:attribute-set>
3118
2935
 
3119
2936
  <xsl:template name="refine_image-style">
3120
-
3121
2937
  </xsl:template>
3122
2938
 
3123
2939
  <xsl:attribute-set name="figure-pseudocode-p-style">
3124
-
3125
2940
  </xsl:attribute-set>
3126
2941
 
3127
2942
  <xsl:attribute-set name="image-graphic-style">
3128
2943
  <xsl:attribute name="width">100%</xsl:attribute>
3129
2944
  <xsl:attribute name="content-height">100%</xsl:attribute>
3130
2945
  <xsl:attribute name="scaling">uniform</xsl:attribute>
3131
-
3132
- <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
3133
-
2946
+ <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
3134
2947
  </xsl:attribute-set>
3135
2948
 
3136
2949
  <xsl:attribute-set name="tt-style">
3137
-
3138
- <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
3139
-
2950
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
3140
2951
  </xsl:attribute-set>
3141
2952
 
3142
2953
  <xsl:attribute-set name="sourcecode-name-style">
@@ -3145,56 +2956,44 @@
3145
2956
  <xsl:attribute name="text-align">center</xsl:attribute>
3146
2957
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3147
2958
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
3148
-
3149
2959
  </xsl:attribute-set>
3150
2960
 
3151
2961
  <xsl:attribute-set name="preferred-block-style">
3152
-
3153
- <xsl:attribute name="line-height">1.1</xsl:attribute>
3154
-
2962
+ <xsl:attribute name="line-height">1.1</xsl:attribute>
3155
2963
  </xsl:attribute-set>
3156
2964
 
3157
2965
  <xsl:attribute-set name="preferred-term-style">
3158
2966
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3159
2967
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3160
-
3161
2968
  </xsl:attribute-set>
3162
2969
 
3163
2970
  <xsl:attribute-set name="domain-style">
3164
-
3165
2971
  </xsl:attribute-set>
3166
2972
 
3167
2973
  <xsl:attribute-set name="admitted-style">
3168
-
3169
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3170
-
2974
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3171
2975
  </xsl:attribute-set>
3172
2976
 
3173
2977
  <xsl:attribute-set name="deprecates-style">
3174
-
3175
2978
  </xsl:attribute-set>
3176
2979
 
3177
2980
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
3178
2981
  </xsl:attribute-set>
3179
2982
 
3180
2983
  <xsl:attribute-set name="definition-style">
3181
-
3182
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3183
-
2984
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3184
2985
  </xsl:attribute-set>
3185
2986
 
3186
2987
  <xsl:variable name="color-added-text">
3187
2988
  <xsl:text>rgb(0, 255, 0)</xsl:text>
3188
2989
  </xsl:variable>
3189
2990
  <xsl:attribute-set name="add-style">
3190
-
3191
- <xsl:attribute name="color">red</xsl:attribute>
3192
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
3193
- <!-- <xsl:attribute name="color">black</xsl:attribute>
2991
+ <xsl:attribute name="color">red</xsl:attribute>
2992
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2993
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
3194
2994
  <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
3195
2995
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
3196
2996
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
3197
-
3198
2997
  </xsl:attribute-set>
3199
2998
 
3200
2999
  <xsl:variable name="add-style">
@@ -3214,56 +3013,42 @@
3214
3013
 
3215
3014
  <xsl:attribute-set name="mathml-style">
3216
3015
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
3217
-
3218
- <xsl:attribute name="font-family">Cambria Math</xsl:attribute>
3219
-
3016
+ <xsl:attribute name="font-family">Cambria Math</xsl:attribute>
3220
3017
  </xsl:attribute-set>
3221
3018
 
3222
3019
  <xsl:template name="refine_mathml-style">
3223
-
3224
3020
  </xsl:template>
3225
3021
 
3226
3022
  <xsl:attribute-set name="list-style">
3227
-
3228
- <xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
3229
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
3230
-
3023
+ <xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
3024
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
3231
3025
  </xsl:attribute-set> <!-- list-style -->
3232
3026
 
3233
3027
  <xsl:template name="refine_list-style">
3234
-
3235
3028
  </xsl:template> <!-- refine_list-style -->
3236
3029
 
3237
3030
  <xsl:attribute-set name="list-name-style">
3238
3031
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3239
-
3240
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
3241
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3242
-
3032
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
3033
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3243
3034
  </xsl:attribute-set> <!-- list-name-style -->
3244
3035
 
3245
3036
  <xsl:attribute-set name="list-item-style">
3246
-
3247
3037
  </xsl:attribute-set>
3248
3038
 
3249
3039
  <xsl:template name="refine_list-item-style">
3250
-
3251
3040
  </xsl:template> <!-- refine_list-item-style -->
3252
3041
 
3253
3042
  <xsl:attribute-set name="list-item-label-style">
3254
-
3255
3043
  </xsl:attribute-set>
3256
3044
 
3257
3045
  <xsl:template name="refine_list-item-label-style">
3258
-
3259
3046
  </xsl:template> <!-- refine_list-item-label-style -->
3260
3047
 
3261
3048
  <xsl:attribute-set name="list-item-body-style">
3262
-
3263
3049
  </xsl:attribute-set>
3264
3050
 
3265
3051
  <xsl:template name="refine_list-item-body-style">
3266
-
3267
3052
  </xsl:template> <!-- refine_list-item-body-style -->
3268
3053
 
3269
3054
  <xsl:attribute-set name="toc-style">
@@ -3277,12 +3062,10 @@
3277
3062
  </xsl:attribute-set>
3278
3063
 
3279
3064
  <xsl:template name="refine_fn-reference-style">
3280
-
3281
- <xsl:if test="ancestor::*[local-name()='table']">
3282
- <xsl:attribute name="font-weight">normal</xsl:attribute>
3283
- <xsl:attribute name="baseline-shift">15%</xsl:attribute>
3284
- </xsl:if>
3285
-
3065
+ <xsl:if test="ancestor::*[local-name()='table']">
3066
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
3067
+ <xsl:attribute name="baseline-shift">15%</xsl:attribute>
3068
+ </xsl:if>
3286
3069
  </xsl:template> <!-- refine_fn-reference-style -->
3287
3070
 
3288
3071
  <xsl:attribute-set name="fn-style">
@@ -3291,10 +3074,8 @@
3291
3074
 
3292
3075
  <xsl:attribute-set name="fn-num-style">
3293
3076
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3294
-
3295
- <xsl:attribute name="font-size">65%</xsl:attribute>
3296
- <xsl:attribute name="vertical-align">super</xsl:attribute>
3297
-
3077
+ <xsl:attribute name="font-size">65%</xsl:attribute>
3078
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
3298
3079
  </xsl:attribute-set>
3299
3080
 
3300
3081
  <xsl:attribute-set name="fn-body-style">
@@ -3302,122 +3083,91 @@
3302
3083
  <xsl:attribute name="font-style">normal</xsl:attribute>
3303
3084
  <xsl:attribute name="text-indent">0</xsl:attribute>
3304
3085
  <xsl:attribute name="start-indent">0</xsl:attribute>
3305
-
3306
- <xsl:attribute name="font-size">9pt</xsl:attribute>
3307
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3308
- <xsl:attribute name="line-height">124%</xsl:attribute>
3309
- <xsl:attribute name="text-align">justify</xsl:attribute>
3310
-
3086
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
3087
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3088
+ <xsl:attribute name="line-height">124%</xsl:attribute>
3089
+ <xsl:attribute name="text-align">justify</xsl:attribute>
3311
3090
  </xsl:attribute-set>
3312
3091
 
3313
3092
  <xsl:template name="refine_fn-body-style">
3314
-
3315
3093
  </xsl:template> <!-- refine_fn-body-style -->
3316
3094
 
3317
3095
  <xsl:attribute-set name="fn-body-num-style">
3318
3096
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
3319
-
3320
- <xsl:attribute name="font-size">60%</xsl:attribute>
3321
- <xsl:attribute name="vertical-align">super</xsl:attribute>
3322
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
3323
-
3097
+ <xsl:attribute name="font-size">60%</xsl:attribute>
3098
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
3099
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
3324
3100
  </xsl:attribute-set> <!-- fn-body-num-style -->
3325
3101
 
3326
3102
  <xsl:template name="refine_fn-body-num-style">
3327
-
3328
3103
  </xsl:template> <!-- refine_fn-body-num-style -->
3329
3104
 
3330
3105
  <!-- admonition -->
3331
3106
  <xsl:attribute-set name="admonition-style">
3332
-
3333
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3334
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3335
-
3107
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3108
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3336
3109
  </xsl:attribute-set> <!-- admonition-style -->
3337
3110
 
3338
3111
  <xsl:attribute-set name="admonition-container-style">
3339
3112
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
3340
3113
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
3341
-
3342
3114
  </xsl:attribute-set> <!-- admonition-container-style -->
3343
3115
 
3344
3116
  <xsl:attribute-set name="admonition-name-style">
3345
3117
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3346
-
3347
3118
  </xsl:attribute-set> <!-- admonition-name-style -->
3348
3119
 
3349
3120
  <xsl:attribute-set name="admonition-p-style">
3350
-
3351
3121
  </xsl:attribute-set> <!-- admonition-p-style -->
3352
3122
  <!-- end admonition -->
3353
3123
 
3354
3124
  <!-- bibitem in Normative References (references/@normative="true") -->
3355
3125
  <xsl:attribute-set name="bibitem-normative-style">
3356
-
3357
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3358
-
3126
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3359
3127
  </xsl:attribute-set> <!-- bibitem-normative-style -->
3360
3128
 
3361
3129
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
3362
3130
  <xsl:attribute-set name="bibitem-normative-list-style">
3363
3131
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
3364
3132
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3365
-
3366
- <!-- <xsl:if test="$namespace = 'ieee'">
3367
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3368
- <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
3369
- </xsl:if> -->
3370
-
3371
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3372
-
3133
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3373
3134
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
3374
3135
 
3375
3136
  <xsl:attribute-set name="bibitem-non-normative-style">
3376
-
3377
3137
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
3378
3138
 
3379
3139
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
3380
3140
  <xsl:attribute-set name="bibitem-non-normative-list-style">
3381
3141
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
3382
3142
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3383
-
3384
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3385
-
3143
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3386
3144
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
3387
3145
 
3388
3146
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
3389
3147
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3390
-
3391
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3392
-
3148
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3393
3149
  </xsl:attribute-set>
3394
3150
 
3395
3151
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
3396
3152
  <xsl:attribute-set name="bibitem-normative-list-body-style">
3397
-
3398
3153
  </xsl:attribute-set>
3399
3154
 
3400
3155
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
3401
-
3402
3156
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
3403
3157
 
3404
3158
  <!-- footnote reference number for bibitem, in the text -->
3405
3159
  <xsl:attribute-set name="bibitem-note-fn-style">
3406
3160
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3407
3161
  <xsl:attribute name="font-size">65%</xsl:attribute>
3408
-
3409
- <xsl:attribute name="font-size">8pt</xsl:attribute>
3410
- <xsl:attribute name="baseline-shift">30%</xsl:attribute>
3411
-
3162
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
3163
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
3412
3164
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
3413
3165
 
3414
3166
  <!-- footnote number on the page bottom -->
3415
3167
  <xsl:attribute-set name="bibitem-note-fn-number-style">
3416
3168
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
3417
-
3418
- <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
3419
- <xsl:attribute name="padding-right">3mm</xsl:attribute>
3420
-
3169
+ <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
3170
+ <xsl:attribute name="padding-right">3mm</xsl:attribute>
3421
3171
  </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
3422
3172
 
3423
3173
  <!-- footnote body (text) on the page bottom -->
@@ -3425,13 +3175,10 @@
3425
3175
  <xsl:attribute name="font-size">10pt</xsl:attribute>
3426
3176
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3427
3177
  <xsl:attribute name="start-indent">0pt</xsl:attribute>
3428
-
3429
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
3430
-
3178
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
3431
3179
  </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
3432
3180
 
3433
3181
  <xsl:attribute-set name="references-non-normative-style">
3434
-
3435
3182
  </xsl:attribute-set> <!-- references-non-normative-style -->
3436
3183
 
3437
3184
  <!-- Highlight.js syntax GitHub styles -->
@@ -3591,18 +3338,14 @@
3591
3338
  <!-- Index section styles -->
3592
3339
  <xsl:attribute-set name="indexsect-title-style">
3593
3340
  <xsl:attribute name="role">H1</xsl:attribute>
3594
-
3595
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3596
- <xsl:attribute name="span">all</xsl:attribute>
3597
-
3341
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3342
+ <xsl:attribute name="span">all</xsl:attribute>
3598
3343
  </xsl:attribute-set>
3599
3344
 
3600
3345
  <xsl:attribute-set name="indexsect-clause-title-style">
3601
3346
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3602
-
3603
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3604
- <xsl:attribute name="margin-left">25mm</xsl:attribute>
3605
-
3347
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3348
+ <xsl:attribute name="margin-left">25mm</xsl:attribute>
3606
3349
  </xsl:attribute-set>
3607
3350
 
3608
3351
  <!-- End Index section styles -->
@@ -3679,47 +3422,47 @@
3679
3422
  </xsl:template>
3680
3423
 
3681
3424
  <xsl:template name="processTables_Contents">
3682
- <tables>
3425
+ <mn:tables>
3683
3426
  <xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
3684
3427
  <xsl:choose>
3685
3428
  <xsl:when test="*[local-name() = 'fmt-name']">
3686
3429
  <xsl:variable name="fmt_name">
3687
3430
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
3688
3431
  </xsl:variable>
3689
- <table id="{@id}" alt-text="{normalize-space($fmt_name)}">
3432
+ <mn:table id="{@id}" alt-text="{normalize-space($fmt_name)}">
3690
3433
  <xsl:copy-of select="$fmt_name"/>
3691
- </table>
3434
+ </mn:table>
3692
3435
  </xsl:when>
3693
3436
  <xsl:otherwise>
3694
- <table id="{@id}" alt-text="{*[local-name() = 'name']}">
3437
+ <mn:table id="{@id}" alt-text="{*[local-name() = 'name']}">
3695
3438
  <xsl:copy-of select="*[local-name() = 'name']"/>
3696
- </table>
3439
+ </mn:table>
3697
3440
  </xsl:otherwise>
3698
3441
  </xsl:choose>
3699
3442
  </xsl:for-each>
3700
- </tables>
3443
+ </mn:tables>
3701
3444
  </xsl:template>
3702
3445
 
3703
3446
  <xsl:template name="processFigures_Contents">
3704
- <figures>
3447
+ <mn:figures>
3705
3448
  <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(*[local-name() = 'name'], 'Figure ') and normalize-space(@id) != '']">
3706
3449
  <xsl:choose>
3707
3450
  <xsl:when test="*[local-name() = 'fmt-name']">
3708
3451
  <xsl:variable name="fmt_name">
3709
3452
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
3710
3453
  </xsl:variable>
3711
- <figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
3454
+ <mn:figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
3712
3455
  <xsl:copy-of select="$fmt_name"/>
3713
- </figure>
3456
+ </mn:figure>
3714
3457
  </xsl:when>
3715
3458
  <xsl:otherwise>
3716
- <figure id="{@id}" alt-text="{*[local-name() = 'name']}">
3459
+ <mn:figure id="{@id}" alt-text="{*[local-name() = 'name']}">
3717
3460
  <xsl:copy-of select="*[local-name() = 'name']"/>
3718
- </figure>
3461
+ </mn:figure>
3719
3462
  </xsl:otherwise>
3720
3463
  </xsl:choose>
3721
3464
  </xsl:for-each>
3722
- </figures>
3465
+ </mn:figures>
3723
3466
  </xsl:template>
3724
3467
 
3725
3468
  <xsl:template name="processPrefaceSectionsDefault">
@@ -3738,7 +3481,6 @@
3738
3481
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
3739
3482
  <xsl:sort select="@displayorder" data-type="number"/>
3740
3483
  <xsl:apply-templates select="."/>
3741
-
3742
3484
  </xsl:for-each>
3743
3485
 
3744
3486
  <xsl:for-each select="/*/*[local-name()='annex']">
@@ -3845,7 +3587,6 @@
3845
3587
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
3846
3588
  <xsl:sort select="@displayorder" data-type="number"/>
3847
3589
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
3848
-
3849
3590
  </xsl:for-each>
3850
3591
  </xsl:element>
3851
3592
  </xsl:element>
@@ -3979,7 +3720,6 @@
3979
3720
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak">
3980
3721
  <xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
3981
3722
  </xsl:apply-templates>
3982
-
3983
3723
  </xsl:for-each>
3984
3724
  </xsl:element>
3985
3725
 
@@ -4019,19 +3759,17 @@
4019
3759
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
4020
3760
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
4021
3761
  <xsl:template match="text()" name="text">
4022
-
4023
- <xsl:choose>
4024
- <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
4025
- <xsl:otherwise>
4026
- <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
4027
- <xsl:call-template name="replace_fo_inline_tags">
4028
- <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
4029
- <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
4030
- <xsl:with-param name="text" select="$text"/>
4031
- </xsl:call-template>
4032
- </xsl:otherwise>
4033
- </xsl:choose>
4034
-
3762
+ <xsl:choose>
3763
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
3764
+ <xsl:otherwise>
3765
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
3766
+ <xsl:call-template name="replace_fo_inline_tags">
3767
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
3768
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
3769
+ <xsl:with-param name="text" select="$text"/>
3770
+ </xsl:call-template>
3771
+ </xsl:otherwise>
3772
+ </xsl:choose>
4035
3773
  </xsl:template>
4036
3774
 
4037
3775
  <xsl:template name="replace_fo_inline_tags">
@@ -4085,7 +3823,7 @@
4085
3823
  <xsl:with-param name="keep_sep">true</xsl:with-param>
4086
3824
  </xsl:call-template>
4087
3825
  </xsl:variable>
4088
- <xsl:for-each select="xalan:nodeset($items)/item">
3826
+ <xsl:for-each select="xalan:nodeset($items)/mn:item">
4089
3827
  <xsl:choose>
4090
3828
  <xsl:when test=". = $sep">
4091
3829
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
@@ -4114,17 +3852,13 @@
4114
3852
  </xsl:template> <!-- copyright-statement -->
4115
3853
 
4116
3854
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
4117
-
4118
- <!-- process in the template 'title' -->
4119
- <xsl:call-template name="title"/>
4120
-
3855
+ <!-- process in the template 'title' -->
3856
+ <xsl:call-template name="title"/>
4121
3857
  </xsl:template> <!-- copyright-statement//title -->
4122
3858
 
4123
3859
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
4124
-
4125
- <!-- process in the template 'paragraph' -->
4126
- <xsl:call-template name="paragraph"/>
4127
-
3860
+ <!-- process in the template 'paragraph' -->
3861
+ <xsl:call-template name="paragraph"/>
4128
3862
  </xsl:template> <!-- copyright-statement//p -->
4129
3863
 
4130
3864
  <xsl:template match="*[local-name()='license-statement']">
@@ -4134,42 +3868,34 @@
4134
3868
  </xsl:template> <!-- license-statement -->
4135
3869
 
4136
3870
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
4137
-
4138
- <!-- process in the template 'title' -->
4139
- <xsl:call-template name="title"/>
4140
-
3871
+ <!-- process in the template 'title' -->
3872
+ <xsl:call-template name="title"/>
4141
3873
  </xsl:template> <!-- license-statement/title -->
4142
3874
 
4143
3875
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
4144
-
4145
- <!-- process in the template 'paragraph' -->
4146
- <xsl:call-template name="paragraph"/>
4147
-
3876
+ <!-- process in the template 'paragraph' -->
3877
+ <xsl:call-template name="paragraph"/>
4148
3878
  </xsl:template> <!-- license-statement/p -->
4149
3879
 
4150
3880
  <xsl:template match="*[local-name()='legal-statement']">
4151
3881
  <xsl:param name="isLegacy">false</xsl:param>
4152
3882
  <fo:block xsl:use-attribute-sets="legal-statement-style">
4153
-
4154
3883
  <xsl:apply-templates/>
4155
3884
  </fo:block>
4156
3885
  </xsl:template> <!-- legal-statement -->
4157
3886
 
4158
3887
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
4159
-
4160
- <!-- process in the template 'title' -->
4161
- <xsl:call-template name="title"/>
3888
+ <!-- process in the template 'title' -->
3889
+ <xsl:call-template name="title"/>
4162
3890
 
4163
3891
  </xsl:template> <!-- legal-statement/title -->
4164
3892
 
4165
3893
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
4166
3894
  <xsl:param name="margin"/>
4167
-
4168
- <!-- process in the template 'paragraph' -->
4169
- <xsl:call-template name="paragraph">
4170
- <xsl:with-param name="margin" select="$margin"/>
4171
- </xsl:call-template>
4172
-
3895
+ <!-- process in the template 'paragraph' -->
3896
+ <xsl:call-template name="paragraph">
3897
+ <xsl:with-param name="margin" select="$margin"/>
3898
+ </xsl:call-template>
4173
3899
  </xsl:template> <!-- legal-statement/p -->
4174
3900
 
4175
3901
  <xsl:template match="*[local-name()='feedback-statement']">
@@ -4179,20 +3905,16 @@
4179
3905
  </xsl:template> <!-- feedback-statement -->
4180
3906
 
4181
3907
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
4182
-
4183
- <!-- process in the template 'title' -->
4184
- <xsl:call-template name="title"/>
4185
-
3908
+ <!-- process in the template 'title' -->
3909
+ <xsl:call-template name="title"/>
4186
3910
  </xsl:template>
4187
3911
 
4188
3912
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
4189
3913
  <xsl:param name="margin"/>
4190
-
4191
- <!-- process in the template 'paragraph' -->
4192
- <xsl:call-template name="paragraph">
4193
- <xsl:with-param name="margin" select="$margin"/>
4194
- </xsl:call-template>
4195
-
3914
+ <!-- process in the template 'paragraph' -->
3915
+ <xsl:call-template name="paragraph">
3916
+ <xsl:with-param name="margin" select="$margin"/>
3917
+ </xsl:call-template>
4196
3918
  </xsl:template>
4197
3919
 
4198
3920
  <!-- ================================= -->
@@ -4245,7 +3967,6 @@
4245
3967
  <xsl:template match="*[local-name()='table']" name="table">
4246
3968
 
4247
3969
  <xsl:variable name="table-preamble">
4248
-
4249
3970
  </xsl:variable>
4250
3971
 
4251
3972
  <xsl:variable name="table">
@@ -4315,8 +4036,7 @@
4315
4036
 
4316
4037
  <xsl:variable name="table_width_default">100%</xsl:variable>
4317
4038
  <xsl:variable name="table_width">
4318
- <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
4319
- <xsl:value-of select="$table_width_default"/>
4039
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) --><xsl:value-of select="$table_width_default"/>
4320
4040
  </xsl:variable>
4321
4041
 
4322
4042
  <xsl:variable name="table_attributes">
@@ -4459,27 +4179,25 @@
4459
4179
  <xsl:when test="@width and @width != 'full-page-width' and @width != 'text-width'">
4460
4180
 
4461
4181
  <!-- centered table when table name is centered (see table-name-style) -->
4462
-
4463
- <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
4464
-
4465
- <fo:table-column column-width="proportional-column-width(1)"/>
4466
- <fo:table-column column-width="{@width}"/>
4467
- <fo:table-column column-width="proportional-column-width(1)"/>
4468
- <fo:table-body role="SKIP">
4469
- <fo:table-row role="SKIP">
4470
- <fo:table-cell column-number="2" role="SKIP">
4471
- <xsl:copy-of select="$table-preamble"/>
4472
- <fo:block role="SKIP">
4473
- <xsl:call-template name="setTrackChangesStyles">
4474
- <xsl:with-param name="isAdded" select="$isAdded"/>
4475
- <xsl:with-param name="isDeleted" select="$isDeleted"/>
4476
- </xsl:call-template>
4477
- <xsl:copy-of select="$table"/>
4478
- </fo:block>
4479
- </fo:table-cell>
4480
- </fo:table-row>
4481
- </fo:table-body>
4482
- </fo:table>
4182
+ <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
4183
+ <fo:table-column column-width="proportional-column-width(1)"/>
4184
+ <fo:table-column column-width="{@width}"/>
4185
+ <fo:table-column column-width="proportional-column-width(1)"/>
4186
+ <fo:table-body role="SKIP">
4187
+ <fo:table-row role="SKIP">
4188
+ <fo:table-cell column-number="2" role="SKIP">
4189
+ <xsl:copy-of select="$table-preamble"/>
4190
+ <fo:block role="SKIP">
4191
+ <xsl:call-template name="setTrackChangesStyles">
4192
+ <xsl:with-param name="isAdded" select="$isAdded"/>
4193
+ <xsl:with-param name="isDeleted" select="$isDeleted"/>
4194
+ </xsl:call-template>
4195
+ <xsl:copy-of select="$table"/>
4196
+ </fo:block>
4197
+ </fo:table-cell>
4198
+ </fo:table-row>
4199
+ </fo:table-body>
4200
+ </fo:table>
4483
4201
 
4484
4202
  </xsl:when>
4485
4203
  <xsl:otherwise>
@@ -4505,7 +4223,6 @@
4505
4223
  </xsl:template>
4506
4224
 
4507
4225
  <xsl:template name="setBordersTableArray">
4508
-
4509
4226
  </xsl:template>
4510
4227
 
4511
4228
  <!-- table/name-->
@@ -4514,53 +4231,51 @@
4514
4231
  <xsl:param name="cols-count"/>
4515
4232
  <xsl:if test="normalize-space() != ''">
4516
4233
 
4517
- <fo:block xsl:use-attribute-sets="table-name-style">
4234
+ <fo:block xsl:use-attribute-sets="table-name-style">
4518
4235
 
4519
- <xsl:call-template name="refine_table-name-style">
4520
- <xsl:with-param name="continued" select="$continued"/>
4521
- </xsl:call-template>
4522
-
4523
- <xsl:choose>
4524
- <xsl:when test="$continued = 'true'">
4525
- <!-- $namespace = 'iso' or -->
4526
- <xsl:apply-templates/>
4236
+ <xsl:call-template name="refine_table-name-style">
4237
+ <xsl:with-param name="continued" select="$continued"/>
4238
+ </xsl:call-template>
4527
4239
 
4528
- </xsl:when>
4529
- <xsl:otherwise>
4530
- <xsl:apply-templates/>
4531
- </xsl:otherwise>
4532
- </xsl:choose>
4240
+ <xsl:choose>
4241
+ <xsl:when test="$continued = 'true'"> <!-- $namespace = 'iso' or -->
4242
+ <xsl:apply-templates/>
4243
+ </xsl:when>
4244
+ <xsl:otherwise>
4245
+ <xsl:apply-templates/>
4246
+ </xsl:otherwise>
4247
+ </xsl:choose>
4533
4248
 
4534
- </fo:block>
4249
+ </fo:block>
4535
4250
 
4536
- <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
4537
- <xsl:if test="$continued = 'true'">
4251
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
4252
+ <xsl:if test="$continued = 'true'">
4538
4253
 
4539
- <!-- to prevent the error 'THead element may contain only TR elements' -->
4254
+ <!-- to prevent the error 'THead element may contain only TR elements' -->
4540
4255
 
4541
- <xsl:choose>
4542
- <xsl:when test="string(number($cols-count)) != 'NaN'">
4543
- <fo:table width="100%" table-layout="fixed" role="SKIP">
4544
- <fo:table-body role="SKIP">
4545
- <fo:table-row>
4546
- <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
4547
- <fo:block text-align="right" role="SKIP">
4548
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
4549
- </fo:block>
4550
- </fo:table-cell>
4551
- </fo:table-row>
4552
- </fo:table-body>
4553
- </fo:table>
4554
- </xsl:when>
4555
- <xsl:otherwise>
4556
- <fo:block text-align="right">
4557
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
4558
- </fo:block>
4559
- </xsl:otherwise>
4560
- </xsl:choose>
4256
+ <xsl:choose>
4257
+ <xsl:when test="string(number($cols-count)) != 'NaN'">
4258
+ <fo:table width="100%" table-layout="fixed" role="SKIP">
4259
+ <fo:table-body role="SKIP">
4260
+ <fo:table-row>
4261
+ <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
4262
+ <fo:block text-align="right" role="SKIP">
4263
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
4264
+ </fo:block>
4265
+ </fo:table-cell>
4266
+ </fo:table-row>
4267
+ </fo:table-body>
4268
+ </fo:table>
4269
+ </xsl:when>
4270
+ <xsl:otherwise>
4271
+ <fo:block text-align="right">
4272
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
4273
+ </fo:block>
4274
+ </xsl:otherwise>
4275
+ </xsl:choose>
4561
4276
 
4562
- </xsl:if>
4563
- <!-- </xsl:if> -->
4277
+ </xsl:if>
4278
+ <!-- </xsl:if> -->
4564
4279
 
4565
4280
  </xsl:if>
4566
4281
  </xsl:template> <!-- table/name -->
@@ -4935,11 +4650,9 @@
4935
4650
  <xsl:template match="*[local-name()='thead']">
4936
4651
  <xsl:param name="cols-count"/>
4937
4652
  <fo:table-header>
4938
-
4939
- <xsl:call-template name="table-header-title">
4940
- <xsl:with-param name="cols-count" select="$cols-count"/>
4941
- </xsl:call-template>
4942
-
4653
+ <xsl:call-template name="table-header-title">
4654
+ <xsl:with-param name="cols-count" select="$cols-count"/>
4655
+ </xsl:call-template>
4943
4656
  <xsl:apply-templates/>
4944
4657
  </fo:table-header>
4945
4658
  </xsl:template> <!-- thead -->
@@ -4953,30 +4666,28 @@
4953
4666
 
4954
4667
  <xsl:call-template name="refine_table-header-title-style"/>
4955
4668
 
4956
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
4957
- <xsl:with-param name="continued">true</xsl:with-param>
4958
- <xsl:with-param name="cols-count" select="$cols-count"/>
4959
- </xsl:apply-templates>
4960
-
4961
- <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
4962
- <fo:block role="SKIP"/>
4963
- </xsl:if>
4669
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
4670
+ <xsl:with-param name="continued">true</xsl:with-param>
4671
+ <xsl:with-param name="cols-count" select="$cols-count"/>
4672
+ </xsl:apply-templates>
4964
4673
 
4965
- <xsl:for-each select="ancestor::*[local-name()='table'][1]">
4966
- <xsl:call-template name="table_name_fn_display"/>
4967
- </xsl:for-each>
4674
+ <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
4675
+ <fo:block role="SKIP"/>
4676
+ </xsl:if>
4677
+ <xsl:for-each select="ancestor::*[local-name()='table'][1]">
4678
+ <xsl:call-template name="table_name_fn_display"/>
4679
+ </xsl:for-each>
4968
4680
 
4969
- <fo:block text-align="right" font-style="italic" role="SKIP">
4970
- <xsl:text> </xsl:text>
4971
- <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
4972
- </fo:block>
4681
+ <fo:block text-align="right" font-style="italic" role="SKIP">
4682
+ <xsl:text> </xsl:text>
4683
+ <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
4684
+ </fo:block>
4973
4685
 
4974
4686
  </fo:table-cell>
4975
4687
  </fo:table-row>
4976
4688
  </xsl:template> <!-- table-header-title -->
4977
4689
 
4978
4690
  <xsl:template name="refine_table-header-title-style">
4979
-
4980
4691
  </xsl:template> <!-- refine_table-header-title-style -->
4981
4692
 
4982
4693
  <xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -5006,7 +4717,6 @@
5006
4717
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
5007
4718
 
5008
4719
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
5009
-
5010
4720
  </xsl:variable>
5011
4721
 
5012
4722
  <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
@@ -5068,26 +4778,19 @@
5068
4778
  <xsl:call-template name="setBordersTableArray"/>
5069
4779
 
5070
4780
  <!-- fn will be processed inside 'note' processing -->
5071
-
5072
- <!-- for BSI (not PAS) display Notes before footnotes -->
5073
-
5074
- <!-- except gb and bsi -->
5075
-
5076
- <xsl:apply-templates select="../*[local-name()='p']"/>
5077
- <xsl:apply-templates select="../*[local-name()='dl']"/>
5078
- <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
5079
- <xsl:apply-templates select="../*[local-name()='example']"/>
5080
- <xsl:apply-templates select="../*[local-name()='source']"/>
4781
+ <xsl:apply-templates select="../*[local-name()='p']"/>
4782
+ <xsl:apply-templates select="../*[local-name()='dl']"/>
4783
+ <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
4784
+ <xsl:apply-templates select="../*[local-name()='example']"/>
4785
+ <xsl:apply-templates select="../*[local-name()='source']"/>
5081
4786
 
5082
4787
  <xsl:variable name="isDisplayRowSeparator">
5083
-
5084
4788
  </xsl:variable>
5085
4789
 
5086
4790
  <!-- horizontal row separator -->
5087
4791
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
5088
4792
  <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
5089
4793
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
5090
-
5091
4794
  <xsl:call-template name="setBordersTableArray"/>
5092
4795
  <fo:block font-size="1pt"> </fo:block>
5093
4796
  </fo:block-container>
@@ -5095,11 +4798,8 @@
5095
4798
  </xsl:if>
5096
4799
 
5097
4800
  <!-- fn processing -->
5098
-
5099
- <!-- <xsl:call-template name="table_fn_display" /> -->
5100
- <xsl:copy-of select="$table_fn_block"/>
5101
-
5102
- <!-- for PAS display Notes after footnotes -->
4801
+ <!-- <xsl:call-template name="table_fn_display" /> -->
4802
+ <xsl:copy-of select="$table_fn_block"/>
5103
4803
 
5104
4804
  </fo:table-cell>
5105
4805
  </fo:table-row>
@@ -5131,18 +4831,15 @@
5131
4831
  </xsl:otherwise>
5132
4832
  </xsl:choose>
5133
4833
  </xsl:variable>
5134
-
5135
- <!-- if there isn't 'thead' and there is a table's title -->
5136
- <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='thead']) and ancestor::*[local-name()='table']/*[local-name()='name']">
5137
- <fo:table-header>
5138
-
5139
- <xsl:attribute name="role">Caption</xsl:attribute>
5140
-
5141
- <xsl:call-template name="table-header-title">
5142
- <xsl:with-param name="cols-count" select="$cols-count"/>
5143
- </xsl:call-template>
5144
- </fo:table-header>
5145
- </xsl:if>
4834
+ <!-- if there isn't 'thead' and there is a table's title -->
4835
+ <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='thead']) and ancestor::*[local-name()='table']/*[local-name()='name']">
4836
+ <fo:table-header>
4837
+ <xsl:attribute name="role">Caption</xsl:attribute>
4838
+ <xsl:call-template name="table-header-title">
4839
+ <xsl:with-param name="cols-count" select="$cols-count"/>
4840
+ </xsl:call-template>
4841
+ </fo:table-header>
4842
+ </xsl:if>
5146
4843
 
5147
4844
  <xsl:apply-templates select="../*[local-name()='thead']">
5148
4845
  <xsl:with-param name="cols-count" select="$cols-count"/>
@@ -5153,39 +4850,34 @@
5153
4850
  </xsl:call-template>
5154
4851
 
5155
4852
  <fo:table-body>
4853
+ <xsl:variable name="title_continued_">
4854
+ <xsl:call-template name="getLocalizedString">
4855
+ <xsl:with-param name="key">continued</xsl:with-param>
4856
+ </xsl:call-template>
4857
+ </xsl:variable>
5156
4858
 
5157
- <xsl:variable name="title_continued_">
5158
- <xsl:call-template name="getLocalizedString">
5159
- <xsl:with-param name="key">continued</xsl:with-param>
5160
- </xsl:call-template>
5161
- </xsl:variable>
5162
-
5163
- <xsl:variable name="title_continued_in_parenthesis" select="concat('(',$title_continued_,')')"/>
5164
- <xsl:variable name="title_continued">
5165
- <xsl:value-of select="$title_continued_in_parenthesis"/>
5166
-
5167
- </xsl:variable>
5168
-
5169
- <xsl:variable name="title_start" select="ancestor::*[local-name()='table'][1]/*[local-name()='name']/node()[1][self::text()]"/>
5170
- <xsl:variable name="table_number" select="substring-before($title_start, '—')"/>
4859
+ <xsl:variable name="title_continued_in_parenthesis" select="concat('(',$title_continued_,')')"/>
4860
+ <xsl:variable name="title_continued"><xsl:value-of select="$title_continued_in_parenthesis"/>
4861
+ </xsl:variable>
5171
4862
 
5172
- <fo:table-row height="0" keep-with-next.within-page="always" role="SKIP">
5173
- <fo:table-cell role="SKIP">
4863
+ <xsl:variable name="title_start" select="ancestor::*[local-name()='table'][1]/*[local-name()='name']/node()[1][self::text()]"/>
4864
+ <xsl:variable name="table_number" select="substring-before($title_start, '—')"/>
5174
4865
 
5175
- <fo:marker marker-class-name="table_continued"/>
4866
+ <fo:table-row height="0" keep-with-next.within-page="always" role="SKIP">
4867
+ <fo:table-cell role="SKIP">
4868
+ <fo:marker marker-class-name="table_continued"/>
5176
4869
 
4870
+ <fo:block role="SKIP"/>
4871
+ </fo:table-cell>
4872
+ </fo:table-row>
4873
+ <fo:table-row height="0" keep-with-next.within-page="always" role="SKIP">
4874
+ <fo:table-cell role="SKIP">
4875
+ <fo:marker marker-class-name="table_continued">
4876
+ <xsl:value-of select="$title_continued"/>
4877
+ </fo:marker>
5177
4878
  <fo:block role="SKIP"/>
5178
- </fo:table-cell>
5179
- </fo:table-row>
5180
- <fo:table-row height="0" keep-with-next.within-page="always" role="SKIP">
5181
- <fo:table-cell role="SKIP">
5182
-
5183
- <fo:marker marker-class-name="table_continued">
5184
- <xsl:value-of select="$title_continued"/>
5185
- </fo:marker>
5186
- <fo:block role="SKIP"/>
5187
- </fo:table-cell>
5188
- </fo:table-row>
4879
+ </fo:table-cell>
4880
+ </fo:table-row>
5189
4881
 
5190
4882
  <xsl:apply-templates/>
5191
4883
 
@@ -5271,7 +4963,7 @@
5271
4963
  <xsl:with-param name="pText" select="$border_under_row_"/>
5272
4964
  </xsl:call-template>
5273
4965
  </xsl:variable>
5274
- <xsl:if test="xalan:nodeset($border_under_row)/item[. = normalize-space($row_num)]">
4966
+ <xsl:if test="xalan:nodeset($border_under_row)/mn:item[. = normalize-space($row_num)]">
5275
4967
  <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
5276
4968
  </xsl:if>
5277
4969
  </xsl:when>
@@ -5388,7 +5080,7 @@
5388
5080
  </xsl:variable>
5389
5081
  <xsl:variable name="quot">"</xsl:variable>
5390
5082
  <xsl:variable name="styles_">
5391
- <xsl:for-each select="xalan:nodeset($styles__)/item">
5083
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
5392
5084
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
5393
5085
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
5394
5086
  <xsl:if test="$key = 'color' or $key = 'background-color' or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
@@ -5438,9 +5130,7 @@
5438
5130
  <fo:block role="SKIP">
5439
5131
 
5440
5132
  <xsl:if test="$isGenerateTableIF = 'true'">
5441
-
5442
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
5443
-
5133
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
5444
5134
  </xsl:if>
5445
5135
 
5446
5136
  <xsl:apply-templates/>
@@ -5455,25 +5145,23 @@
5455
5145
 
5456
5146
  <!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
5457
5147
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name() = 'example']" priority="2">
5148
+ <xsl:call-template name="setNamedDestination"/>
5149
+ <fo:block xsl:use-attribute-sets="table-note-style">
5150
+ <xsl:copy-of select="@id"/>
5458
5151
 
5459
- <xsl:call-template name="setNamedDestination"/>
5460
- <fo:block xsl:use-attribute-sets="table-note-style">
5461
- <xsl:copy-of select="@id"/>
5462
-
5463
- <xsl:call-template name="refine_table-note-style"/>
5464
-
5465
- <!-- Table's note/example name (NOTE, for example) -->
5466
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
5152
+ <xsl:call-template name="refine_table-note-style"/>
5467
5153
 
5468
- <xsl:call-template name="refine_table-note-name-style"/>
5154
+ <!-- Table's note/example name (NOTE, for example) -->
5155
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
5469
5156
 
5470
- <xsl:apply-templates select="*[local-name() = 'name']"/>
5157
+ <xsl:call-template name="refine_table-note-name-style"/>
5471
5158
 
5472
- </fo:inline>
5159
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
5473
5160
 
5474
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5475
- </fo:block>
5161
+ </fo:inline>
5476
5162
 
5163
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5164
+ </fo:block>
5477
5165
  </xsl:template> <!-- table/note -->
5478
5166
 
5479
5167
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
@@ -5518,9 +5206,7 @@
5518
5206
  <xsl:variable name="current_fn_number" select="@reference"/>
5519
5207
 
5520
5208
  <xsl:variable name="current_fn_number_text">
5521
-
5522
- <xsl:value-of select="$current_fn_number"/>
5523
-
5209
+ <xsl:value-of select="$current_fn_number"/>
5524
5210
  </xsl:variable>
5525
5211
 
5526
5212
  <xsl:variable name="ref_id" select="@target"/>
@@ -5532,12 +5218,10 @@
5532
5218
  <xsl:choose>
5533
5219
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
5534
5220
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
5535
-
5536
5221
  </fn_styles>
5537
5222
  </xsl:when>
5538
5223
  <xsl:otherwise>
5539
5224
  <fn_styles xsl:use-attribute-sets="fn-num-style">
5540
-
5541
5225
  </fn_styles>
5542
5226
  </xsl:otherwise>
5543
5227
  </xsl:choose>
@@ -5555,7 +5239,6 @@
5555
5239
  <xsl:with-param name="element">
5556
5240
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
5557
5241
  <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
5558
-
5559
5242
  <xsl:copy-of select="$current_fn_number_text"/>
5560
5243
 
5561
5244
  </fo:inline>
@@ -5593,10 +5276,9 @@
5593
5276
  <here><xsl:copy-of select="$footnotes"/></here> -->
5594
5277
  <xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
5595
5278
  </xsl:variable>
5596
-
5597
- <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
5598
- <xsl:copy-of select="$fn_block"/>
5599
- </fo:block>
5279
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
5280
+ <xsl:copy-of select="$fn_block"/>
5281
+ </fo:block>
5600
5282
 
5601
5283
  </fo:block-container>
5602
5284
  </fo:footnote-body>
@@ -5673,21 +5355,20 @@
5673
5355
  <xsl:variable name="reference" select="@reference"/>
5674
5356
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
5675
5357
  <xsl:for-each select="..//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
5358
+ <fo:block xsl:use-attribute-sets="table-fn-style">
5359
+ <xsl:copy-of select="@id"/>
5360
+ <xsl:call-template name="refine_table-fn-style"/>
5676
5361
 
5677
- <fo:block xsl:use-attribute-sets="table-fn-style">
5678
- <xsl:copy-of select="@id"/>
5679
- <xsl:call-template name="refine_table-fn-style"/>
5680
-
5681
- <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
5682
- <xsl:with-param name="process">true</xsl:with-param>
5683
- </xsl:apply-templates>
5362
+ <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
5363
+ <xsl:with-param name="process">true</xsl:with-param>
5364
+ </xsl:apply-templates>
5684
5365
 
5685
- <fo:inline xsl:use-attribute-sets="table-fn-body-style">
5686
- <!-- <xsl:copy-of select="./node()"/> -->
5687
- <xsl:apply-templates/>
5688
- </fo:inline>
5366
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
5367
+ <!-- <xsl:copy-of select="./node()"/> -->
5368
+ <xsl:apply-templates/>
5369
+ </fo:inline>
5689
5370
 
5690
- </fo:block>
5371
+ </fo:block>
5691
5372
 
5692
5373
  <!-- </xsl:if> -->
5693
5374
  </xsl:for-each>
@@ -5740,7 +5421,6 @@
5740
5421
  <xsl:param name="process">false</xsl:param>
5741
5422
  <xsl:if test="$process = 'true'">
5742
5423
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
5743
-
5744
5424
  </xsl:if>
5745
5425
  </xsl:template>
5746
5426
 
@@ -5823,8 +5503,7 @@
5823
5503
 
5824
5504
  <xsl:if test="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
5825
5505
 
5826
- <xsl:variable name="key_iso">
5827
- true
5506
+ <xsl:variable name="key_iso">true
5828
5507
  </xsl:variable>
5829
5508
 
5830
5509
  <fo:block>
@@ -5870,7 +5549,6 @@
5870
5549
  <fo:table width="95%" table-layout="fixed">
5871
5550
  <xsl:if test="normalize-space($key_iso) = 'true'">
5872
5551
  <xsl:attribute name="font-size">10pt</xsl:attribute>
5873
-
5874
5552
  </xsl:if>
5875
5553
  <xsl:choose>
5876
5554
  <!-- if there 'dl', then set same columns width -->
@@ -5894,23 +5572,19 @@
5894
5572
  <fo:table-row>
5895
5573
  <fo:table-cell>
5896
5574
  <fo:block>
5897
-
5898
- <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
5899
- <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
5900
- <!-- <xsl:value-of select="@reference"/> -->
5901
- <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
5902
- </fo:inline>
5575
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
5576
+ <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
5577
+ <!-- <xsl:value-of select="@reference"/> -->
5578
+ <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
5579
+ </fo:inline>
5903
5580
 
5904
5581
  </fo:block>
5905
5582
  </fo:table-cell>
5906
5583
  <fo:table-cell>
5907
5584
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
5908
5585
  <xsl:if test="normalize-space($key_iso) = 'true'">
5909
-
5910
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
5911
-
5586
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
5912
5587
  </xsl:if>
5913
-
5914
5588
  <!-- <xsl:copy-of select="./node()"/> -->
5915
5589
  <xsl:apply-templates/>
5916
5590
  </fo:block>
@@ -5959,12 +5633,10 @@
5959
5633
  <!-- figure's footnote label -->
5960
5634
  <!-- figure/dl[@key = 'true']/dt/p/sup -->
5961
5635
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'dl'][@key = 'true']/*[local-name() = 'dt']/ *[local-name() = 'p'][count(node()[normalize-space() != '']) = 1]/*[local-name() = 'sup']" priority="3">
5962
- <xsl:variable name="key_iso">
5963
- true
5636
+ <xsl:variable name="key_iso">true
5964
5637
  </xsl:variable>
5965
5638
  <xsl:if test="normalize-space($key_iso) = 'true'">
5966
5639
  <xsl:attribute name="font-size">10pt</xsl:attribute>
5967
-
5968
5640
  </xsl:if>
5969
5641
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
5970
5642
  <!-- <xsl:value-of select="@reference"/> -->
@@ -6010,8 +5682,7 @@
6010
5682
  <xsl:text>※</xsl:text>
6011
5683
  </xsl:if> -->
6012
5684
  <!-- <xsl:value-of select="@reference"/> -->
6013
-
6014
- <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
5685
+ <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
6015
5686
 
6016
5687
  <!-- <xsl:if test="$namespace = 'bsi'">
6017
5688
  <xsl:text>)</xsl:text>
@@ -6083,10 +5754,9 @@
6083
5754
  </xsl:if>
6084
5755
 
6085
5756
  <xsl:call-template name="setBlockSpanAll"/>
6086
-
6087
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
6088
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
6089
- </xsl:if>
5757
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
5758
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
5759
+ </xsl:if>
6090
5760
 
6091
5761
  <xsl:if test="ancestor::*[local-name() = 'sourcecode']">
6092
5762
  <!-- set font-size as sourcecode font-size -->
@@ -6107,7 +5777,6 @@
6107
5777
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
6108
5778
  </xsl:choose>
6109
5779
  </xsl:attribute>
6110
-
6111
5780
  </xsl:if>
6112
5781
 
6113
5782
  <xsl:call-template name="setTrackChangesStyles">
@@ -6116,41 +5785,34 @@
6116
5785
  </xsl:call-template>
6117
5786
 
6118
5787
  <fo:block-container margin-left="0mm" role="SKIP">
6119
-
6120
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
5788
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
6121
5789
 
6122
5790
  <xsl:variable name="parent" select="local-name(..)"/>
6123
5791
 
6124
5792
  <xsl:variable name="key_iso">
6125
-
6126
- <xsl:if test="$parent = 'figure' or $parent = 'formula' or ../@key = 'true'">true</xsl:if>
6127
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
5793
+ <xsl:if test="$parent = 'figure' or $parent = 'formula' or ../@key = 'true'">true</xsl:if> <!-- and (not(../@class) or ../@class !='pseudocode') -->
6128
5794
  </xsl:variable>
6129
5795
 
6130
5796
  <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(*[local-name()='dt']) = 1)"/>
6131
5797
 
6132
5798
  <xsl:choose>
6133
5799
  <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
6134
-
6135
- <fo:block margin-bottom="12pt" text-align="left">
6136
-
6137
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
6138
-
6139
- <!-- <xsl:variable name="title-where">
5800
+ <fo:block margin-bottom="12pt" text-align="left">
5801
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
5802
+ <!-- <xsl:variable name="title-where">
6140
5803
  <xsl:call-template name="getLocalizedString">
6141
5804
  <xsl:with-param name="key">where</xsl:with-param>
6142
5805
  </xsl:call-template>
6143
5806
  </xsl:variable>
6144
5807
  <xsl:value-of select="$title-where"/> -->
6145
- <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
6146
- <xsl:text> </xsl:text>
6147
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
6148
- <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
6149
- <xsl:text> </xsl:text>
6150
- </xsl:if>
6151
- <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
6152
- </fo:block>
6153
-
5808
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
5809
+ <xsl:text> </xsl:text>
5810
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
5811
+ <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
5812
+ <xsl:text> </xsl:text>
5813
+ </xsl:if>
5814
+ <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
5815
+ </fo:block>
6154
5816
  </xsl:when> <!-- END: only one component -->
6155
5817
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
6156
5818
  <fo:block margin-bottom="12pt" text-align="left">
@@ -6170,19 +5832,17 @@
6170
5832
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
6171
5833
  <!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
6172
5834
  <xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
5835
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
6173
5836
 
6174
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
6175
-
6176
- <xsl:call-template name="refine_figure_key_style"/>
6177
-
6178
- <xsl:variable name="title-key">
6179
- <xsl:call-template name="getLocalizedString">
6180
- <xsl:with-param name="key">key</xsl:with-param>
6181
- </xsl:call-template>
6182
- </xsl:variable>
6183
- <xsl:value-of select="$title-key"/>
6184
- </fo:block>
5837
+ <xsl:call-template name="refine_figure_key_style"/>
6185
5838
 
5839
+ <xsl:variable name="title-key">
5840
+ <xsl:call-template name="getLocalizedString">
5841
+ <xsl:with-param name="key">key</xsl:with-param>
5842
+ </xsl:call-template>
5843
+ </xsl:variable>
5844
+ <xsl:value-of select="$title-key"/>
5845
+ </fo:block>
6186
5846
  </xsl:if>
6187
5847
  </xsl:when> <!-- END: definition list in a figure -->
6188
5848
  </xsl:choose>
@@ -6215,12 +5875,10 @@
6215
5875
  <xsl:if test="$isGenerateTableIF = 'true'">
6216
5876
  <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
6217
5877
  </xsl:if>
6218
-
6219
5878
  <xsl:choose>
6220
5879
  <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
6221
5880
  <xsl:when test="normalize-space($key_iso) = 'true'">
6222
5881
  <xsl:attribute name="font-size">10pt</xsl:attribute>
6223
-
6224
5882
  </xsl:when>
6225
5883
  </xsl:choose>
6226
5884
 
@@ -6325,17 +5983,15 @@
6325
5983
  <xsl:call-template name="getMaxLength_dt"/>
6326
5984
  </xsl:variable>
6327
5985
 
6328
- <xsl:variable name="isContainsKeepTogetherTag_">
6329
- false
5986
+ <xsl:variable name="isContainsKeepTogetherTag_">false
6330
5987
  </xsl:variable>
6331
5988
  <xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
6332
5989
  <!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
6333
-
6334
- <xsl:call-template name="setColumnWidth_dl">
6335
- <xsl:with-param name="colwidths" select="$colwidths"/>
6336
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
6337
- <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
6338
- </xsl:call-template>
5990
+ <xsl:call-template name="setColumnWidth_dl">
5991
+ <xsl:with-param name="colwidths" select="$colwidths"/>
5992
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
5993
+ <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
5994
+ </xsl:call-template>
6339
5995
 
6340
5996
  <fo:table-body>
6341
5997
 
@@ -6386,31 +6042,24 @@
6386
6042
  </xsl:template>
6387
6043
 
6388
6044
  <xsl:template name="refine_dl_formula_where_style">
6389
-
6390
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
6391
-
6045
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
6392
6046
  </xsl:template> <!-- refine_dl_formula_where_style -->
6393
6047
 
6394
6048
  <xsl:template name="refine_figure_key_style">
6395
-
6396
- <xsl:attribute name="font-size">10pt</xsl:attribute>
6397
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
6398
-
6049
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
6050
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
6399
6051
  </xsl:template> <!-- refine_figure_key_style -->
6400
6052
 
6401
6053
  <xsl:template name="refine_multicomponent_style">
6402
6054
  <xsl:variable name="parent" select="local-name(..)"/>
6403
-
6404
- <xsl:if test="$parent = 'formula'">
6405
- <xsl:attribute name="margin-left">4mm</xsl:attribute>
6406
- </xsl:if>
6407
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
6408
-
6055
+ <xsl:if test="$parent = 'formula'">
6056
+ <xsl:attribute name="margin-left">4mm</xsl:attribute>
6057
+ </xsl:if>
6058
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
6409
6059
  </xsl:template> <!-- refine_multicomponent_style -->
6410
6060
 
6411
6061
  <xsl:template name="refine_multicomponent_block_style">
6412
6062
  <xsl:variable name="parent" select="local-name(..)"/>
6413
-
6414
6063
  </xsl:template> <!-- refine_multicomponent_block_style -->
6415
6064
 
6416
6065
  <!-- ignore 'p' with 'where' in formula, before 'dl' -->
@@ -6597,14 +6246,11 @@
6597
6246
  <xsl:attribute name="id">
6598
6247
  <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
6599
6248
  </xsl:attribute>
6600
-
6601
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
6602
- <xsl:with-param name="process">true</xsl:with-param>
6603
- </xsl:apply-templates>
6604
-
6249
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
6250
+ <xsl:with-param name="process">true</xsl:with-param>
6251
+ </xsl:apply-templates>
6605
6252
  </td>
6606
6253
  </tr>
6607
-
6608
6254
  </xsl:template>
6609
6255
 
6610
6256
  <!-- Definition's term -->
@@ -6613,7 +6259,6 @@
6613
6259
  <xsl:param name="split_keep-within-line"/>
6614
6260
 
6615
6261
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
6616
-
6617
6262
  <xsl:call-template name="insert_dt_cell">
6618
6263
  <xsl:with-param name="key_iso" select="$key_iso"/>
6619
6264
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -6635,7 +6280,6 @@
6635
6280
  <!-- border is mandatory, to calculate real width -->
6636
6281
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
6637
6282
  <xsl:attribute name="text-align">left</xsl:attribute>
6638
-
6639
6283
  </xsl:if>
6640
6284
 
6641
6285
  <xsl:call-template name="refine_dt-cell-style"/>
@@ -6645,9 +6289,7 @@
6645
6289
 
6646
6290
  <xsl:choose>
6647
6291
  <xsl:when test="$isGenerateTableIF = 'true'">
6648
-
6649
- <xsl:copy-of select="@id"/>
6650
-
6292
+ <xsl:copy-of select="@id"/>
6651
6293
  </xsl:when>
6652
6294
  <xsl:otherwise>
6653
6295
  <xsl:copy-of select="@id"/>
@@ -6684,9 +6326,7 @@
6684
6326
  <fo:block role="SKIP">
6685
6327
 
6686
6328
  <xsl:if test="$isGenerateTableIF = 'true'">
6687
-
6688
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
6689
-
6329
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
6690
6330
  </xsl:if>
6691
6331
 
6692
6332
  <xsl:choose>
@@ -6834,7 +6474,6 @@
6834
6474
  </xsl:template>
6835
6475
 
6836
6476
  <xsl:template name="refine_italic_style">
6837
-
6838
6477
  </xsl:template>
6839
6478
 
6840
6479
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
@@ -6850,7 +6489,6 @@
6850
6489
  </xsl:template>
6851
6490
 
6852
6491
  <xsl:template name="refine_strong_style">
6853
-
6854
6492
  <xsl:if test="ancestor::*['preferred']">
6855
6493
  <xsl:attribute name="role">SKIP</xsl:attribute>
6856
6494
  </xsl:if>
@@ -6875,13 +6513,7 @@
6875
6513
  <xsl:template match="*[local-name()='tt']">
6876
6514
  <fo:inline xsl:use-attribute-sets="tt-style">
6877
6515
 
6878
- <xsl:variable name="_font-size">
6879
-
6880
- <!-- inherit -->
6881
-
6882
- 10
6883
-
6884
-
6516
+ <xsl:variable name="_font-size"> <!-- inherit -->10
6885
6517
  </xsl:variable>
6886
6518
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
6887
6519
  <xsl:if test="$font-size != ''">
@@ -7097,8 +6729,7 @@
7097
6729
  </xsl:otherwise>
7098
6730
  </xsl:choose>
7099
6731
  </xsl:variable>
7100
- <xsl:variable name="ratio_">
7101
- 0.75
6732
+ <xsl:variable name="ratio_">0.75
7102
6733
  </xsl:variable>
7103
6734
  <xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
7104
6735
  <fo:inline font-size="{$ratio * 100}%" role="SKIP">
@@ -7188,7 +6819,7 @@
7188
6819
 
7189
6820
  <xsl:variable name="quot">"</xsl:variable>
7190
6821
  <xsl:variable name="styles_">
7191
- <xsl:for-each select="xalan:nodeset($styles__)/item">
6822
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
7192
6823
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
7193
6824
  <xsl:variable name="value_" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
7194
6825
  <xsl:variable name="value">
@@ -7200,7 +6831,7 @@
7200
6831
  </xsl:otherwise>
7201
6832
  </xsl:choose>
7202
6833
  </xsl:variable>
7203
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
6834
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
7204
6835
  <style name="{$key}"><xsl:value-of select="$value"/></style>
7205
6836
  </xsl:if>
7206
6837
  <xsl:if test="$key = 'text-indent'">
@@ -7214,7 +6845,6 @@
7214
6845
  <fo:inline>
7215
6846
  <xsl:for-each select="$styles/style">
7216
6847
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
7217
-
7218
6848
  </xsl:for-each>
7219
6849
  <xsl:apply-templates/>
7220
6850
  </fo:inline>
@@ -8201,10 +7831,9 @@
8201
7831
  <xsl:variable name="mathml_content">
8202
7832
  <xsl:apply-templates select="." mode="mathml_actual_text"/>
8203
7833
  </xsl:variable>
8204
-
8205
- <xsl:call-template name="mathml_instream_object">
8206
- <xsl:with-param name="mathml_content" select="$mathml_content"/>
8207
- </xsl:call-template>
7834
+ <xsl:call-template name="mathml_instream_object">
7835
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
7836
+ </xsl:call-template>
8208
7837
 
8209
7838
  </fo:inline>
8210
7839
  </xsl:template>
@@ -8238,7 +7867,6 @@
8238
7867
  <xsl:template name="getMathml_asciimath_text">
8239
7868
  <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
8240
7869
  <xsl:variable name="latexmath">
8241
-
8242
7870
  </xsl:variable>
8243
7871
  <xsl:variable name="asciimath_text_following">
8244
7872
  <xsl:choose>
@@ -8311,14 +7939,12 @@
8311
7939
  </xsl:template>
8312
7940
 
8313
7941
  <xsl:template name="refine_mathml_insteam_object_style">
8314
-
8315
- <xsl:if test="local-name(../..) = 'formula' or (local-name(../..) = 'td' and count(../../*) = 1)">
8316
- <xsl:attribute name="width">95%</xsl:attribute>
8317
- <xsl:attribute name="content-height">100%</xsl:attribute>
8318
- <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8319
- <xsl:attribute name="scaling">uniform</xsl:attribute>
8320
- </xsl:if>
8321
-
7942
+ <xsl:if test="local-name(../..) = 'formula' or (local-name(../..) = 'td' and count(../../*) = 1)">
7943
+ <xsl:attribute name="width">95%</xsl:attribute>
7944
+ <xsl:attribute name="content-height">100%</xsl:attribute>
7945
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7946
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
7947
+ </xsl:if>
8322
7948
  </xsl:template> <!-- refine_mathml_insteam_object_style -->
8323
7949
 
8324
7950
  <xsl:template match="mathml:*" mode="mathml_actual_text">
@@ -8716,7 +8342,6 @@
8716
8342
  <xsl:variable name="annotation-id" select="@id"/>
8717
8343
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
8718
8344
  <fo:block id="{$annotation-id}" white-space="nowrap">
8719
-
8720
8345
  <fo:inline>
8721
8346
  <xsl:apply-templates>
8722
8347
  <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
@@ -8745,7 +8370,6 @@
8745
8370
  <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
8746
8371
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
8747
8372
  </xsl:if>
8748
-
8749
8373
  <xsl:if test="parent::*[local-name() = 'add']">
8750
8374
  <xsl:call-template name="append_add-style"/>
8751
8375
  </xsl:if>
@@ -8756,8 +8380,7 @@
8756
8380
  </xsl:template>
8757
8381
 
8758
8382
  <!-- command between two xref points to non-standard bibitem -->
8759
- <xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]">
8760
- <xsl:value-of select="."/>
8383
+ <xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]"><xsl:value-of select="."/>
8761
8384
  </xsl:template>
8762
8385
 
8763
8386
  <!-- ====== -->
@@ -8772,7 +8395,6 @@
8772
8395
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
8773
8396
  </xsl:choose>
8774
8397
  </xsl:attribute>
8775
-
8776
8398
  </xsl:if>
8777
8399
  <fo:block-container margin-left="0mm" role="SKIP">
8778
8400
  <xsl:call-template name="setNamedDestination"/>
@@ -8862,53 +8484,49 @@
8862
8484
 
8863
8485
  <xsl:template match="*[local-name() = 'note']" name="note">
8864
8486
 
8865
- <xsl:call-template name="setNamedDestination"/>
8866
-
8867
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8868
-
8869
- <xsl:call-template name="setBlockSpanAll"/>
8870
-
8871
- <xsl:call-template name="refine_note-style"/>
8487
+ <xsl:call-template name="setNamedDestination"/>
8872
8488
 
8873
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8489
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8874
8490
 
8875
- <fo:block>
8491
+ <xsl:call-template name="setBlockSpanAll"/>
8876
8492
 
8877
- <xsl:call-template name="refine_note_block_style"/>
8493
+ <xsl:call-template name="refine_note-style"/>
8878
8494
 
8879
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8495
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8496
+ <fo:block>
8880
8497
 
8881
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
8498
+ <xsl:call-template name="refine_note_block_style"/>
8882
8499
 
8883
- <xsl:call-template name="refine_note-name-style"/>
8500
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8884
8501
 
8885
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8886
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8887
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8888
- <xsl:call-template name="append_add-style"/>
8889
- </xsl:if>
8502
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
8890
8503
 
8891
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8892
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8893
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8894
- <xsl:with-param name="skip">false</xsl:with-param>
8895
- </xsl:apply-templates>
8896
- </xsl:if>
8504
+ <xsl:call-template name="refine_note-name-style"/>
8897
8505
 
8898
- <xsl:apply-templates select="*[local-name() = 'name']"/>
8506
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8507
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8508
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8509
+ <xsl:call-template name="append_add-style"/>
8510
+ </xsl:if>
8899
8511
 
8900
- </fo:inline>
8512
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8513
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8514
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8515
+ <xsl:with-param name="skip">false</xsl:with-param>
8516
+ </xsl:apply-templates>
8517
+ </xsl:if>
8901
8518
 
8902
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8903
- </fo:block>
8519
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8904
8520
 
8905
- </fo:block-container>
8906
- </fo:block-container>
8521
+ </fo:inline>
8907
8522
 
8523
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8524
+ </fo:block>
8525
+ </fo:block-container>
8526
+ </fo:block-container>
8908
8527
  </xsl:template>
8909
8528
 
8910
8529
  <xsl:template name="refine_note_block_style">
8911
-
8912
8530
  </xsl:template> <!-- refine_note_block_style -->
8913
8531
 
8914
8532
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
@@ -8961,7 +8579,6 @@
8961
8579
  <xsl:value-of select="$sfx"/>
8962
8580
  </xsl:when>
8963
8581
  <xsl:otherwise>
8964
-
8965
8582
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
8966
8583
  <!-- <xsl:if test="$namespace = 'ieee'">
8967
8584
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -8969,7 +8586,6 @@
8969
8586
  <!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
8970
8587
  <xsl:text>:</xsl:text>
8971
8588
  </xsl:if> -->
8972
-
8973
8589
  <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
8974
8590
  <xsl:text> – </xsl:text> en dash &#x2013;
8975
8591
  </xsl:if> -->
@@ -8990,7 +8606,6 @@
8990
8606
  <xsl:value-of select="$sfx"/>
8991
8607
  </xsl:when>
8992
8608
  <xsl:otherwise>
8993
-
8994
8609
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
8995
8610
  <!-- <xsl:if test="$namespace = 'ieee'">
8996
8611
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -9046,7 +8661,6 @@
9046
8661
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
9047
8662
 
9048
8663
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
9049
-
9050
8664
  </xsl:if>
9051
8665
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9052
8666
  </fo:block>
@@ -9086,8 +8700,7 @@
9086
8700
  <!-- Example: Dimensions in millimeters -->
9087
8701
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
9088
8702
 
9089
- <xsl:variable name="show_figure_key_in_block_container">
9090
- true
8703
+ <xsl:variable name="show_figure_key_in_block_container">true
9091
8704
  </xsl:variable>
9092
8705
 
9093
8706
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
@@ -9102,11 +8715,9 @@
9102
8715
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
9103
8716
  <xsl:call-template name="showFigureKey"/>
9104
8717
  </xsl:if>
9105
-
9106
- <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
8718
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
9107
8719
 
9108
8720
  </fo:block-container>
9109
-
9110
8721
  </xsl:template>
9111
8722
 
9112
8723
  <xsl:template name="showFigureKey">
@@ -9144,13 +8755,12 @@
9144
8755
  <!-- SOURCE: ... -->
9145
8756
  <!-- figure/source -->
9146
8757
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
9147
-
9148
- <xsl:call-template name="termsource"/>
9149
-
8758
+ <xsl:call-template name="termsource"/>
9150
8759
  </xsl:template>
9151
8760
 
9152
8761
  <xsl:template match="*[local-name() = 'image']">
9153
8762
  <xsl:param name="indent">0</xsl:param>
8763
+ <xsl:param name="logo_width"/>
9154
8764
  <xsl:variable name="isAdded" select="../@added"/>
9155
8765
  <xsl:variable name="isDeleted" select="../@deleted"/>
9156
8766
  <xsl:choose>
@@ -9172,9 +8782,18 @@
9172
8782
 
9173
8783
  <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
9174
8784
 
9175
- <!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
9176
8785
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
9177
8786
 
8787
+ <xsl:if test="parent::*[local-name() = 'logo']"> <!-- publisher's logo -->
8788
+ <xsl:attribute name="width">100%</xsl:attribute>
8789
+ <xsl:if test="normalize-space($logo_width) != ''">
8790
+ <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
8791
+ </xsl:if>
8792
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8793
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8794
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
8795
+ </xsl:if>
8796
+
9178
8797
  <xsl:variable name="width">
9179
8798
  <xsl:call-template name="setImageWidth"/>
9180
8799
  </xsl:variable>
@@ -9252,8 +8871,7 @@
9252
8871
  </xsl:call-template>
9253
8872
  </xsl:variable>
9254
8873
 
9255
- <xsl:variable name="scaleRatio">
9256
- 1
8874
+ <xsl:variable name="scaleRatio">1
9257
8875
  </xsl:variable>
9258
8876
 
9259
8877
  <xsl:if test="number($scale) &lt; 100">
@@ -9364,18 +8982,14 @@
9364
8982
  </xsl:variable>
9365
8983
 
9366
8984
  <xsl:variable name="image_width_effective">
9367
-
9368
- <xsl:value-of select="$width_effective - number($indent_left)"/>
9369
-
8985
+ <xsl:value-of select="$width_effective - number($indent_left)"/>
9370
8986
  </xsl:variable>
9371
8987
  <xsl:variable name="image_height_effective" select="$height_effective - number($indent_left)"/>
9372
8988
  <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
9373
8989
  <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
9374
8990
  <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
9375
8991
  <xsl:variable name="scale">
9376
-
9377
- <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
9378
-
8992
+ <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
9379
8993
  </xsl:variable>
9380
8994
  <xsl:value-of select="$scale"/>
9381
8995
  </xsl:template>
@@ -9396,7 +9010,8 @@
9396
9010
  </xsl:when>
9397
9011
  <xsl:when test="not(starts-with(@src, 'data:'))">
9398
9012
  <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
9399
- <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
9013
+ <xsl:variable name="file_protocol"><xsl:if test="not(starts-with($src_external, 'http:')) and not(starts-with($src_external, 'https:')) and not(starts-with($src_external, 'www.'))">file:///</xsl:if></xsl:variable>
9014
+ <xsl:value-of select="concat('url(', $file_protocol, $src_external, ')')"/>
9400
9015
  </xsl:when>
9401
9016
  <xsl:otherwise>
9402
9017
  <xsl:value-of select="@src"/>
@@ -9692,8 +9307,8 @@
9692
9307
  </xsl:call-template>
9693
9308
  </xsl:variable>
9694
9309
  <xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
9695
- <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
9696
- <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
9310
+ <xsl:variable name="width" select="normalize-space($viewbox//mn:item[3])"/>
9311
+ <xsl:variable name="height" select="normalize-space($viewbox//mn:item[4])"/>
9697
9312
 
9698
9313
  <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
9699
9314
  <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
@@ -9765,8 +9380,8 @@
9765
9380
  </xsl:variable>
9766
9381
  <xsl:variable name="components" select="xalan:nodeset($components_)"/>
9767
9382
  <xsl:variable name="att_name" select="local-name()"/>
9768
- <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
9769
- <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
9383
+ <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/mn:item[1], ',', $components/mn:item[2], ',', $components/mn:item[3], ')')"/></xsl:attribute>
9384
+ <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/mn:item[4]"/></xsl:attribute>
9770
9385
  </xsl:template>
9771
9386
 
9772
9387
  <!-- ============== -->
@@ -9839,13 +9454,13 @@
9839
9454
  </xsl:call-template>
9840
9455
  </xsl:variable>
9841
9456
  <xsl:variable name="x_coords">
9842
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
9457
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 1]">
9843
9458
  <xsl:sort select="." data-type="number"/>
9844
9459
  <x><xsl:value-of select="."/></x>
9845
9460
  </xsl:for-each>
9846
9461
  </xsl:variable>
9847
9462
  <xsl:variable name="y_coords">
9848
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
9463
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 0]">
9849
9464
  <xsl:sort select="." data-type="number"/>
9850
9465
  <y><xsl:value-of select="."/></y>
9851
9466
  </xsl:for-each>
@@ -10050,11 +9665,11 @@
10050
9665
  <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
10051
9666
  </xsl:variable>
10052
9667
 
10053
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
10054
- <title>
9668
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
9669
+ <mn:title>
10055
9670
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
10056
- </title>
10057
- </item>
9671
+ </mn:title>
9672
+ </mn:item>
10058
9673
  </xsl:if>
10059
9674
  </xsl:template>
10060
9675
 
@@ -10125,12 +9740,12 @@
10125
9740
  <xsl:param name="contents"/>
10126
9741
  <xsl:param name="contents_addon"/>
10127
9742
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
10128
- <xsl:if test="$contents_nodes//item">
9743
+ <xsl:if test="$contents_nodes//mn:item">
10129
9744
  <fo:bookmark-tree>
10130
9745
  <xsl:choose>
10131
- <xsl:when test="$contents_nodes/doc">
9746
+ <xsl:when test="$contents_nodes/mn:doc">
10132
9747
  <xsl:choose>
10133
- <xsl:when test="count($contents_nodes/doc) &gt; 1">
9748
+ <xsl:when test="count($contents_nodes/mn:doc) &gt; 1">
10134
9749
 
10135
9750
  <xsl:if test="$contents_nodes/collection">
10136
9751
  <fo:bookmark internal-destination="{$contents/collection/@firstpage_id}">
@@ -10138,8 +9753,8 @@
10138
9753
  </fo:bookmark>
10139
9754
  </xsl:if>
10140
9755
 
10141
- <xsl:for-each select="$contents_nodes/doc">
10142
- <fo:bookmark internal-destination="{contents/item[@display = 'true'][1]/@id}" starting-state="hide">
9756
+ <xsl:for-each select="$contents_nodes/mn:doc">
9757
+ <fo:bookmark internal-destination="{contents/mn:item[@display = 'true'][1]/@id}" starting-state="hide">
10143
9758
  <xsl:if test="@bundle = 'true'">
10144
9759
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
10145
9760
  </xsl:if>
@@ -10173,14 +9788,14 @@
10173
9788
  </xsl:choose>
10174
9789
  </fo:bookmark-title>
10175
9790
 
10176
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
9791
+ <xsl:apply-templates select="contents/mn:item" mode="bookmark"/>
10177
9792
 
10178
9793
  <xsl:call-template name="insertFigureBookmarks">
10179
- <xsl:with-param name="contents" select="contents"/>
9794
+ <xsl:with-param name="contents" select="mn:contents"/>
10180
9795
  </xsl:call-template>
10181
9796
 
10182
9797
  <xsl:call-template name="insertTableBookmarks">
10183
- <xsl:with-param name="contents" select="contents"/>
9798
+ <xsl:with-param name="contents" select="mn:contents"/>
10184
9799
  <xsl:with-param name="lang" select="@lang"/>
10185
9800
  </xsl:call-template>
10186
9801
 
@@ -10189,16 +9804,16 @@
10189
9804
  </xsl:for-each>
10190
9805
  </xsl:when>
10191
9806
  <xsl:otherwise>
10192
- <xsl:for-each select="$contents_nodes/doc">
9807
+ <xsl:for-each select="$contents_nodes/mn:doc">
10193
9808
 
10194
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
9809
+ <xsl:apply-templates select="mn:contents/mn:item" mode="bookmark"/>
10195
9810
 
10196
9811
  <xsl:call-template name="insertFigureBookmarks">
10197
- <xsl:with-param name="contents" select="contents"/>
9812
+ <xsl:with-param name="contents" select="mn:contents"/>
10198
9813
  </xsl:call-template>
10199
9814
 
10200
9815
  <xsl:call-template name="insertTableBookmarks">
10201
- <xsl:with-param name="contents" select="contents"/>
9816
+ <xsl:with-param name="contents" select="mn:contents"/>
10202
9817
  <xsl:with-param name="lang" select="@lang"/>
10203
9818
  </xsl:call-template>
10204
9819
 
@@ -10207,14 +9822,14 @@
10207
9822
  </xsl:choose>
10208
9823
  </xsl:when>
10209
9824
  <xsl:otherwise>
10210
- <xsl:apply-templates select="$contents_nodes/contents/item" mode="bookmark"/>
9825
+ <xsl:apply-templates select="$contents_nodes/mn:contents/mn:item" mode="bookmark"/>
10211
9826
 
10212
9827
  <xsl:call-template name="insertFigureBookmarks">
10213
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
9828
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
10214
9829
  </xsl:call-template>
10215
9830
 
10216
9831
  <xsl:call-template name="insertTableBookmarks">
10217
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
9832
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
10218
9833
  <xsl:with-param name="lang" select="@lang"/>
10219
9834
  </xsl:call-template>
10220
9835
 
@@ -10231,80 +9846,72 @@
10231
9846
  <xsl:template name="insertFigureBookmarks">
10232
9847
  <xsl:param name="contents"/>
10233
9848
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
10234
- <xsl:if test="$contents_nodes/figure">
10235
- <fo:bookmark internal-destination="{$contents_nodes/figure[1]/@id}" starting-state="hide">
9849
+ <xsl:if test="$contents_nodes/mn:figure">
9850
+ <fo:bookmark internal-destination="{$contents_nodes/mn:figure[1]/@id}" starting-state="hide">
10236
9851
  <fo:bookmark-title>Figures</fo:bookmark-title>
10237
- <xsl:for-each select="$contents_nodes/figure">
9852
+ <xsl:for-each select="$contents_nodes/mn:figure">
10238
9853
  <fo:bookmark internal-destination="{@id}">
10239
9854
  <fo:bookmark-title>
10240
- <xsl:value-of select="normalize-space(title)"/>
9855
+ <xsl:value-of select="normalize-space(mn:title)"/>
10241
9856
  </fo:bookmark-title>
10242
9857
  </fo:bookmark>
10243
9858
  </xsl:for-each>
10244
9859
  </fo:bookmark>
10245
9860
  </xsl:if>
9861
+ <xsl:if test="$contents_nodes//mn:figures/mn:figure">
9862
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
10246
9863
 
10247
- <xsl:if test="$contents_nodes//figures/figure">
10248
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
10249
-
10250
- <xsl:variable name="bookmark-title">
10251
-
10252
- <xsl:value-of select="$title-list-figures"/>
10253
-
10254
- </xsl:variable>
10255
- <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
10256
- <xsl:for-each select="$contents_nodes//figures/figure">
10257
- <fo:bookmark internal-destination="{@id}">
10258
- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
10259
- </fo:bookmark>
10260
- </xsl:for-each>
9864
+ <xsl:variable name="bookmark-title">
9865
+ <xsl:value-of select="$title-list-figures"/>
9866
+ </xsl:variable>
9867
+ <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
9868
+ <xsl:for-each select="$contents_nodes//mn:figures/mn:figure">
9869
+ <fo:bookmark internal-destination="{@id}">
9870
+ <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
10261
9871
  </fo:bookmark>
10262
- </xsl:if>
10263
-
9872
+ </xsl:for-each>
9873
+ </fo:bookmark>
9874
+ </xsl:if>
10264
9875
  </xsl:template> <!-- insertFigureBookmarks -->
10265
9876
 
10266
9877
  <xsl:template name="insertTableBookmarks">
10267
9878
  <xsl:param name="contents"/>
10268
9879
  <xsl:param name="lang"/>
10269
9880
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
10270
- <xsl:if test="$contents_nodes/table">
10271
- <fo:bookmark internal-destination="{$contents_nodes/table[1]/@id}" starting-state="hide">
9881
+ <xsl:if test="$contents_nodes/mn:table">
9882
+ <fo:bookmark internal-destination="{$contents_nodes/mn:table[1]/@id}" starting-state="hide">
10272
9883
  <fo:bookmark-title>
10273
9884
  <xsl:choose>
10274
9885
  <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
10275
9886
  <xsl:otherwise>Tables</xsl:otherwise>
10276
9887
  </xsl:choose>
10277
9888
  </fo:bookmark-title>
10278
- <xsl:for-each select="$contents_nodes/table">
9889
+ <xsl:for-each select="$contents_nodes/mn:table">
10279
9890
  <fo:bookmark internal-destination="{@id}">
10280
9891
  <fo:bookmark-title>
10281
- <xsl:value-of select="normalize-space(title)"/>
9892
+ <xsl:value-of select="normalize-space(mn:title)"/>
10282
9893
  </fo:bookmark-title>
10283
9894
  </fo:bookmark>
10284
9895
  </xsl:for-each>
10285
9896
  </fo:bookmark>
10286
9897
  </xsl:if>
9898
+ <xsl:if test="$contents_nodes//mn:tables/mn:table">
9899
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
10287
9900
 
10288
- <xsl:if test="$contents_nodes//tables/table">
10289
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
10290
-
10291
- <xsl:variable name="bookmark-title">
10292
-
10293
- <xsl:value-of select="$title-list-tables"/>
10294
-
10295
- </xsl:variable>
9901
+ <xsl:variable name="bookmark-title">
9902
+ <xsl:value-of select="$title-list-tables"/>
9903
+ </xsl:variable>
10296
9904
 
10297
- <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
9905
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
10298
9906
 
10299
- <xsl:for-each select="$contents_nodes//tables/table">
10300
- <fo:bookmark internal-destination="{@id}">
10301
- <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
10302
- <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
10303
- </fo:bookmark>
10304
- </xsl:for-each>
9907
+ <xsl:for-each select="$contents_nodes//mn:tables/mn:table">
9908
+ <fo:bookmark internal-destination="{@id}">
9909
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
9910
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
10305
9911
  </fo:bookmark>
10306
- </xsl:if>
10307
-
9912
+ </xsl:for-each>
9913
+ </fo:bookmark>
9914
+ </xsl:if>
10308
9915
  </xsl:template> <!-- insertTableBookmarks -->
10309
9916
  <!-- End Bookmarks -->
10310
9917
 
@@ -10334,17 +9941,15 @@
10334
9941
  <xsl:param name="title" select="''"/>
10335
9942
  <xsl:choose>
10336
9943
  <xsl:when test="$lang = 'en'">
10337
-
10338
9944
  </xsl:when>
10339
9945
  <xsl:when test="$lang = 'fr'">
10340
-
10341
9946
  </xsl:when>
10342
9947
  <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
10343
9948
  <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
10344
9949
  </xsl:choose>
10345
9950
  </xsl:template>
10346
9951
 
10347
- <xsl:template match="item" mode="bookmark">
9952
+ <xsl:template match="mn:item" mode="bookmark">
10348
9953
  <xsl:choose>
10349
9954
  <xsl:when test="@id != ''">
10350
9955
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
@@ -10354,7 +9959,7 @@
10354
9959
  <xsl:text> </xsl:text>
10355
9960
  </xsl:if>
10356
9961
  <xsl:variable name="title">
10357
- <xsl:for-each select="title/node()">
9962
+ <xsl:for-each select="mn:title/node()">
10358
9963
  <xsl:choose>
10359
9964
  <xsl:when test="local-name() = 'add' and starts-with(., $ace_tag)"><!-- skip --></xsl:when>
10360
9965
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
@@ -10372,7 +9977,7 @@
10372
9977
  </xsl:choose>
10373
9978
  </xsl:template>
10374
9979
 
10375
- <xsl:template match="title" mode="bookmark"/>
9980
+ <xsl:template match="mn:title" mode="bookmark"/>
10376
9981
  <xsl:template match="text()" mode="bookmark"/>
10377
9982
 
10378
9983
  <!-- figure/name -->
@@ -10601,9 +10206,9 @@
10601
10206
  <xsl:template match="text()" mode="contents_item">
10602
10207
  <xsl:variable name="text">
10603
10208
  <!-- to split by '_' and other chars -->
10604
- <text><xsl:call-template name="add-zero-spaces-java"/></text>
10209
+ <mn:text><xsl:call-template name="add-zero-spaces-java"/></mn:text>
10605
10210
  </xsl:variable>
10606
- <xsl:for-each select="xalan:nodeset($text)/text/text()">
10211
+ <xsl:for-each select="xalan:nodeset($text)/mn:text/text()">
10607
10212
  <xsl:call-template name="keep_together_standard_number"/>
10608
10213
  </xsl:for-each>
10609
10214
  </xsl:template>
@@ -10632,19 +10237,11 @@
10632
10237
  <xsl:attribute name="{@name}">
10633
10238
  <xsl:value-of select="@value"/>
10634
10239
  </xsl:attribute>
10635
- </xsl:template>
10636
-
10637
- <xsl:template name="get_sourcecode_attributes">
10638
- <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
10639
- <xsl:variable name="_font-size">
10640
-
10641
- <!-- inherit -->
10642
-
10643
- 9
10644
- <!-- <xsl:if test="$namespace = 'ieee'">
10645
- <xsl:if test="$current_template = 'standard'">8</xsl:if>
10646
- </xsl:if> -->
10240
+ </xsl:template>
10647
10241
 
10242
+ <xsl:template name="get_sourcecode_attributes">
10243
+ <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
10244
+ <xsl:variable name="_font-size"><!-- inherit -->9
10648
10245
  </xsl:variable>
10649
10246
 
10650
10247
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -10700,7 +10297,6 @@
10700
10297
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
10701
10298
  </xsl:choose>
10702
10299
  </xsl:attribute>
10703
-
10704
10300
  </xsl:if>
10705
10301
  <fo:block-container margin-left="0mm" role="SKIP">
10706
10302
 
@@ -10724,8 +10320,7 @@
10724
10320
  </fo:block>
10725
10321
 
10726
10322
  <xsl:apply-templates select="*[local-name() = 'dl']"/> <!-- Key table -->
10727
-
10728
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
10323
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
10729
10324
 
10730
10325
  </fo:block-container>
10731
10326
  </fo:block-container>
@@ -10902,25 +10497,6 @@
10902
10497
  </xsl:choose>
10903
10498
  </xsl:template>
10904
10499
 
10905
- <!-- insert 'char' between each character in the string -->
10906
- <xsl:template name="interspers">
10907
- <xsl:param name="str"/>
10908
- <xsl:param name="char" select="$zero_width_space"/>
10909
- <xsl:if test="$str != ''">
10910
- <xsl:value-of select="substring($str, 1, 1)"/>
10911
-
10912
- <xsl:variable name="next_char" select="substring($str, 2, 1)"/>
10913
- <xsl:if test="not(contains(concat(' -.:=_— ', $char), $next_char))">
10914
- <xsl:value-of select="$char"/>
10915
- </xsl:if>
10916
-
10917
- <xsl:call-template name="interspers">
10918
- <xsl:with-param name="str" select="substring($str, 2)"/>
10919
- <xsl:with-param name="char" select="$char"/>
10920
- </xsl:call-template>
10921
- </xsl:if>
10922
- </xsl:template>
10923
-
10924
10500
  <xsl:template name="interspers-java">
10925
10501
  <xsl:param name="str"/>
10926
10502
  <xsl:param name="char" select="$zero_width_space"/>
@@ -11017,7 +10593,7 @@
11017
10593
  </xsl:variable>
11018
10594
  <xsl:variable name="classes" select="xalan:nodeset($classes_)"/>
11019
10595
 
11020
- <xsl:for-each select="$classes/item">
10596
+ <xsl:for-each select="$classes/*[local-name() = 'item']">
11021
10597
  <xsl:variable name="class_name" select="."/>
11022
10598
  <xsl:for-each select="$syntax_highlight_styles/style[@class = $class_name]/@*[not(local-name() = 'class')]">
11023
10599
  <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
@@ -11100,12 +10676,9 @@
11100
10676
 
11101
10677
  <xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
11102
10678
  <xsl:if test="normalize-space() != ''">
11103
-
11104
- <fo:block xsl:use-attribute-sets="permission-name-style">
11105
- <xsl:apply-templates/>
11106
-
11107
- </fo:block>
11108
-
10679
+ <fo:block xsl:use-attribute-sets="permission-name-style">
10680
+ <xsl:apply-templates/>
10681
+ </fo:block>
11109
10682
  </xsl:if>
11110
10683
  </xsl:template>
11111
10684
 
@@ -11134,12 +10707,9 @@
11134
10707
  <xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
11135
10708
  <xsl:if test="normalize-space() != ''">
11136
10709
 
11137
- <fo:block xsl:use-attribute-sets="requirement-name-style">
11138
-
11139
- <xsl:apply-templates/>
11140
-
11141
- </fo:block>
11142
-
10710
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
10711
+ <xsl:apply-templates/>
10712
+ </fo:block>
11143
10713
  </xsl:if>
11144
10714
  </xsl:template>
11145
10715
 
@@ -11178,11 +10748,9 @@
11178
10748
  <xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
11179
10749
  <xsl:if test="normalize-space() != ''">
11180
10750
 
11181
- <fo:block xsl:use-attribute-sets="recommendation-name-style">
11182
- <xsl:apply-templates/>
11183
-
11184
- </fo:block>
11185
-
10751
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
10752
+ <xsl:apply-templates/>
10753
+ </fo:block>
11186
10754
  </xsl:if>
11187
10755
  </xsl:template>
11188
10756
 
@@ -11308,7 +10876,6 @@
11308
10876
 
11309
10877
  <xsl:if test="parent::*[local-name()='thead'] or starts-with(*[local-name()='td' or local-name()='th'][1], 'Requirement ') or starts-with(*[local-name()='td' or local-name()='th'][1], 'Recommendation ')">
11310
10878
  <xsl:attribute name="font-weight">bold</xsl:attribute>
11311
-
11312
10879
  </xsl:if>
11313
10880
 
11314
10881
  <xsl:apply-templates mode="requirement"/>
@@ -11353,7 +10920,6 @@
11353
10920
 
11354
10921
  <xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
11355
10922
  <fo:block font-size="11pt">
11356
-
11357
10923
  <xsl:apply-templates/>
11358
10924
  </fo:block>
11359
10925
  </xsl:template>
@@ -11393,7 +10959,6 @@
11393
10959
  <xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
11394
10960
  <xsl:variable name="element">inline
11395
10961
 
11396
-
11397
10962
  </xsl:variable>
11398
10963
  <xsl:choose>
11399
10964
  <xsl:when test="contains($element, 'block')">
@@ -11425,110 +10990,105 @@
11425
10990
  text line 2
11426
10991
  -->
11427
10992
  <xsl:template match="*[local-name() = 'example']" name="example">
10993
+ <xsl:call-template name="setNamedDestination"/>
10994
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
11428
10995
 
11429
- <xsl:call-template name="setNamedDestination"/>
11430
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
10996
+ <xsl:call-template name="setBlockSpanAll"/>
11431
10997
 
11432
- <xsl:call-template name="setBlockSpanAll"/>
10998
+ <xsl:call-template name="refine_example-style"/>
11433
10999
 
11434
- <xsl:call-template name="refine_example-style"/>
11000
+ <xsl:variable name="fo_element">
11001
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>inline
11002
+ </xsl:variable>
11435
11003
 
11436
- <xsl:variable name="fo_element">
11437
- <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
11438
- inline
11439
- </xsl:variable>
11004
+ <fo:block-container margin-left="0mm" role="SKIP">
11440
11005
 
11441
- <fo:block-container margin-left="0mm" role="SKIP">
11006
+ <xsl:choose>
11442
11007
 
11443
- <xsl:choose>
11008
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
11444
11009
 
11445
- <xsl:when test="contains(normalize-space($fo_element), 'block')">
11010
+ <!-- display name 'EXAMPLE' in a separate block -->
11011
+ <fo:block>
11012
+ <xsl:apply-templates select="*[local-name()='name']">
11013
+ <xsl:with-param name="fo_element" select="$fo_element"/>
11014
+ </xsl:apply-templates>
11015
+ </fo:block>
11446
11016
 
11447
- <!-- display name 'EXAMPLE' in a separate block -->
11448
- <fo:block>
11449
- <xsl:apply-templates select="*[local-name()='name']">
11017
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
11018
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11019
+ <xsl:variable name="example_body">
11020
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
11450
11021
  <xsl:with-param name="fo_element" select="$fo_element"/>
11451
11022
  </xsl:apply-templates>
11452
- </fo:block>
11453
-
11454
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
11455
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11456
- <xsl:variable name="example_body">
11457
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
11458
- <xsl:with-param name="fo_element" select="$fo_element"/>
11459
- </xsl:apply-templates>
11460
- </xsl:variable>
11461
- <xsl:choose>
11462
- <xsl:when test="xalan:nodeset($example_body)/*">
11463
- <xsl:copy-of select="$example_body"/>
11464
- </xsl:when>
11465
- <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
11466
- </xsl:choose>
11467
- </fo:block-container>
11468
- </fo:block-container>
11469
- </xsl:when> <!-- end block -->
11470
-
11471
- <xsl:when test="contains(normalize-space($fo_element), 'list')">
11472
-
11473
- <xsl:variable name="provisional_distance_between_starts_">
11474
- 7
11475
- </xsl:variable>
11476
- <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
11477
- <xsl:variable name="indent_">
11478
- 0
11479
11023
  </xsl:variable>
11480
- <xsl:variable name="indent" select="normalize-space($indent_)"/>
11481
-
11482
- <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
11483
- <fo:list-item>
11484
- <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
11485
- <fo:block>
11486
- <xsl:apply-templates select="*[local-name()='name']">
11487
- <xsl:with-param name="fo_element">block</xsl:with-param>
11488
- </xsl:apply-templates>
11489
- </fo:block>
11490
- </fo:list-item-label>
11491
- <fo:list-item-body start-indent="body-start()">
11492
- <fo:block>
11493
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
11494
- <xsl:with-param name="fo_element" select="$fo_element"/>
11495
- </xsl:apply-templates>
11496
- </fo:block>
11497
- </fo:list-item-body>
11498
- </fo:list-item>
11499
- </fo:list-block>
11500
- </xsl:when> <!-- end list -->
11024
+ <xsl:choose>
11025
+ <xsl:when test="xalan:nodeset($example_body)/*">
11026
+ <xsl:copy-of select="$example_body"/>
11027
+ </xsl:when>
11028
+ <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
11029
+ </xsl:choose>
11030
+ </fo:block-container>
11031
+ </fo:block-container>
11032
+ </xsl:when> <!-- end block -->
11501
11033
 
11502
- <xsl:otherwise> <!-- inline -->
11034
+ <xsl:when test="contains(normalize-space($fo_element), 'list')">
11503
11035
 
11504
- <!-- display 'EXAMPLE' and first element in the same line -->
11505
- <fo:block>
11506
- <xsl:apply-templates select="*[local-name()='name']">
11507
- <xsl:with-param name="fo_element" select="$fo_element"/>
11508
- </xsl:apply-templates>
11509
- <fo:inline>
11510
- <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
11036
+ <xsl:variable name="provisional_distance_between_starts_">7
11037
+ </xsl:variable>
11038
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
11039
+ <xsl:variable name="indent_">0
11040
+ </xsl:variable>
11041
+ <xsl:variable name="indent" select="normalize-space($indent_)"/>
11042
+
11043
+ <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
11044
+ <fo:list-item>
11045
+ <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
11046
+ <fo:block>
11047
+ <xsl:apply-templates select="*[local-name()='name']">
11048
+ <xsl:with-param name="fo_element">block</xsl:with-param>
11049
+ </xsl:apply-templates>
11050
+ </fo:block>
11051
+ </fo:list-item-label>
11052
+ <fo:list-item-body start-indent="body-start()">
11053
+ <fo:block>
11054
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
11511
11055
  <xsl:with-param name="fo_element" select="$fo_element"/>
11512
11056
  </xsl:apply-templates>
11513
- </fo:inline>
11514
- </fo:block>
11057
+ </fo:block>
11058
+ </fo:list-item-body>
11059
+ </fo:list-item>
11060
+ </fo:list-block>
11061
+ </xsl:when> <!-- end list -->
11515
11062
 
11516
- <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
11517
- <!-- display further elements in blocks -->
11518
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
11519
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11520
- <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
11521
- <xsl:with-param name="fo_element" select="'block'"/>
11522
- </xsl:apply-templates>
11523
- </fo:block-container>
11524
- </fo:block-container>
11525
- </xsl:if>
11526
- </xsl:otherwise> <!-- end inline -->
11063
+ <xsl:otherwise> <!-- inline -->
11527
11064
 
11528
- </xsl:choose>
11529
- </fo:block-container>
11530
- </fo:block-container>
11065
+ <!-- display 'EXAMPLE' and first element in the same line -->
11066
+ <fo:block>
11067
+ <xsl:apply-templates select="*[local-name()='name']">
11068
+ <xsl:with-param name="fo_element" select="$fo_element"/>
11069
+ </xsl:apply-templates>
11070
+ <fo:inline>
11071
+ <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
11072
+ <xsl:with-param name="fo_element" select="$fo_element"/>
11073
+ </xsl:apply-templates>
11074
+ </fo:inline>
11075
+ </fo:block>
11531
11076
 
11077
+ <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
11078
+ <!-- display further elements in blocks -->
11079
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
11080
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11081
+ <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
11082
+ <xsl:with-param name="fo_element" select="'block'"/>
11083
+ </xsl:apply-templates>
11084
+ </fo:block-container>
11085
+ </fo:block-container>
11086
+ </xsl:if>
11087
+ </xsl:otherwise> <!-- end inline -->
11088
+
11089
+ </xsl:choose>
11090
+ </fo:block-container>
11091
+ </fo:block-container>
11532
11092
  </xsl:template>
11533
11093
 
11534
11094
  <!-- example/name -->
@@ -11543,7 +11103,6 @@
11543
11103
  </xsl:when>
11544
11104
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
11545
11105
  <fo:block xsl:use-attribute-sets="example-name-style">
11546
-
11547
11106
  <xsl:apply-templates/>
11548
11107
  </fo:block>
11549
11108
  </xsl:when>
@@ -11560,7 +11119,6 @@
11560
11119
  <!-- table/example/name, table/tfoot//example/name -->
11561
11120
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'example']/*[local-name() = 'name']">
11562
11121
  <fo:inline xsl:use-attribute-sets="example-name-style">
11563
-
11564
11122
  <xsl:apply-templates/>
11565
11123
  </fo:inline>
11566
11124
  </xsl:template>
@@ -11570,12 +11128,10 @@
11570
11128
 
11571
11129
  <xsl:variable name="num"><xsl:number/></xsl:variable>
11572
11130
  <xsl:variable name="element">
11573
-
11574
- <xsl:choose>
11575
- <xsl:when test="$num = 1 and not(contains($fo_element, 'block'))">inline</xsl:when>
11576
- <xsl:otherwise>block</xsl:otherwise>
11577
- </xsl:choose>
11578
-
11131
+ <xsl:choose>
11132
+ <xsl:when test="$num = 1 and not(contains($fo_element, 'block'))">inline</xsl:when>
11133
+ <xsl:otherwise>block</xsl:otherwise>
11134
+ </xsl:choose>
11579
11135
  <xsl:value-of select="$fo_element"/>
11580
11136
  </xsl:variable>
11581
11137
  <xsl:choose>
@@ -11693,7 +11249,7 @@
11693
11249
  </xsl:call-template>
11694
11250
  </xsl:variable>
11695
11251
 
11696
- <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
11252
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
11697
11253
  <xsl:choose>
11698
11254
  <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
11699
11255
  <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
@@ -11730,11 +11286,9 @@
11730
11286
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
11731
11287
  </xsl:if>
11732
11288
  </xsl:if>
11733
-
11734
- <xsl:if test="not(*)">
11735
- <xsl:attribute name="space-after">12pt</xsl:attribute>
11736
- </xsl:if>
11737
-
11289
+ <xsl:if test="not(*)">
11290
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
11291
+ </xsl:if>
11738
11292
  <fo:block-container margin-left="0mm" role="SKIP">
11739
11293
  <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
11740
11294
 
@@ -11817,7 +11371,6 @@
11817
11371
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
11818
11372
  <xsl:attribute name="vertical-align">super</xsl:attribute>
11819
11373
  <xsl:attribute name="font-size">80%</xsl:attribute>
11820
-
11821
11374
  </xsl:if>
11822
11375
 
11823
11376
  <xsl:call-template name="refine_eref-style"/>
@@ -11866,7 +11419,6 @@
11866
11419
  </xsl:template>
11867
11420
 
11868
11421
  <xsl:template name="refine_basic_link_style">
11869
-
11870
11422
  </xsl:template> <!-- refine_basic_link_style -->
11871
11423
 
11872
11424
  <!-- ====== -->
@@ -11883,12 +11435,10 @@
11883
11435
  </xsl:variable>
11884
11436
 
11885
11437
  <xsl:variable name="padding">
11886
-
11887
- <xsl:choose>
11888
- <xsl:when test="$depth = 2">3</xsl:when>
11889
- <xsl:otherwise>4</xsl:otherwise>
11890
- </xsl:choose>
11891
-
11438
+ <xsl:choose>
11439
+ <xsl:when test="$depth = 2">3</xsl:when>
11440
+ <xsl:otherwise>4</xsl:otherwise>
11441
+ </xsl:choose>
11892
11442
  </xsl:variable>
11893
11443
 
11894
11444
  <xsl:variable name="padding-right">
@@ -11899,7 +11449,6 @@
11899
11449
  </xsl:otherwise>
11900
11450
  </xsl:choose>
11901
11451
  </xsl:variable>
11902
-
11903
11452
  <xsl:choose>
11904
11453
  <xsl:when test="$lang = 'zh'">
11905
11454
  <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -11923,9 +11472,7 @@
11923
11472
  <xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']/*[local-name() = 'tab']" priority="2"/>
11924
11473
 
11925
11474
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab">
11926
-
11927
- <xsl:attribute name="padding-right">6mm</xsl:attribute>
11928
-
11475
+ <xsl:attribute name="padding-right">6mm</xsl:attribute>
11929
11476
  </xsl:template>
11930
11477
 
11931
11478
  <xsl:template name="insertNonBreakSpaces">
@@ -11943,8 +11490,7 @@
11943
11490
  <xsl:variable name="level">
11944
11491
  <xsl:call-template name="getLevel"/>
11945
11492
  </xsl:variable>
11946
- <xsl:variable name="font-size">
11947
- inherit
11493
+ <xsl:variable name="font-size">inherit
11948
11494
  </xsl:variable>
11949
11495
  <xsl:variable name="levelTerm">
11950
11496
  <xsl:call-template name="getLevelTermName"/>
@@ -11996,11 +11542,9 @@
11996
11542
  </xsl:template>
11997
11543
 
11998
11544
  <xsl:template name="setStyle_preferred">
11999
-
12000
- <xsl:if test="*[local-name() = 'strong']">
12001
- <xsl:attribute name="font-weight">normal</xsl:attribute>
12002
- </xsl:if>
12003
-
11545
+ <xsl:if test="*[local-name() = 'strong']">
11546
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
11547
+ </xsl:if>
12004
11548
  </xsl:template>
12005
11549
 
12006
11550
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
@@ -12077,7 +11621,6 @@
12077
11621
 
12078
11622
  <!-- main sections -->
12079
11623
  <xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
12080
-
12081
11624
  <xsl:call-template name="setNamedDestination"/>
12082
11625
  <fo:block>
12083
11626
  <xsl:call-template name="setId"/>
@@ -12112,16 +11655,13 @@
12112
11655
  </xsl:template>
12113
11656
 
12114
11657
  <xsl:template name="sections_element_style">
12115
-
12116
- <xsl:variable name="pos"><xsl:number count="*"/></xsl:variable>
12117
- <xsl:if test="$pos &gt;= 2">
12118
- <xsl:attribute name="space-before">18pt</xsl:attribute>
12119
- </xsl:if>
12120
-
11658
+ <xsl:variable name="pos"><xsl:number count="*"/></xsl:variable>
11659
+ <xsl:if test="$pos &gt;= 2">
11660
+ <xsl:attribute name="space-before">18pt</xsl:attribute>
11661
+ </xsl:if>
12121
11662
  </xsl:template> <!-- sections_element_style -->
12122
11663
 
12123
11664
  <xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
12124
-
12125
11665
  <xsl:call-template name="setNamedDestination"/>
12126
11666
  <fo:block>
12127
11667
  <xsl:call-template name="setId"/>
@@ -12170,11 +11710,9 @@
12170
11710
  </xsl:template>
12171
11711
 
12172
11712
  <xsl:template name="refine_clause_style">
12173
-
12174
- <xsl:if test="@inline-header='true'">
12175
- <xsl:attribute name="text-align">justify</xsl:attribute>
12176
- </xsl:if>
12177
-
11713
+ <xsl:if test="@inline-header='true'">
11714
+ <xsl:attribute name="text-align">justify</xsl:attribute>
11715
+ </xsl:if>
12178
11716
  </xsl:template> <!-- refine_clause_style -->
12179
11717
 
12180
11718
  <xsl:template match="*[local-name() = 'definitions']">
@@ -12214,7 +11752,6 @@
12214
11752
  </xsl:template>
12215
11753
 
12216
11754
  <xsl:template name="refine_annex_style">
12217
-
12218
11755
  </xsl:template>
12219
11756
 
12220
11757
  <!-- document text (not figures, or tables) footnotes -->
@@ -12318,17 +11855,15 @@
12318
11855
  <!-- Lists processing -->
12319
11856
  <!-- ===================================== -->
12320
11857
  <xsl:variable name="ul_labels_">
12321
-
12322
- <label level="1">—</label> <!-- em dash -->
12323
- <label level="2">−</label><!-- minus sign -->
12324
- <label level="3" font-size="75%">o</label> <!-- white circle -->
11858
+ <label level="1">—</label> <!-- em dash -->
11859
+ <label level="2">−</label><!-- minus sign -->
11860
+ <label level="3" font-size="75%">o</label> <!-- white circle -->
12325
11861
 
12326
11862
  </xsl:variable>
12327
11863
  <xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
12328
11864
 
12329
11865
  <xsl:template name="setULLabel">
12330
- <xsl:variable name="list_level__">
12331
- <xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
11866
+ <xsl:variable name="list_level__"><xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
12332
11867
  </xsl:variable>
12333
11868
  <xsl:variable name="list_level_" select="number($list_level__)"/>
12334
11869
  <xsl:variable name="list_level">
@@ -12385,28 +11920,22 @@
12385
11920
  <xsl:variable name="label">
12386
11921
 
12387
11922
  <xsl:variable name="style_prefix_">
12388
- <xsl:if test="$type = 'roman'">
12389
- <!-- Example: (i) -->
11923
+ <xsl:if test="$type = 'roman'"> <!-- Example: (i) -->
12390
11924
  </xsl:if>
12391
11925
  <xsl:if test="$type = 'alphabet'">
12392
-
12393
11926
  </xsl:if>
12394
11927
  </xsl:variable>
12395
11928
  <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
12396
11929
 
12397
11930
  <xsl:variable name="style_suffix_">
12398
11931
  <xsl:choose>
12399
- <xsl:when test="$type = 'arabic'">
12400
- .
11932
+ <xsl:when test="$type = 'arabic'">.
12401
11933
  </xsl:when>
12402
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
12403
- )
11934
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">)
12404
11935
  </xsl:when>
12405
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
12406
- .
11936
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">.
12407
11937
  </xsl:when>
12408
- <xsl:when test="$type = 'roman'">
12409
- )
11938
+ <xsl:when test="$type = 'roman'">)
12410
11939
  </xsl:when>
12411
11940
  <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
12412
11941
  </xsl:choose>
@@ -12423,8 +11952,7 @@
12423
11952
  <xsl:value-of select="$style_suffix"/>
12424
11953
  </xsl:if>
12425
11954
  </xsl:variable>
12426
-
12427
- <xsl:value-of select="normalize-space($label)"/>
11955
+ <xsl:value-of select="normalize-space($label)"/>
12428
11956
 
12429
11957
  </xsl:when>
12430
11958
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
@@ -12481,17 +12009,13 @@
12481
12009
 
12482
12010
  <xsl:variable name="format">
12483
12011
  <xsl:choose>
12484
- <xsl:when test="$type = 'arabic'">
12485
- 1.
12012
+ <xsl:when test="$type = 'arabic'">1.
12486
12013
  </xsl:when>
12487
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
12488
- a)
12014
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">a)
12489
12015
  </xsl:when>
12490
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
12491
- A.
12016
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">A.
12492
12017
  </xsl:when>
12493
- <xsl:when test="$type = 'roman'">
12494
- i)
12018
+ <xsl:when test="$type = 'roman'">i)
12495
12019
  </xsl:when>
12496
12020
  <xsl:when test="$type = 'roman_upper'">I.</xsl:when>
12497
12021
  <xsl:otherwise>1.</xsl:otherwise> <!-- for any case, if $type has non-determined value, not using -->
@@ -12528,19 +12052,16 @@
12528
12052
  </fo:block-container>
12529
12053
  </xsl:when>
12530
12054
  <xsl:otherwise>
12531
-
12532
- <fo:block role="SKIP">
12533
- <xsl:apply-templates select="." mode="list">
12534
- <xsl:with-param name="indent" select="$indent"/>
12535
- </xsl:apply-templates>
12536
- </fo:block>
12537
-
12055
+ <fo:block role="SKIP">
12056
+ <xsl:apply-templates select="." mode="list">
12057
+ <xsl:with-param name="indent" select="$indent"/>
12058
+ </xsl:apply-templates>
12059
+ </fo:block>
12538
12060
  </xsl:otherwise>
12539
12061
  </xsl:choose>
12540
12062
  </xsl:template>
12541
12063
 
12542
12064
  <xsl:template name="refine_list_container_style">
12543
-
12544
12065
  </xsl:template> <!-- refine_list_container_style -->
12545
12066
 
12546
12067
  <xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
@@ -12604,7 +12125,6 @@
12604
12125
  </xsl:template>
12605
12126
 
12606
12127
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
12607
-
12608
12128
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
12609
12129
 
12610
12130
  <xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
@@ -12889,7 +12409,6 @@
12889
12409
  <xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
12890
12410
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
12891
12411
  <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
12892
-
12893
12412
  <xsl:apply-templates/>
12894
12413
  </fo:block>
12895
12414
  </xsl:template>
@@ -12941,7 +12460,6 @@
12941
12460
  <fo:table-column column-width="15mm"/>
12942
12461
  <fo:table-body>
12943
12462
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
12944
-
12945
12463
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
12946
12464
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
12947
12465
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
@@ -12977,7 +12495,6 @@
12977
12495
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
12978
12496
  <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
12979
12497
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
12980
-
12981
12498
  </xsl:template>
12982
12499
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
12983
12500
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
@@ -12988,16 +12505,13 @@
12988
12505
  <xsl:call-template name="setNamedDestination"/>
12989
12506
  <fo:block id="{@id}">
12990
12507
  <xsl:apply-templates/>
12991
-
12992
12508
  </fo:block>
12993
12509
  </xsl:template>
12994
12510
 
12995
12511
  <!-- Bibliography (non-normative references) -->
12996
12512
  <xsl:template match="*[local-name() = 'references']">
12997
12513
  <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
12998
-
12999
- <fo:block break-after="page"/>
13000
-
12514
+ <fo:block break-after="page"/>
13001
12515
  </xsl:if>
13002
12516
 
13003
12517
  <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
@@ -13013,9 +12527,7 @@
13013
12527
 
13014
12528
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
13015
12529
  <xsl:apply-templates select="node()[not(local-name() = 'title' and @columns = 1)]"/>
13016
-
13017
12530
  </fo:block>
13018
-
13019
12531
  </xsl:template> <!-- references -->
13020
12532
 
13021
12533
  <xsl:template match="*[local-name() = 'bibitem']">
@@ -13025,44 +12537,39 @@
13025
12537
  <!-- Normative references -->
13026
12538
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
13027
12539
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
13028
-
13029
- <xsl:call-template name="setNamedDestination"/>
13030
- <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
13031
-
13032
- <xsl:call-template name="processBibitem"/>
13033
- </fo:block>
12540
+ <xsl:call-template name="setNamedDestination"/>
12541
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
12542
+ <xsl:call-template name="processBibitem"/>
12543
+ </fo:block>
13034
12544
 
13035
12545
  </xsl:template> <!-- bibitem -->
13036
12546
 
13037
12547
  <!-- Bibliography (non-normative references) -->
13038
12548
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
13039
- <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
13040
- <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
12549
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
13041
12550
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
13042
- <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
13043
- <xsl:call-template name="setNamedDestination"/>
13044
- <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
13045
-
13046
- <fo:list-item>
13047
- <fo:list-item-label end-indent="label-end()">
13048
- <fo:block role="SKIP">
13049
- <fo:inline role="SKIP">
13050
-
13051
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
13052
- <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
13053
- </xsl:apply-templates>
13054
- </fo:inline>
13055
- </fo:block>
13056
- </fo:list-item-label>
13057
- <fo:list-item-body start-indent="body-start()">
13058
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
13059
- <xsl:call-template name="processBibitem">
13060
- <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
13061
- </xsl:call-template>
13062
- </fo:block>
13063
- </fo:list-item-body>
13064
- </fo:list-item>
13065
- </fo:list-block>
12551
+ <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
12552
+ <xsl:call-template name="setNamedDestination"/>
12553
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
12554
+ <fo:list-item>
12555
+ <fo:list-item-label end-indent="label-end()">
12556
+ <fo:block role="SKIP">
12557
+ <fo:inline role="SKIP">
12558
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
12559
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
12560
+ </xsl:apply-templates>
12561
+ </fo:inline>
12562
+ </fo:block>
12563
+ </fo:list-item-label>
12564
+ <fo:list-item-body start-indent="body-start()">
12565
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
12566
+ <xsl:call-template name="processBibitem">
12567
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
12568
+ </xsl:call-template>
12569
+ </fo:block>
12570
+ </fo:list-item-body>
12571
+ </fo:list-item>
12572
+ </fo:list-block>
13066
12573
 
13067
12574
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
13068
12575
 
@@ -13072,7 +12579,6 @@
13072
12579
  <xsl:otherwise>
13073
12580
  <xsl:call-template name="setNamedDestination"/>
13074
12581
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
13075
-
13076
12582
  <fo:list-item-label end-indent="label-end()">
13077
12583
  <fo:block role="SKIP">
13078
12584
  <fo:inline role="SKIP">
@@ -13099,23 +12605,20 @@
13099
12605
 
13100
12606
  <xsl:template name="processBibitem">
13101
12607
  <xsl:param name="biblio_tag_part">both</xsl:param>
12608
+ <!-- start bibitem processing -->
12609
+ <xsl:if test=".//*[local-name() = 'fn']">
12610
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
12611
+ </xsl:if>
12612
+ <!-- move opening ace-tag before number -->
12613
+ <xsl:apply-templates select="*[local-name() = 'formattedref']/node()[1][local-name() = 'add' and contains(., '_start')]">
12614
+ <xsl:with-param name="skip">false</xsl:with-param>
12615
+ </xsl:apply-templates>
13102
12616
 
13103
- <!-- start bibitem processing -->
13104
- <xsl:if test=".//*[local-name() = 'fn']">
13105
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
13106
- </xsl:if>
13107
-
13108
- <!-- move opening ace-tag before number -->
13109
- <xsl:apply-templates select="*[local-name() = 'formattedref']/node()[1][local-name() = 'add' and contains(., '_start')]">
13110
- <xsl:with-param name="skip">false</xsl:with-param>
13111
- </xsl:apply-templates>
13112
-
13113
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
13114
- <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
13115
- </xsl:apply-templates>
13116
- <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
13117
- <!-- end bibitem processing -->
13118
-
12617
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
12618
+ <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
12619
+ </xsl:apply-templates>
12620
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
12621
+ <!-- end bibitem processing -->
13119
12622
  </xsl:template> <!-- processBibitem (bibitem) -->
13120
12623
 
13121
12624
  <xsl:template match="*[local-name() = 'title']" mode="title">
@@ -13258,8 +12761,7 @@
13258
12761
  <xsl:choose>
13259
12762
  <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
13260
12763
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
13261
- <xsl:otherwise><!-- default value -->
13262
- 3
12764
+ <xsl:otherwise><!-- default value -->3
13263
12765
  </xsl:otherwise>
13264
12766
  </xsl:choose>
13265
12767
  </xsl:variable>
@@ -13468,28 +12970,26 @@
13468
12970
  <!-- Admonition -->
13469
12971
  <!-- ================ -->
13470
12972
  <xsl:template match="*[local-name() = 'admonition']">
12973
+ <fo:block xsl:use-attribute-sets="admonition-style">
13471
12974
 
13472
- <fo:block xsl:use-attribute-sets="admonition-style">
13473
-
13474
- <xsl:call-template name="setBlockSpanAll"/>
12975
+ <xsl:call-template name="setBlockSpanAll"/>
13475
12976
 
13476
- <xsl:if test="@type = 'editorial'">
13477
- <xsl:attribute name="color">green</xsl:attribute>
13478
- <xsl:attribute name="font-weight">normal</xsl:attribute>
13479
- <!-- <xsl:variable name="note-style">
12977
+ <xsl:if test="@type = 'editorial'">
12978
+ <xsl:attribute name="color">green</xsl:attribute>
12979
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
12980
+ <!-- <xsl:variable name="note-style">
13480
12981
  <style xsl:use-attribute-sets="note-style"></style>
13481
12982
  </xsl:variable>
13482
12983
  <xsl:for-each select="xalan:nodeset($note-style)//style/@*">
13483
12984
  <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
13484
12985
  </xsl:for-each> -->
13485
- </xsl:if>
13486
-
13487
- <xsl:call-template name="displayAdmonitionName">
13488
- <xsl:with-param name="sep"> — </xsl:with-param>
13489
- </xsl:call-template>
12986
+ </xsl:if>
12987
+ <xsl:call-template name="displayAdmonitionName">
12988
+ <xsl:with-param name="sep"> — </xsl:with-param>
12989
+ </xsl:call-template>
13490
12990
 
13491
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
13492
- </fo:block>
12991
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
12992
+ </fo:block>
13493
12993
 
13494
12994
  </xsl:template>
13495
12995
 
@@ -13538,12 +13038,10 @@
13538
13038
  </xsl:template> -->
13539
13039
 
13540
13040
  <xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
13041
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
13541
13042
 
13542
- <fo:block xsl:use-attribute-sets="admonition-p-style">
13543
-
13544
- <xsl:apply-templates/>
13545
- </fo:block>
13546
-
13043
+ <xsl:apply-templates/>
13044
+ </fo:block>
13547
13045
  </xsl:template>
13548
13046
 
13549
13047
  <!-- ================ -->
@@ -13579,11 +13077,9 @@
13579
13077
 
13580
13078
  <!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
13581
13079
  <xsl:variable name="updated_xml_step2">
13582
-
13583
- <xsl:if test="$table_if = 'false'">
13584
- <xsl:copy-of select="$updated_xml_step1"/>
13585
- </xsl:if>
13586
-
13080
+ <xsl:if test="$table_if = 'false'">
13081
+ <xsl:copy-of select="$updated_xml_step1"/>
13082
+ </xsl:if>
13587
13083
  </xsl:variable>
13588
13084
 
13589
13085
  <xsl:variable name="endTime2" select="java:getTime(java:java.util.Date.new())"/>
@@ -14058,7 +13554,6 @@
14058
13554
  </xsl:template>
14059
13555
 
14060
13556
  <xsl:template name="addNamedDestinationAttribute">
14061
-
14062
13557
  </xsl:template>
14063
13558
 
14064
13559
  <xsl:template match="*[local-name() = 'fmt-name']"/>
@@ -14553,7 +14048,6 @@
14553
14048
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
14554
14049
  <xsl:if test="not(ancestor::*[local-name() = 'table'])"><regex><xsl:value-of select="$regex_standard_reference"/></regex></xsl:if>
14555
14050
  <!-- if EXPRESS reference -->
14556
-
14557
14051
  <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
14558
14052
  <regex><xsl:value-of select="$regex_solidus_units"/></regex>
14559
14053
  <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
@@ -14607,8 +14101,7 @@
14607
14101
 
14608
14102
  <xsl:variable name="text2">
14609
14103
  <xsl:element name="text" namespace="{$namespace_full}">
14610
- <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()">
14611
- <xsl:copy-of select="."/>
14104
+ <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()"><xsl:copy-of select="."/>
14612
14105
  </xsl:for-each>
14613
14106
  </xsl:element>
14614
14107
  </xsl:variable>
@@ -14900,9 +14393,7 @@
14900
14393
  </xsl:attribute>
14901
14394
  <xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
14902
14395
  <xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
14903
-
14904
- <xsl:value-of select="$skip_footnote_body_"/>
14905
-
14396
+ <xsl:value-of select="$skip_footnote_body_"/>
14906
14397
  </xsl:attribute>
14907
14398
  <xsl:attribute name="ref_id">
14908
14399
  <xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
@@ -14990,9 +14481,7 @@
14990
14481
  <!-- ===================================== -->
14991
14482
 
14992
14483
  <xsl:template name="printEdition">
14993
- <xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
14994
- <xsl:text> </xsl:text>
14995
-
14484
+ <xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/><xsl:text> </xsl:text>
14996
14485
  <xsl:choose>
14997
14486
  <xsl:when test="$edition_i18n != ''">
14998
14487
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -15221,8 +14710,7 @@
15221
14710
  <dc:title>
15222
14711
  <xsl:variable name="title">
15223
14712
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
15224
-
15225
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'title-part']"/>
14713
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'title-part']"/>
15226
14714
 
15227
14715
  </xsl:for-each>
15228
14716
  </xsl:variable>
@@ -15241,12 +14729,11 @@
15241
14729
  </dc:title>
15242
14730
  <xsl:variable name="dc_creator">
15243
14731
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
15244
-
15245
- <rdf:Seq>
15246
- <rdf:li>
15247
- <xsl:value-of select="normalize-space(*[local-name() = 'ext']/*[local-name() = 'editorialgroup']/*[local-name() = 'committee'])"/>
15248
- </rdf:li>
15249
- </rdf:Seq>
14732
+ <rdf:Seq>
14733
+ <rdf:li>
14734
+ <xsl:value-of select="normalize-space(*[local-name() = 'ext']/*[local-name() = 'editorialgroup']/*[local-name() = 'committee'])"/>
14735
+ </rdf:li>
14736
+ </rdf:Seq>
15250
14737
 
15251
14738
  </xsl:for-each>
15252
14739
  </xsl:variable>
@@ -15258,8 +14745,7 @@
15258
14745
 
15259
14746
  <xsl:variable name="dc_description">
15260
14747
  <xsl:variable name="abstract">
15261
-
15262
- <xsl:value-of select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = $lang and @type = 'title-main']"/>
14748
+ <xsl:value-of select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = $lang and @type = 'title-main']"/>
15263
14749
 
15264
14750
  </xsl:variable>
15265
14751
  <rdf:Alt>
@@ -15325,7 +14811,9 @@
15325
14811
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
15326
14812
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
15327
14813
  <xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
15328
- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
14814
+ <!-- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/> -->
14815
+ <!-- See https://github.com/metanorma/metanorma-iso/issues/1369 -->
14816
+ <xsl:variable name="url" select="concat('url(file:///',$outputpdf_basepath, $attachment_path, ')')"/>
15329
14817
  <xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
15330
14818
  <!-- Todo: need update -->
15331
14819
  <xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
@@ -15490,7 +14978,7 @@
15490
14978
  <xsl:param name="normalize-space" select="'true'"/>
15491
14979
  <xsl:param name="keep_sep" select="'false'"/>
15492
14980
  <xsl:if test="string-length($pText) &gt;0">
15493
- <item>
14981
+ <xsl:element name="item" namespace="{$namespace_mn_xsl}">
15494
14982
  <xsl:choose>
15495
14983
  <xsl:when test="$normalize-space = 'true'">
15496
14984
  <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
@@ -15499,8 +14987,8 @@
15499
14987
  <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
15500
14988
  </xsl:otherwise>
15501
14989
  </xsl:choose>
15502
- </item>
15503
- <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><item><xsl:value-of select="$sep"/></item></xsl:if>
14990
+ </xsl:element>
14991
+ <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><xsl:element name="item" namespace="{$namespace_mn_xsl}"><xsl:value-of select="$sep"/></xsl:element></xsl:if>
15504
14992
  <xsl:call-template name="split">
15505
14993
  <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
15506
14994
  <xsl:with-param name="sep" select="$sep"/>
@@ -15518,30 +15006,6 @@
15518
15006
  <xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
15519
15007
  </xsl:template>
15520
15008
 
15521
- <xsl:template name="namespaceCheck">
15522
- <xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
15523
- <xsl:variable name="XSLNS">
15524
-
15525
- <xsl:value-of select="document('')//*/namespace::bipm"/>
15526
-
15527
- </xsl:variable>
15528
- <!-- <xsl:if test="$documentNS != $XSLNS">
15529
- <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
15530
- </xsl:if> -->
15531
- </xsl:template> <!-- namespaceCheck -->
15532
-
15533
- <xsl:template name="getLanguage">
15534
- <xsl:param name="lang"/>
15535
- <xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
15536
- <xsl:choose>
15537
- <xsl:when test="$language = 'en'">English</xsl:when>
15538
- <xsl:when test="$language = 'fr'">French</xsl:when>
15539
- <xsl:when test="$language = 'de'">Deutsch</xsl:when>
15540
- <xsl:when test="$language = 'cn'">Chinese</xsl:when>
15541
- <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
15542
- </xsl:choose>
15543
- </xsl:template>
15544
-
15545
15009
  <xsl:template name="setId">
15546
15010
  <xsl:param name="prefix"/>
15547
15011
  <xsl:attribute name="id">