metanorma-plateau 1.0.7 → 1.0.8

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:plateau="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:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:java="http://xml.apache.org/xalan/java" xmlns:jeuclid="http://jeuclid.sf.net/ns/ext" xmlns:barcode="http://barcode4j.krysalis.org/ns" xmlns:redirect="http://xml.apache.org/xalan/redirect" 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:plateau="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:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:java="http://xml.apache.org/xalan/java" xmlns:jeuclid="http://jeuclid.sf.net/ns/ext" xmlns:barcode="http://barcode4j.krysalis.org/ns" xmlns:redirect="http://xml.apache.org/xalan/redirect" 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
 
@@ -41,16 +41,16 @@
41
41
  </xsl:variable>
42
42
 
43
43
  <xsl:for-each select="xalan:nodeset($current_document)"> <!-- . -->
44
- <doc num="{$num}" firstpage_id="firstpage_id_{$num}" title-part="{$docnumber}" bundle="{$bundle}"> <!-- 'bundle' means several different documents (not language versions) in one xml -->
45
- <contents>
44
+ <mn:doc num="{$num}" firstpage_id="firstpage_id_{$num}" title-part="{$docnumber}" bundle="{$bundle}"> <!-- 'bundle' means several different documents (not language versions) in one xml -->
45
+ <mn:contents>
46
46
  <!-- <xsl:call-template name="processPrefaceSectionsDefault_Contents"/> -->
47
47
 
48
48
  <xsl:call-template name="processMainSectionsDefault_Contents"/>
49
49
 
50
50
  <xsl:apply-templates select="//plateau:indexsect" mode="contents"/>
51
51
 
52
- </contents>
53
- </doc>
52
+ </mn:contents>
53
+ </mn:doc>
54
54
  </xsl:for-each>
55
55
  </xsl:for-each>
56
56
  </xsl:variable>
@@ -504,8 +504,8 @@
504
504
  <xsl:attribute name="font-weight">normal</xsl:attribute>
505
505
  <xsl:attribute name="line-height">1.2</xsl:attribute>
506
506
  </xsl:if>
507
- <xsl:if test="$contents/doc[@num = $num]//item[@display = 'true']">
508
- <xsl:for-each select="$contents/doc[@num = $num]//item[@display = 'true'][@level &lt;= $toc_level or @type='figure' or @type = 'table']">
507
+ <xsl:if test="$contents/mn:doc[@num = $num]//mn:item[@display = 'true']">
508
+ <xsl:for-each select="$contents/mn:doc[@num = $num]//mn:item[@display = 'true'][@level &lt;= $toc_level or @type='figure' or @type = 'table']">
509
509
  <fo:block role="TOCI">
510
510
  <xsl:choose>
511
511
  <xsl:when test="$doctype = 'technical-report'">
@@ -598,12 +598,12 @@
598
598
  <xsl:template name="insertTocItem">
599
599
  <xsl:param name="printSection">false</xsl:param>
600
600
  <fo:block text-align-last="justify" role="TOCI">
601
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
601
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{mn:title}">
602
602
  <xsl:if test="$printSection = 'true' and @section != ''">
603
603
  <xsl:value-of select="@section"/>
604
604
  <xsl:text>. </xsl:text>
605
605
  </xsl:if>
606
- <fo:inline><xsl:apply-templates select="title"/><xsl:text> </xsl:text></fo:inline>
606
+ <fo:inline><xsl:apply-templates select="mn:title"/><xsl:text> </xsl:text></fo:inline>
607
607
  <fo:inline keep-together.within-line="always">
608
608
  <fo:leader leader-pattern="dots"/>
609
609
  <fo:inline>
@@ -864,19 +864,19 @@
864
864
  <xsl:if test="ancestor-or-self::plateau:annex">annex</xsl:if>
865
865
  </xsl:variable>
866
866
 
867
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
867
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
868
868
  <xsl:if test="$type = 'index'">
869
869
  <xsl:attribute name="level">1</xsl:attribute>
870
870
  </xsl:if>
871
- <title>
871
+ <mn:title>
872
872
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
873
873
  <xsl:with-param name="mode">contents</xsl:with-param>
874
874
  </xsl:apply-templates>
875
- </title>
875
+ </mn:title>
876
876
  <xsl:if test="$type != 'index'">
877
877
  <xsl:apply-templates mode="contents"/>
878
878
  </xsl:if>
879
- </item>
879
+ </mn:item>
880
880
  </xsl:if>
881
881
  </xsl:template>
882
882
 
@@ -1612,7 +1612,7 @@
1612
1612
  </xsl:template>
1613
1613
 
1614
1614
  <!-- for $contents -->
1615
- <xsl:template match="title/text()">
1615
+ <xsl:template match="mn:title/text()">
1616
1616
  <xsl:variable name="regex_en_contents">([^\u3000-\u9FFF\uF900-\uFFFF\(\)]{1,})</xsl:variable>
1617
1617
  <xsl:variable name="text_en_" select="java:replaceAll(java:java.lang.String.new(.), $regex_en_contents, concat($tag_font_en_bold_open,'$1',$tag_font_en_bold_close))"/>
1618
1618
  <xsl:variable name="text_en">
@@ -2003,34 +2003,25 @@
2003
2003
  </svg>
2004
2004
  </xsl:variable>
2005
2005
 
2006
- <!-- <xsl:strip-space elements="plateau:xref"/> -->
2006
+ <!-- https://www.metanorma.org/ns/standoc -->
2007
+ <xsl:variable name="namespace_full" select="namespace-uri(//*[local-name() = 'metanorma'][1])"/>
2007
2008
 
2008
- <xsl:variable name="namespace_full_">
2009
- <xsl:choose>
2010
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
2011
- <xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
2012
- </xsl:choose>
2013
- </xsl:variable>
2014
- <xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
2009
+ <!-- https://www.metanorma.org/ns/xsl -->
2010
+ <xsl:variable name="namespace_mn_xsl">https://www.metanorma.org/ns/xslt</xsl:variable>
2015
2011
 
2016
- <xsl:variable name="root_element_">
2017
- <xsl:choose>
2018
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
2019
- <xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
2020
- </xsl:choose>
2021
- </xsl:variable>
2022
- <xsl:variable name="root_element" select="normalize-space($root_element_)"/>
2012
+ <xsl:variable name="root_element">metanorma</xsl:variable>
2023
2013
 
2014
+ <!---examples: 2013, 2024 -->
2024
2015
  <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'])"/>
2025
2016
 
2026
2017
  <!-- external parameters -->
2027
-
2028
2018
  <xsl:param name="svg_images"/> <!-- svg images array -->
2029
2019
  <xsl:variable name="images" select="document($svg_images)"/>
2030
2020
  <xsl:param name="basepath"/> <!-- base path for images -->
2031
2021
  <xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
2032
2022
  <xsl:param name="inputxml_filename"/> <!-- input xml file name -->
2033
2023
  <xsl:param name="output_path"/> <!-- output PDF file name -->
2024
+ <xsl:param name="outputpdf_basepath"/> <!-- output PDF folder -->
2034
2025
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
2035
2026
  <xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
2036
2027
  <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 -->
@@ -2077,20 +2068,13 @@
2077
2068
 
2078
2069
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
2079
2070
 
2080
- <xsl:variable name="isApplyAutolayoutAlgorithm_">
2081
- true
2071
+ <!-- don't remove and rename this variable, it's using in mn2pdf tool -->
2072
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">true
2082
2073
  </xsl:variable>
2083
2074
  <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
2084
2075
 
2085
- <xsl:variable name="isGenerateTableIF_">
2086
- <xsl:choose>
2087
- <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
2088
- <xsl:value-of select="normalize-space($table_if) = 'true'"/>
2089
- </xsl:when>
2090
- <xsl:otherwise>false</xsl:otherwise>
2091
- </xsl:choose>
2092
- </xsl:variable>
2093
- <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
2076
+ <xsl:variable name="isGenerateTableIF"><xsl:value-of select="$table_if"/></xsl:variable>
2077
+ <!-- <xsl:variable name="isGenerateTableIF" select="normalize-space(normalize-space($table_if) = 'true' and 1 = 1)"/> -->
2094
2078
 
2095
2079
  <xsl:variable name="lang">
2096
2080
  <xsl:call-template name="getLang"/>
@@ -2142,8 +2126,7 @@
2142
2126
  <xsl:variable name="pageWidth_">
2143
2127
  <xsl:choose>
2144
2128
  <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
2145
- <xsl:otherwise>
2146
- 210
2129
+ <xsl:otherwise>210
2147
2130
  </xsl:otherwise>
2148
2131
  </xsl:choose>
2149
2132
  </xsl:variable>
@@ -2153,8 +2136,7 @@
2153
2136
  <xsl:variable name="pageHeight_">
2154
2137
  <xsl:choose>
2155
2138
  <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
2156
- <xsl:otherwise>
2157
- 297
2139
+ <xsl:otherwise>297
2158
2140
  </xsl:otherwise>
2159
2141
  </xsl:choose>
2160
2142
  </xsl:variable>
@@ -2164,41 +2146,37 @@
2164
2146
  <!-- marginLeftRight1 and marginLeftRight2 - is left or right margin depends on odd/even page,
2165
2147
  for example, left margin on odd page and right margin on even page -->
2166
2148
  <xsl:variable name="marginLeftRight1_">
2167
-
2168
- <xsl:choose>
2169
- <xsl:when test="$doctype = 'technical-report'">19.5</xsl:when>
2170
- <xsl:otherwise>15.4</xsl:otherwise> <!-- handbook -->
2171
- </xsl:choose>
2149
+ <xsl:choose>
2150
+ <xsl:when test="$doctype = 'technical-report'">19.5</xsl:when>
2151
+ <xsl:otherwise>15.4</xsl:otherwise> <!-- handbook -->
2152
+ </xsl:choose>
2172
2153
 
2173
2154
  </xsl:variable>
2174
2155
  <xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/>
2175
2156
 
2176
2157
  <xsl:variable name="marginLeftRight2_">
2177
-
2178
- <xsl:choose>
2179
- <xsl:when test="$doctype = 'technical-report'">18</xsl:when>
2180
- <xsl:otherwise>15.4</xsl:otherwise> <!-- handbook -->
2181
- </xsl:choose>
2158
+ <xsl:choose>
2159
+ <xsl:when test="$doctype = 'technical-report'">18</xsl:when>
2160
+ <xsl:otherwise>15.4</xsl:otherwise> <!-- handbook -->
2161
+ </xsl:choose>
2182
2162
 
2183
2163
  </xsl:variable>
2184
2164
  <xsl:variable name="marginLeftRight2" select="normalize-space($marginLeftRight2_)"/>
2185
2165
 
2186
2166
  <xsl:variable name="marginTop_">
2187
-
2188
- <xsl:choose>
2189
- <xsl:when test="$doctype = 'technical-report'">26</xsl:when>
2190
- <xsl:otherwise>16</xsl:otherwise> <!-- handbook -->
2191
- </xsl:choose>
2167
+ <xsl:choose>
2168
+ <xsl:when test="$doctype = 'technical-report'">26</xsl:when>
2169
+ <xsl:otherwise>16</xsl:otherwise> <!-- handbook -->
2170
+ </xsl:choose>
2192
2171
 
2193
2172
  </xsl:variable>
2194
2173
  <xsl:variable name="marginTop" select="normalize-space($marginTop_)"/>
2195
2174
 
2196
2175
  <xsl:variable name="marginBottom_">
2197
-
2198
- <xsl:choose>
2199
- <xsl:when test="$doctype = 'technical-report'">26</xsl:when>
2200
- <xsl:otherwise>32</xsl:otherwise> <!-- handbook -->
2201
- </xsl:choose>
2176
+ <xsl:choose>
2177
+ <xsl:when test="$doctype = 'technical-report'">26</xsl:when>
2178
+ <xsl:otherwise>32</xsl:otherwise> <!-- handbook -->
2179
+ </xsl:choose>
2202
2180
 
2203
2181
  </xsl:variable>
2204
2182
  <xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
@@ -2248,13 +2226,10 @@
2248
2226
  <title-toc lang="zh">目次</title-toc>
2249
2227
 
2250
2228
  <title-part lang="en">
2251
-
2252
2229
  </title-part>
2253
2230
  <title-part lang="fr">
2254
-
2255
2231
  </title-part>
2256
2232
  <title-part lang="ru">
2257
-
2258
2233
  </title-part>
2259
2234
  <title-part lang="zh">第 # 部分:</title-part>
2260
2235
 
@@ -2350,11 +2325,9 @@
2350
2325
  <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>
2351
2326
  <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>
2352
2327
  <xsl:attribute-set name="root-style">
2353
-
2354
- <xsl:attribute name="font-family">Yu Gothic, STIX Two Math, <xsl:value-of select="$font_noto_sans"/></xsl:attribute>
2355
- <xsl:attribute name="font-family-generic">Sans</xsl:attribute>
2356
- <xsl:attribute name="font-size">10.5pt</xsl:attribute>
2357
-
2328
+ <xsl:attribute name="font-family">Yu Gothic, STIX Two Math, <xsl:value-of select="$font_noto_sans"/></xsl:attribute>
2329
+ <xsl:attribute name="font-family-generic">Sans</xsl:attribute>
2330
+ <xsl:attribute name="font-size">10.5pt</xsl:attribute>
2358
2331
  </xsl:attribute-set> <!-- root-style -->
2359
2332
 
2360
2333
  <xsl:template name="insertRootStyle">
@@ -2442,28 +2415,22 @@
2442
2415
 
2443
2416
  <!-- Preface sections styles -->
2444
2417
  <xsl:attribute-set name="copyright-statement-style">
2445
-
2446
2418
  </xsl:attribute-set> <!-- copyright-statement-style -->
2447
2419
 
2448
2420
  <xsl:attribute-set name="copyright-statement-title-style">
2449
-
2450
2421
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
2451
2422
 
2452
2423
  <xsl:attribute-set name="copyright-statement-p-style">
2453
-
2454
2424
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
2455
2425
 
2456
2426
  <xsl:attribute-set name="license-statement-style">
2457
-
2458
2427
  </xsl:attribute-set>
2459
2428
 
2460
2429
  <xsl:attribute-set name="license-statement-title-style">
2461
2430
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2462
-
2463
2431
  </xsl:attribute-set> <!-- license-statement-title-style -->
2464
2432
 
2465
2433
  <xsl:attribute-set name="license-statement-p-style">
2466
-
2467
2434
  </xsl:attribute-set> <!-- license-statement-p-style -->
2468
2435
 
2469
2436
  <xsl:attribute-set name="legal-statement-style">
@@ -2472,80 +2439,63 @@
2472
2439
 
2473
2440
  <xsl:attribute-set name="legal-statement-title-style">
2474
2441
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2475
-
2476
2442
  </xsl:attribute-set> <!-- legal-statement-title-style -->
2477
2443
 
2478
2444
  <xsl:attribute-set name="legal-statement-p-style">
2479
-
2480
2445
  </xsl:attribute-set> <!-- legal-statement-p-style -->
2481
2446
 
2482
2447
  <xsl:attribute-set name="feedback-statement-style">
2483
-
2484
2448
  </xsl:attribute-set> <!-- feedback-statement-style -->
2485
2449
 
2486
2450
  <xsl:attribute-set name="feedback-statement-title-style">
2487
2451
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2488
-
2489
2452
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
2490
2453
 
2491
2454
  <xsl:attribute-set name="feedback-statement-p-style">
2492
-
2493
2455
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
2494
2456
 
2495
2457
  <!-- End Preface sections styles -->
2496
2458
 
2497
2459
  <xsl:attribute-set name="link-style">
2498
-
2499
2460
  </xsl:attribute-set>
2500
2461
 
2501
2462
  <xsl:template name="refine_link-style">
2502
-
2503
2463
  </xsl:template> <!-- refine_link-style -->
2504
2464
 
2505
2465
  <xsl:attribute-set name="sourcecode-container-style">
2506
-
2507
2466
  </xsl:attribute-set>
2508
2467
 
2509
2468
  <xsl:attribute-set name="sourcecode-style">
2510
2469
  <xsl:attribute name="white-space">pre</xsl:attribute>
2511
2470
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
2512
2471
  <xsl:attribute name="role">Code</xsl:attribute>
2513
-
2514
2472
  </xsl:attribute-set>
2515
2473
 
2516
2474
  <xsl:template name="refine_sourcecode-style">
2517
-
2518
2475
  </xsl:template> <!-- refine_sourcecode-style -->
2519
2476
 
2520
2477
  <xsl:attribute-set name="pre-style">
2521
2478
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
2522
2479
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2523
-
2524
2480
  </xsl:attribute-set>
2525
2481
 
2526
2482
  <xsl:attribute-set name="permission-style">
2527
-
2528
2483
  </xsl:attribute-set>
2529
2484
 
2530
2485
  <xsl:attribute-set name="permission-name-style">
2531
-
2532
2486
  </xsl:attribute-set>
2533
2487
 
2534
2488
  <xsl:attribute-set name="permission-label-style">
2535
-
2536
2489
  </xsl:attribute-set>
2537
2490
 
2538
2491
  <xsl:attribute-set name="requirement-style">
2539
-
2540
2492
  </xsl:attribute-set>
2541
2493
 
2542
2494
  <xsl:attribute-set name="requirement-name-style">
2543
2495
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2544
-
2545
2496
  </xsl:attribute-set>
2546
2497
 
2547
2498
  <xsl:attribute-set name="requirement-label-style">
2548
-
2549
2499
  </xsl:attribute-set>
2550
2500
 
2551
2501
  <xsl:attribute-set name="subject-style">
@@ -2573,127 +2523,98 @@
2573
2523
  </xsl:attribute-set>
2574
2524
 
2575
2525
  <xsl:attribute-set name="recommendation-style">
2576
-
2577
2526
  </xsl:attribute-set>
2578
2527
 
2579
2528
  <xsl:attribute-set name="recommendation-name-style">
2580
-
2581
2529
  </xsl:attribute-set>
2582
2530
 
2583
2531
  <xsl:attribute-set name="recommendation-label-style">
2584
-
2585
2532
  </xsl:attribute-set>
2586
2533
 
2587
2534
  <xsl:attribute-set name="termexample-style">
2588
-
2589
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
2590
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2591
-
2535
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
2536
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2592
2537
  </xsl:attribute-set>
2593
2538
 
2594
2539
  <xsl:template name="refine_termexample-style">
2595
-
2596
2540
  </xsl:template>
2597
2541
 
2598
2542
  <xsl:attribute-set name="example-style">
2599
-
2600
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
2601
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2602
-
2543
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
2544
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2603
2545
  </xsl:attribute-set> <!-- example-style -->
2604
2546
 
2605
2547
  <xsl:template name="refine_example-style">
2606
-
2607
2548
  </xsl:template> <!-- refine_example-style -->
2608
2549
 
2609
2550
  <xsl:attribute-set name="example-body-style">
2610
-
2611
2551
  </xsl:attribute-set> <!-- example-body-style -->
2612
2552
 
2613
2553
  <xsl:attribute-set name="example-name-style">
2614
-
2615
2554
  </xsl:attribute-set> <!-- example-name-style -->
2616
2555
 
2617
2556
  <xsl:template name="refine_example-name-style">
2618
-
2619
- <xsl:if test="ancestor::*[local-name() = 'figure']">
2620
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2621
- </xsl:if>
2622
-
2557
+ <xsl:if test="ancestor::*[local-name() = 'figure']">
2558
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2559
+ </xsl:if>
2623
2560
  </xsl:template>
2624
2561
 
2625
2562
  <xsl:attribute-set name="example-p-style">
2626
-
2627
- <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
2563
+ <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
2628
2564
 
2629
2565
  </xsl:attribute-set> <!-- example-p-style -->
2630
2566
 
2631
2567
  <xsl:template name="refine_example-p-style">
2632
-
2633
2568
  </xsl:template> <!-- refine_example-p-style -->
2634
2569
 
2635
2570
  <xsl:attribute-set name="termexample-name-style">
2636
-
2637
2571
  </xsl:attribute-set> <!-- termexample-name-style -->
2638
2572
 
2639
2573
  <xsl:template name="refine_termexample-name-style">
2640
-
2641
2574
  </xsl:template>
2642
2575
 
2643
2576
  <!-- ========================== -->
2644
2577
  <!-- Table styles -->
2645
2578
  <!-- ========================== -->
2646
- <xsl:variable name="table-border_">
2647
-
2648
- 1pt solid black
2579
+ <xsl:variable name="table-border_">1pt solid black
2649
2580
  </xsl:variable>
2650
2581
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
2651
2582
 
2652
- <xsl:variable name="table-cell-border_">
2653
-
2654
- 0.5pt solid black
2583
+ <xsl:variable name="table-cell-border_">0.5pt solid black
2655
2584
  </xsl:variable>
2656
2585
  <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
2657
2586
 
2658
2587
  <xsl:attribute-set name="table-container-style">
2659
2588
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2660
2589
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
2661
-
2662
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2663
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2664
-
2590
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2591
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
2665
2592
  </xsl:attribute-set> <!-- table-container-style -->
2666
2593
 
2667
2594
  <xsl:template name="refine_table-container-style">
2668
2595
  <xsl:param name="margin-side"/>
2669
-
2670
2596
  <!-- end table block-container attributes -->
2671
2597
  </xsl:template> <!-- refine_table-container-style -->
2672
2598
 
2673
2599
  <xsl:attribute-set name="table-style">
2674
2600
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
2675
2601
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
2676
-
2677
- <xsl:attribute name="border"><xsl:value-of select="$table-border"/></xsl:attribute>
2678
-
2602
+ <xsl:attribute name="border"><xsl:value-of select="$table-border"/></xsl:attribute>
2679
2603
  </xsl:attribute-set><!-- table-style -->
2680
2604
 
2681
2605
  <xsl:template name="refine_table-style">
2682
2606
  <xsl:param name="margin-side"/>
2683
2607
 
2684
2608
  <xsl:call-template name="setBordersTableArray"/>
2685
-
2686
2609
  </xsl:template> <!-- refine_table-style -->
2687
2610
 
2688
2611
  <xsl:attribute-set name="table-name-style">
2689
2612
  <xsl:attribute name="role">Caption</xsl:attribute>
2690
2613
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2691
-
2692
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2693
- <xsl:attribute name="text-align">center</xsl:attribute>
2694
- <xsl:attribute name="margin-top">20pt</xsl:attribute>
2695
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2696
-
2614
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2615
+ <xsl:attribute name="text-align">center</xsl:attribute>
2616
+ <xsl:attribute name="margin-top">20pt</xsl:attribute>
2617
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2697
2618
  </xsl:attribute-set> <!-- table-name-style -->
2698
2619
 
2699
2620
  <xsl:template name="refine_table-name-style">
@@ -2701,41 +2622,32 @@
2701
2622
  <xsl:if test="$continued = 'true'">
2702
2623
  <xsl:attribute name="role">SKIP</xsl:attribute>
2703
2624
  </xsl:if>
2704
-
2705
- <xsl:if test="$doctype = 'technical-report'">
2706
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2707
- </xsl:if>
2708
-
2625
+ <xsl:if test="$doctype = 'technical-report'">
2626
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2627
+ </xsl:if>
2709
2628
  </xsl:template> <!-- refine_table-name-style -->
2710
2629
 
2711
2630
  <xsl:attribute-set name="table-row-style">
2712
2631
  <xsl:attribute name="min-height">4mm</xsl:attribute>
2713
-
2714
2632
  </xsl:attribute-set>
2715
2633
 
2716
2634
  <xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
2717
2635
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2718
-
2719
- <xsl:attribute name="border-top"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
2720
- <xsl:attribute name="border-bottom"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
2721
-
2636
+ <xsl:attribute name="border-top"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
2637
+ <xsl:attribute name="border-bottom"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
2722
2638
  </xsl:attribute-set>
2723
2639
 
2724
2640
  <xsl:template name="refine_table-header-row-style">
2725
2641
 
2726
2642
  <xsl:call-template name="setBordersTableArray"/>
2727
-
2728
2643
  </xsl:template> <!-- refine_table-header-row-style -->
2729
2644
 
2730
2645
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
2731
-
2732
- <xsl:attribute name="border-left"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
2733
- <xsl:attribute name="border-right"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
2734
-
2646
+ <xsl:attribute name="border-left"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
2647
+ <xsl:attribute name="border-right"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
2735
2648
  </xsl:attribute-set>
2736
2649
 
2737
2650
  <xsl:template name="refine_table-footer-row-style">
2738
-
2739
2651
  </xsl:template> <!-- refine_table-footer-row-style -->
2740
2652
 
2741
2653
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
@@ -2745,7 +2657,6 @@
2745
2657
  <xsl:template name="refine_table-body-row-style">
2746
2658
 
2747
2659
  <xsl:call-template name="setBordersTableArray"/>
2748
-
2749
2660
  </xsl:template> <!-- refine_table-body-row-style -->
2750
2661
 
2751
2662
  <xsl:attribute-set name="table-header-cell-style">
@@ -2753,12 +2664,10 @@
2753
2664
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
2754
2665
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2755
2666
  <xsl:attribute name="display-align">center</xsl:attribute>
2756
-
2757
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2758
- <xsl:attribute name="border"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
2759
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2760
- <xsl:attribute name="background-color">rgb(206,206,206)</xsl:attribute>
2761
-
2667
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2668
+ <xsl:attribute name="border"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
2669
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2670
+ <xsl:attribute name="background-color">rgb(206,206,206)</xsl:attribute>
2762
2671
  </xsl:attribute-set> <!-- table-header-cell-style -->
2763
2672
 
2764
2673
  <xsl:template name="refine_table-header-cell-style">
@@ -2770,17 +2679,14 @@
2770
2679
  </xsl:if>
2771
2680
 
2772
2681
  <xsl:call-template name="setTableCellAttributes"/>
2773
-
2774
2682
  </xsl:template> <!-- refine_table-header-cell-style -->
2775
2683
 
2776
2684
  <xsl:attribute-set name="table-cell-style">
2777
2685
  <xsl:attribute name="display-align">center</xsl:attribute>
2778
2686
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
2779
2687
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2780
-
2781
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2782
- <xsl:attribute name="border"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
2783
-
2688
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2689
+ <xsl:attribute name="border"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
2784
2690
  </xsl:attribute-set> <!-- table-cell-style -->
2785
2691
 
2786
2692
  <xsl:template name="refine_table-cell-style">
@@ -2789,8 +2695,6 @@
2789
2695
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2790
2696
  </xsl:if>
2791
2697
 
2792
- <!-- bsi -->
2793
-
2794
2698
  <xsl:call-template name="setBordersTableArray"/>
2795
2699
 
2796
2700
  </xsl:template> <!-- refine_table-cell-style -->
@@ -2800,74 +2704,56 @@
2800
2704
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
2801
2705
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2802
2706
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
2803
-
2804
- <xsl:attribute name="border"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
2805
- <xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
2806
-
2707
+ <xsl:attribute name="border"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
2708
+ <xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
2807
2709
  </xsl:attribute-set> <!-- table-footer-cell-style -->
2808
2710
 
2809
2711
  <xsl:template name="refine_table-footer-cell-style">
2810
-
2811
2712
  </xsl:template> <!-- refine_table-footer-cell-style -->
2812
2713
 
2813
2714
  <xsl:attribute-set name="table-note-style">
2814
2715
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2815
2716
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2816
-
2817
- <xsl:attribute name="font-size">inherit</xsl:attribute>
2818
- <xsl:attribute name="margin-bottom">1pt</xsl:attribute>
2819
-
2717
+ <xsl:attribute name="font-size">inherit</xsl:attribute>
2718
+ <xsl:attribute name="margin-bottom">1pt</xsl:attribute>
2820
2719
  </xsl:attribute-set><!-- table-note-style -->
2821
2720
 
2822
2721
  <xsl:template name="refine_table-note-style">
2823
-
2824
- <xsl:attribute name="margin-left"><xsl:value-of select="$tableAnnotationIndent"/></xsl:attribute>
2825
-
2722
+ <xsl:attribute name="margin-left"><xsl:value-of select="$tableAnnotationIndent"/></xsl:attribute>
2826
2723
  </xsl:template> <!-- refine_table-note-style -->
2827
2724
 
2828
2725
  <xsl:attribute-set name="table-fn-style">
2829
2726
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2830
-
2831
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2832
- <xsl:attribute name="margin-bottom">1pt</xsl:attribute>
2833
-
2727
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2728
+ <xsl:attribute name="margin-bottom">1pt</xsl:attribute>
2834
2729
  </xsl:attribute-set> <!-- table-fn-style -->
2835
2730
 
2836
2731
  <xsl:template name="refine_table-fn-style">
2837
-
2838
- <xsl:attribute name="margin-left"><xsl:value-of select="$tableAnnotationIndent"/></xsl:attribute>
2839
-
2732
+ <xsl:attribute name="margin-left"><xsl:value-of select="$tableAnnotationIndent"/></xsl:attribute>
2840
2733
  </xsl:template>
2841
2734
 
2842
2735
  <xsl:attribute-set name="table-fn-number-style">
2843
2736
  <!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
2844
-
2845
- <xsl:attribute name="font-size">100%</xsl:attribute>
2846
- <!-- <xsl:attribute name="padding-right">2mm</xsl:attribute> -->
2847
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2848
-
2737
+ <xsl:attribute name="font-size">100%</xsl:attribute>
2738
+ <!-- <xsl:attribute name="padding-right">2mm</xsl:attribute> -->
2739
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2849
2740
  </xsl:attribute-set> <!-- table-fn-number-style -->
2850
2741
 
2851
2742
  <xsl:attribute-set name="table-fmt-fn-label-style">
2852
2743
  <xsl:attribute name="font-size">80%</xsl:attribute>
2853
-
2854
- <xsl:attribute name="font-size">60%</xsl:attribute>
2855
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2856
-
2744
+ <xsl:attribute name="font-size">60%</xsl:attribute>
2745
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2857
2746
  </xsl:attribute-set> <!-- table-fmt-fn-label-style -->
2858
2747
 
2859
2748
  <xsl:template name="refine_table-fmt-fn-label-style">
2860
-
2861
2749
  </xsl:template>
2862
2750
 
2863
2751
  <xsl:attribute-set name="fn-container-body-style">
2864
2752
  <xsl:attribute name="text-indent">0</xsl:attribute>
2865
2753
  <xsl:attribute name="start-indent">0</xsl:attribute>
2866
-
2867
2754
  </xsl:attribute-set>
2868
2755
 
2869
2756
  <xsl:attribute-set name="table-fn-body-style">
2870
-
2871
2757
  </xsl:attribute-set>
2872
2758
 
2873
2759
  <xsl:attribute-set name="figure-fn-number-style">
@@ -2877,20 +2763,16 @@
2877
2763
  <xsl:attribute-set name="figure-fmt-fn-label-style">
2878
2764
  <xsl:attribute name="font-size">80%</xsl:attribute>
2879
2765
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2880
-
2881
- <xsl:attribute name="font-size">60%</xsl:attribute>
2882
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2883
-
2766
+ <xsl:attribute name="font-size">60%</xsl:attribute>
2767
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2884
2768
  </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
2885
2769
 
2886
2770
  <xsl:template name="refine_figure-fmt-fn-label-style">
2887
-
2888
2771
  </xsl:template>
2889
2772
 
2890
2773
  <xsl:attribute-set name="figure-fn-body-style">
2891
2774
  <xsl:attribute name="text-align">justify</xsl:attribute>
2892
2775
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2893
-
2894
2776
  </xsl:attribute-set>
2895
2777
  <!-- ========================== -->
2896
2778
  <!-- END Table styles -->
@@ -2901,45 +2783,35 @@
2901
2783
  <!-- ========================== -->
2902
2784
 
2903
2785
  <xsl:attribute-set name="dl-block-style">
2904
-
2905
- <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
2906
-
2786
+ <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
2907
2787
  </xsl:attribute-set>
2908
2788
 
2909
2789
  <xsl:attribute-set name="dt-row-style">
2910
-
2911
2790
  </xsl:attribute-set>
2912
2791
 
2913
2792
  <xsl:attribute-set name="dt-cell-style">
2914
-
2915
2793
  </xsl:attribute-set>
2916
2794
 
2917
2795
  <xsl:template name="refine_dt-cell-style">
2918
-
2919
2796
  </xsl:template> <!-- refine_dt-cell-style -->
2920
2797
 
2921
2798
  <xsl:attribute-set name="dt-block-style">
2922
2799
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
2923
-
2924
2800
  </xsl:attribute-set>
2925
2801
 
2926
2802
  <xsl:template name="refine_dt-block-style">
2927
-
2928
2803
  </xsl:template> <!-- refine_dt-block-style -->
2929
2804
 
2930
2805
  <xsl:attribute-set name="dl-name-style">
2931
2806
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2932
2807
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2933
-
2934
2808
  </xsl:attribute-set> <!-- dl-name-style -->
2935
2809
 
2936
2810
  <xsl:attribute-set name="dd-cell-style">
2937
2811
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
2938
-
2939
2812
  </xsl:attribute-set>
2940
2813
 
2941
2814
  <xsl:template name="refine_dd-cell-style">
2942
-
2943
2815
  </xsl:template> <!-- refine_dd-cell-style -->
2944
2816
 
2945
2817
  <!-- ========================== -->
@@ -2947,236 +2819,179 @@
2947
2819
  <!-- ========================== -->
2948
2820
 
2949
2821
  <xsl:attribute-set name="appendix-style">
2950
-
2951
2822
  </xsl:attribute-set>
2952
2823
 
2953
2824
  <xsl:attribute-set name="appendix-example-style">
2954
-
2955
2825
  </xsl:attribute-set>
2956
2826
 
2957
2827
  <xsl:attribute-set name="xref-style">
2958
-
2959
2828
  </xsl:attribute-set>
2960
2829
 
2961
2830
  <xsl:attribute-set name="eref-style">
2962
-
2963
2831
  </xsl:attribute-set>
2964
2832
 
2965
2833
  <xsl:template name="refine_eref-style">
2966
2834
  <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
2967
2835
  <xsl:variable name="text" select="normalize-space()"/>
2968
-
2969
2836
  </xsl:template> <!-- refine_eref-style -->
2970
2837
 
2971
2838
  <xsl:attribute-set name="note-style">
2972
-
2973
- <xsl:attribute name="text-indent">0mm</xsl:attribute>
2974
- <xsl:attribute name="space-before">2pt</xsl:attribute>
2975
-
2839
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
2840
+ <xsl:attribute name="space-before">2pt</xsl:attribute>
2976
2841
  </xsl:attribute-set>
2977
2842
 
2978
2843
  <xsl:template name="refine_note-style">
2979
-
2980
2844
  </xsl:template>
2981
2845
 
2982
2846
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
2983
2847
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
2984
2848
 
2985
2849
  <xsl:attribute-set name="note-name-style">
2986
-
2987
2850
  </xsl:attribute-set>
2988
2851
 
2989
2852
  <xsl:template name="refine_note-name-style">
2990
-
2991
- <xsl:if test="ancestor::*[local-name() = 'figure']">
2992
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2993
- </xsl:if>
2994
-
2853
+ <xsl:if test="ancestor::*[local-name() = 'figure']">
2854
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2855
+ </xsl:if>
2995
2856
  </xsl:template> <!-- refine_note-name-style -->
2996
2857
 
2997
2858
  <xsl:attribute-set name="table-note-name-style">
2998
2859
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
2999
-
3000
2860
  </xsl:attribute-set>
3001
2861
 
3002
2862
  <xsl:template name="refine_table-note-name-style">
3003
-
3004
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3005
-
2863
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3006
2864
  </xsl:template> <!-- refine_table-note-name-style -->
3007
2865
 
3008
2866
  <xsl:attribute-set name="note-p-style">
3009
-
3010
2867
  </xsl:attribute-set>
3011
2868
 
3012
2869
  <xsl:attribute-set name="termnote-style">
3013
-
3014
- <xsl:attribute name="text-indent">0mm</xsl:attribute>
3015
- <xsl:attribute name="space-before">4pt</xsl:attribute>
3016
- <xsl:attribute name="space-after">4pt</xsl:attribute>
3017
-
2870
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
2871
+ <xsl:attribute name="space-before">4pt</xsl:attribute>
2872
+ <xsl:attribute name="space-after">4pt</xsl:attribute>
3018
2873
  </xsl:attribute-set>
3019
2874
 
3020
2875
  <xsl:template name="refine_termnote-style">
3021
-
3022
2876
  </xsl:template> <!-- refine_termnote-style -->
3023
2877
 
3024
2878
  <xsl:attribute-set name="termnote-name-style">
3025
-
3026
2879
  </xsl:attribute-set>
3027
2880
 
3028
2881
  <xsl:template name="refine_termnote-name-style">
3029
-
3030
- <!-- <xsl:if test="$namespace = 'ieee'">
3031
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
3032
- </xsl:if> -->
3033
-
3034
2882
  </xsl:template>
3035
2883
 
3036
2884
  <xsl:attribute-set name="termnote-p-style">
3037
-
3038
2885
  </xsl:attribute-set>
3039
2886
 
3040
2887
  <xsl:attribute-set name="quote-style">
3041
2888
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
3042
2889
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
3043
-
3044
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
3045
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
3046
-
2890
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2891
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
3047
2892
  </xsl:attribute-set>
3048
2893
 
3049
2894
  <xsl:template name="refine_quote-style">
3050
-
3051
2895
  </xsl:template>
3052
2896
 
3053
2897
  <xsl:attribute-set name="quote-source-style">
3054
2898
  <xsl:attribute name="text-align">right</xsl:attribute>
3055
-
3056
2899
  </xsl:attribute-set>
3057
2900
 
3058
2901
  <xsl:attribute-set name="termsource-style">
3059
-
3060
2902
  </xsl:attribute-set>
3061
2903
 
3062
2904
  <xsl:template name="refine_termsource-style">
3063
-
3064
- <xsl:if test="ancestor::*[local-name() = 'table']">
3065
- <xsl:attribute name="margin-bottom">1pt</xsl:attribute>
3066
- </xsl:if>
3067
-
2905
+ <xsl:if test="ancestor::*[local-name() = 'table']">
2906
+ <xsl:attribute name="margin-bottom">1pt</xsl:attribute>
2907
+ </xsl:if>
3068
2908
  </xsl:template> <!-- refine_termsource-style -->
3069
2909
 
3070
2910
  <xsl:attribute-set name="termsource-text-style">
3071
-
3072
2911
  </xsl:attribute-set>
3073
2912
 
3074
2913
  <xsl:attribute-set name="origin-style">
3075
-
3076
2914
  </xsl:attribute-set>
3077
2915
 
3078
2916
  <xsl:attribute-set name="term-style">
3079
-
3080
- <xsl:attribute name="space-after">12pt</xsl:attribute>
3081
-
2917
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
3082
2918
  </xsl:attribute-set>
3083
2919
 
3084
2920
  <xsl:attribute-set name="term-name-style">
3085
2921
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3086
2922
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3087
-
3088
- <xsl:attribute name="font-weight">normal</xsl:attribute>
3089
- <xsl:attribute name="space-after">2pt</xsl:attribute>
3090
-
2923
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2924
+ <xsl:attribute name="space-after">2pt</xsl:attribute>
3091
2925
  </xsl:attribute-set>
3092
2926
 
3093
2927
  <xsl:attribute-set name="figure-block-style">
3094
2928
  <xsl:attribute name="role">SKIP</xsl:attribute>
3095
-
3096
2929
  </xsl:attribute-set>
3097
2930
 
3098
2931
  <xsl:template name="refine_figure-block-style">
3099
-
3100
2932
  </xsl:template>
3101
2933
 
3102
2934
  <xsl:attribute-set name="figure-style">
3103
-
3104
2935
  </xsl:attribute-set>
3105
2936
 
3106
2937
  <xsl:attribute-set name="figure-name-style">
3107
2938
  <xsl:attribute name="role">Caption</xsl:attribute>
3108
-
3109
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3110
- <xsl:attribute name="text-align">center</xsl:attribute>
3111
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
3112
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3113
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
3114
-
2939
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2940
+ <xsl:attribute name="text-align">center</xsl:attribute>
2941
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
2942
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2943
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
3115
2944
  </xsl:attribute-set>
3116
2945
 
3117
2946
  <xsl:template name="refine_figure-name-style">
3118
-
3119
- <xsl:if test="$doctype = 'technical-report'">
3120
- <xsl:attribute name="font-weight">normal</xsl:attribute>
3121
- </xsl:if>
3122
-
2947
+ <xsl:if test="$doctype = 'technical-report'">
2948
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2949
+ </xsl:if>
3123
2950
  </xsl:template> <!-- refine_figure-name-style -->
3124
2951
 
3125
2952
  <xsl:attribute-set name="figure-source-style">
3126
-
3127
2953
  </xsl:attribute-set>
3128
2954
 
3129
2955
  <!-- Formula's styles -->
3130
2956
  <xsl:attribute-set name="formula-style">
3131
2957
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
3132
2958
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3133
-
3134
2959
  </xsl:attribute-set> <!-- formula-style -->
3135
2960
 
3136
2961
  <xsl:attribute-set name="formula-stem-block-style">
3137
2962
  <xsl:attribute name="text-align">center</xsl:attribute>
3138
-
3139
2963
  </xsl:attribute-set> <!-- formula-stem-block-style -->
3140
2964
 
3141
2965
  <xsl:template name="refine_formula-stem-block-style">
3142
-
3143
2966
  </xsl:template> <!-- refine_formula-stem-block-style -->
3144
2967
 
3145
2968
  <xsl:attribute-set name="formula-stem-number-style">
3146
2969
  <xsl:attribute name="text-align">right</xsl:attribute>
3147
-
3148
2970
  </xsl:attribute-set> <!-- formula-stem-number-style -->
3149
2971
  <!-- End Formula's styles -->
3150
2972
 
3151
2973
  <xsl:template name="refine_formula-stem-number-style">
3152
-
3153
2974
  </xsl:template>
3154
2975
 
3155
2976
  <xsl:attribute-set name="image-style">
3156
2977
  <xsl:attribute name="role">SKIP</xsl:attribute>
3157
2978
  <xsl:attribute name="text-align">center</xsl:attribute>
3158
-
3159
2979
  </xsl:attribute-set>
3160
2980
 
3161
2981
  <xsl:template name="refine_image-style">
3162
-
3163
2982
  </xsl:template>
3164
2983
 
3165
2984
  <xsl:attribute-set name="figure-pseudocode-p-style">
3166
-
3167
2985
  </xsl:attribute-set>
3168
2986
 
3169
2987
  <xsl:attribute-set name="image-graphic-style">
3170
2988
  <xsl:attribute name="width">100%</xsl:attribute>
3171
2989
  <xsl:attribute name="content-height">100%</xsl:attribute>
3172
2990
  <xsl:attribute name="scaling">uniform</xsl:attribute>
3173
-
3174
- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
3175
-
2991
+ <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
3176
2992
  </xsl:attribute-set>
3177
2993
 
3178
2994
  <xsl:attribute-set name="tt-style">
3179
-
3180
2995
  </xsl:attribute-set>
3181
2996
 
3182
2997
  <xsl:attribute-set name="sourcecode-name-style">
@@ -3185,55 +3000,44 @@
3185
3000
  <xsl:attribute name="text-align">center</xsl:attribute>
3186
3001
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3187
3002
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
3188
-
3189
3003
  </xsl:attribute-set>
3190
3004
 
3191
3005
  <xsl:attribute-set name="preferred-block-style">
3192
-
3193
3006
  </xsl:attribute-set>
3194
3007
 
3195
3008
  <xsl:attribute-set name="preferred-term-style">
3196
3009
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3197
3010
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3198
-
3199
- <xsl:attribute name="font-weight">normal</xsl:attribute>
3200
-
3011
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
3201
3012
  </xsl:attribute-set>
3202
3013
 
3203
3014
  <xsl:attribute-set name="domain-style">
3204
-
3205
3015
  </xsl:attribute-set>
3206
3016
 
3207
3017
  <xsl:attribute-set name="admitted-style">
3208
-
3209
3018
  </xsl:attribute-set>
3210
3019
 
3211
3020
  <xsl:attribute-set name="deprecates-style">
3212
-
3213
3021
  </xsl:attribute-set>
3214
3022
 
3215
3023
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
3216
3024
  </xsl:attribute-set>
3217
3025
 
3218
3026
  <xsl:attribute-set name="definition-style">
3219
-
3220
- <xsl:attribute name="space-before">2pt</xsl:attribute>
3221
- <xsl:attribute name="space-after">2pt</xsl:attribute>
3222
-
3027
+ <xsl:attribute name="space-before">2pt</xsl:attribute>
3028
+ <xsl:attribute name="space-after">2pt</xsl:attribute>
3223
3029
  </xsl:attribute-set>
3224
3030
 
3225
3031
  <xsl:variable name="color-added-text">
3226
3032
  <xsl:text>rgb(0, 255, 0)</xsl:text>
3227
3033
  </xsl:variable>
3228
3034
  <xsl:attribute-set name="add-style">
3229
-
3230
- <xsl:attribute name="color">red</xsl:attribute>
3231
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
3232
- <!-- <xsl:attribute name="color">black</xsl:attribute>
3035
+ <xsl:attribute name="color">red</xsl:attribute>
3036
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
3037
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
3233
3038
  <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
3234
3039
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
3235
3040
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
3236
-
3237
3041
  </xsl:attribute-set>
3238
3042
 
3239
3043
  <xsl:variable name="add-style">
@@ -3253,56 +3057,43 @@
3253
3057
 
3254
3058
  <xsl:attribute-set name="mathml-style">
3255
3059
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
3256
-
3257
3060
  </xsl:attribute-set>
3258
3061
 
3259
3062
  <xsl:template name="refine_mathml-style">
3260
-
3261
3063
  </xsl:template>
3262
3064
 
3263
3065
  <xsl:attribute-set name="list-style">
3264
-
3265
- <xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
3266
- <xsl:attribute name="space-after">20pt</xsl:attribute>
3267
-
3066
+ <xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
3067
+ <xsl:attribute name="space-after">20pt</xsl:attribute>
3268
3068
  </xsl:attribute-set> <!-- list-style -->
3269
3069
 
3270
3070
  <xsl:template name="refine_list-style">
3271
-
3272
- <xsl:if test="ancestor::*[local-name() = 'table']">
3273
- <xsl:attribute name="provisional-distance-between-starts">4.5mm</xsl:attribute>
3274
- <xsl:attribute name="space-after">0pt</xsl:attribute>
3275
- </xsl:if>
3276
-
3071
+ <xsl:if test="ancestor::*[local-name() = 'table']">
3072
+ <xsl:attribute name="provisional-distance-between-starts">4.5mm</xsl:attribute>
3073
+ <xsl:attribute name="space-after">0pt</xsl:attribute>
3074
+ </xsl:if>
3277
3075
  </xsl:template> <!-- refine_list-style -->
3278
3076
 
3279
3077
  <xsl:attribute-set name="list-name-style">
3280
3078
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3281
-
3282
3079
  </xsl:attribute-set> <!-- list-name-style -->
3283
3080
 
3284
3081
  <xsl:attribute-set name="list-item-style">
3285
-
3286
3082
  </xsl:attribute-set>
3287
3083
 
3288
3084
  <xsl:template name="refine_list-item-style">
3289
-
3290
3085
  </xsl:template> <!-- refine_list-item-style -->
3291
3086
 
3292
3087
  <xsl:attribute-set name="list-item-label-style">
3293
-
3294
3088
  </xsl:attribute-set>
3295
3089
 
3296
3090
  <xsl:template name="refine_list-item-label-style">
3297
-
3298
3091
  </xsl:template> <!-- refine_list-item-label-style -->
3299
3092
 
3300
3093
  <xsl:attribute-set name="list-item-body-style">
3301
-
3302
3094
  </xsl:attribute-set>
3303
3095
 
3304
3096
  <xsl:template name="refine_list-item-body-style">
3305
-
3306
3097
  </xsl:template> <!-- refine_list-item-body-style -->
3307
3098
 
3308
3099
  <xsl:attribute-set name="toc-style">
@@ -3312,14 +3103,12 @@
3312
3103
  <xsl:attribute-set name="fn-reference-style">
3313
3104
  <xsl:attribute name="font-size">80%</xsl:attribute>
3314
3105
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3315
-
3316
- <xsl:attribute name="font-size">6pt</xsl:attribute>
3317
- <xsl:attribute name="baseline-shift">25%</xsl:attribute>
3106
+ <xsl:attribute name="font-size">6pt</xsl:attribute>
3107
+ <xsl:attribute name="baseline-shift">25%</xsl:attribute>
3318
3108
 
3319
3109
  </xsl:attribute-set>
3320
3110
 
3321
3111
  <xsl:template name="refine_fn-reference-style">
3322
-
3323
3112
  </xsl:template> <!-- refine_fn-reference-style -->
3324
3113
 
3325
3114
  <xsl:attribute-set name="fn-style">
@@ -3328,10 +3117,8 @@
3328
3117
 
3329
3118
  <xsl:attribute-set name="fn-num-style">
3330
3119
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3331
-
3332
- <xsl:attribute name="font-size">6pt</xsl:attribute>
3333
- <xsl:attribute name="baseline-shift">25%</xsl:attribute>
3334
-
3120
+ <xsl:attribute name="font-size">6pt</xsl:attribute>
3121
+ <xsl:attribute name="baseline-shift">25%</xsl:attribute>
3335
3122
  </xsl:attribute-set>
3336
3123
 
3337
3124
  <xsl:attribute-set name="fn-body-style">
@@ -3339,110 +3126,84 @@
3339
3126
  <xsl:attribute name="font-style">normal</xsl:attribute>
3340
3127
  <xsl:attribute name="text-indent">0</xsl:attribute>
3341
3128
  <xsl:attribute name="start-indent">0</xsl:attribute>
3342
-
3343
3129
  </xsl:attribute-set>
3344
3130
 
3345
3131
  <xsl:template name="refine_fn-body-style">
3346
-
3347
3132
  </xsl:template> <!-- refine_fn-body-style -->
3348
3133
 
3349
3134
  <xsl:attribute-set name="fn-body-num-style">
3350
3135
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
3351
-
3352
- <xsl:attribute name="font-size">6pt</xsl:attribute>
3353
- <xsl:attribute name="baseline-shift">25%</xsl:attribute>
3354
-
3136
+ <xsl:attribute name="font-size">6pt</xsl:attribute>
3137
+ <xsl:attribute name="baseline-shift">25%</xsl:attribute>
3355
3138
  </xsl:attribute-set> <!-- fn-body-num-style -->
3356
3139
 
3357
3140
  <xsl:template name="refine_fn-body-num-style">
3358
-
3359
3141
  </xsl:template> <!-- refine_fn-body-num-style -->
3360
3142
 
3361
3143
  <!-- admonition -->
3362
3144
  <xsl:attribute-set name="admonition-style">
3363
-
3364
3145
  </xsl:attribute-set> <!-- admonition-style -->
3365
3146
 
3366
3147
  <xsl:attribute-set name="admonition-container-style">
3367
3148
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
3368
3149
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
3369
-
3370
3150
  </xsl:attribute-set> <!-- admonition-container-style -->
3371
3151
 
3372
3152
  <xsl:attribute-set name="admonition-name-style">
3373
3153
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3374
-
3375
3154
  </xsl:attribute-set> <!-- admonition-name-style -->
3376
3155
 
3377
3156
  <xsl:attribute-set name="admonition-p-style">
3378
-
3379
3157
  </xsl:attribute-set> <!-- admonition-p-style -->
3380
3158
  <!-- end admonition -->
3381
3159
 
3382
3160
  <!-- bibitem in Normative References (references/@normative="true") -->
3383
3161
  <xsl:attribute-set name="bibitem-normative-style">
3384
-
3385
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3386
- <xsl:attribute name="start-indent">6mm</xsl:attribute>
3387
- <xsl:attribute name="text-indent">-6mm</xsl:attribute>
3388
-
3162
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3163
+ <xsl:attribute name="start-indent">6mm</xsl:attribute>
3164
+ <xsl:attribute name="text-indent">-6mm</xsl:attribute>
3389
3165
  </xsl:attribute-set> <!-- bibitem-normative-style -->
3390
3166
 
3391
3167
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
3392
3168
  <xsl:attribute-set name="bibitem-normative-list-style">
3393
3169
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
3394
3170
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3395
-
3396
- <!-- <xsl:if test="$namespace = 'ieee'">
3397
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3398
- <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
3399
- </xsl:if> -->
3400
-
3401
3171
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
3402
3172
 
3403
3173
  <xsl:attribute-set name="bibitem-non-normative-style">
3404
-
3405
3174
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
3406
3175
 
3407
3176
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
3408
3177
  <xsl:attribute-set name="bibitem-non-normative-list-style">
3409
3178
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
3410
3179
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3411
-
3412
- <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
3413
- <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
3414
- <xsl:attribute name="line-height">1.5</xsl:attribute>
3415
-
3180
+ <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
3181
+ <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
3182
+ <xsl:attribute name="line-height">1.5</xsl:attribute>
3416
3183
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
3417
3184
 
3418
3185
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
3419
3186
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3420
-
3421
3187
  </xsl:attribute-set>
3422
3188
 
3423
3189
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
3424
3190
  <xsl:attribute-set name="bibitem-normative-list-body-style">
3425
-
3426
3191
  </xsl:attribute-set>
3427
3192
 
3428
3193
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
3429
-
3430
3194
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
3431
3195
 
3432
3196
  <!-- footnote reference number for bibitem, in the text -->
3433
3197
  <xsl:attribute-set name="bibitem-note-fn-style">
3434
3198
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3435
3199
  <xsl:attribute name="font-size">65%</xsl:attribute>
3436
-
3437
- <xsl:attribute name="font-size">6pt</xsl:attribute>
3438
- <xsl:attribute name="baseline-shift">25%</xsl:attribute>
3439
-
3200
+ <xsl:attribute name="font-size">6pt</xsl:attribute>
3201
+ <xsl:attribute name="baseline-shift">25%</xsl:attribute>
3440
3202
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
3441
3203
 
3442
3204
  <!-- footnote number on the page bottom -->
3443
3205
  <xsl:attribute-set name="bibitem-note-fn-number-style">
3444
3206
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
3445
-
3446
3207
  </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
3447
3208
 
3448
3209
  <!-- footnote body (text) on the page bottom -->
@@ -3450,11 +3211,9 @@
3450
3211
  <xsl:attribute name="font-size">10pt</xsl:attribute>
3451
3212
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3452
3213
  <xsl:attribute name="start-indent">0pt</xsl:attribute>
3453
-
3454
3214
  </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
3455
3215
 
3456
3216
  <xsl:attribute-set name="references-non-normative-style">
3457
-
3458
3217
  </xsl:attribute-set> <!-- references-non-normative-style -->
3459
3218
 
3460
3219
  <!-- Highlight.js syntax GitHub styles -->
@@ -3614,16 +3373,13 @@
3614
3373
  <!-- Index section styles -->
3615
3374
  <xsl:attribute-set name="indexsect-title-style">
3616
3375
  <xsl:attribute name="role">H1</xsl:attribute>
3617
-
3618
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3619
- <xsl:attribute name="span">all</xsl:attribute>
3620
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3621
-
3376
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3377
+ <xsl:attribute name="span">all</xsl:attribute>
3378
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3622
3379
  </xsl:attribute-set>
3623
3380
 
3624
3381
  <xsl:attribute-set name="indexsect-clause-title-style">
3625
3382
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3626
-
3627
3383
  </xsl:attribute-set>
3628
3384
 
3629
3385
  <!-- End Index section styles -->
@@ -3700,47 +3456,47 @@
3700
3456
  </xsl:template>
3701
3457
 
3702
3458
  <xsl:template name="processTables_Contents">
3703
- <tables>
3459
+ <mn:tables>
3704
3460
  <xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
3705
3461
  <xsl:choose>
3706
3462
  <xsl:when test="*[local-name() = 'fmt-name']">
3707
3463
  <xsl:variable name="fmt_name">
3708
3464
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
3709
3465
  </xsl:variable>
3710
- <table id="{@id}" alt-text="{normalize-space($fmt_name)}">
3466
+ <mn:table id="{@id}" alt-text="{normalize-space($fmt_name)}">
3711
3467
  <xsl:copy-of select="$fmt_name"/>
3712
- </table>
3468
+ </mn:table>
3713
3469
  </xsl:when>
3714
3470
  <xsl:otherwise>
3715
- <table id="{@id}" alt-text="{*[local-name() = 'name']}">
3471
+ <mn:table id="{@id}" alt-text="{*[local-name() = 'name']}">
3716
3472
  <xsl:copy-of select="*[local-name() = 'name']"/>
3717
- </table>
3473
+ </mn:table>
3718
3474
  </xsl:otherwise>
3719
3475
  </xsl:choose>
3720
3476
  </xsl:for-each>
3721
- </tables>
3477
+ </mn:tables>
3722
3478
  </xsl:template>
3723
3479
 
3724
3480
  <xsl:template name="processFigures_Contents">
3725
- <figures>
3481
+ <mn:figures>
3726
3482
  <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) != '']">
3727
3483
  <xsl:choose>
3728
3484
  <xsl:when test="*[local-name() = 'fmt-name']">
3729
3485
  <xsl:variable name="fmt_name">
3730
3486
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
3731
3487
  </xsl:variable>
3732
- <figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
3488
+ <mn:figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
3733
3489
  <xsl:copy-of select="$fmt_name"/>
3734
- </figure>
3490
+ </mn:figure>
3735
3491
  </xsl:when>
3736
3492
  <xsl:otherwise>
3737
- <figure id="{@id}" alt-text="{*[local-name() = 'name']}">
3493
+ <mn:figure id="{@id}" alt-text="{*[local-name() = 'name']}">
3738
3494
  <xsl:copy-of select="*[local-name() = 'name']"/>
3739
- </figure>
3495
+ </mn:figure>
3740
3496
  </xsl:otherwise>
3741
3497
  </xsl:choose>
3742
3498
  </xsl:for-each>
3743
- </figures>
3499
+ </mn:figures>
3744
3500
  </xsl:template>
3745
3501
 
3746
3502
  <xsl:template name="processPrefaceSectionsDefault">
@@ -3759,7 +3515,6 @@
3759
3515
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
3760
3516
  <xsl:sort select="@displayorder" data-type="number"/>
3761
3517
  <xsl:apply-templates select="."/>
3762
-
3763
3518
  </xsl:for-each>
3764
3519
 
3765
3520
  <xsl:for-each select="/*/*[local-name()='annex']">
@@ -3866,7 +3621,6 @@
3866
3621
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
3867
3622
  <xsl:sort select="@displayorder" data-type="number"/>
3868
3623
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
3869
-
3870
3624
  </xsl:for-each>
3871
3625
  </xsl:element>
3872
3626
  </xsl:element>
@@ -4000,7 +3754,6 @@
4000
3754
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak">
4001
3755
  <xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
4002
3756
  </xsl:apply-templates>
4003
-
4004
3757
  </xsl:for-each>
4005
3758
  </xsl:element>
4006
3759
 
@@ -4040,19 +3793,17 @@
4040
3793
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
4041
3794
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
4042
3795
  <xsl:template match="text()" name="text">
4043
-
4044
- <xsl:choose>
4045
- <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
4046
- <xsl:otherwise>
4047
- <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))"/>
4048
- <xsl:call-template name="replace_fo_inline_tags">
4049
- <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
4050
- <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
4051
- <xsl:with-param name="text" select="$text"/>
4052
- </xsl:call-template>
4053
- </xsl:otherwise>
4054
- </xsl:choose>
4055
-
3796
+ <xsl:choose>
3797
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
3798
+ <xsl:otherwise>
3799
+ <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))"/>
3800
+ <xsl:call-template name="replace_fo_inline_tags">
3801
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
3802
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
3803
+ <xsl:with-param name="text" select="$text"/>
3804
+ </xsl:call-template>
3805
+ </xsl:otherwise>
3806
+ </xsl:choose>
4056
3807
  </xsl:template>
4057
3808
 
4058
3809
  <xsl:template name="replace_fo_inline_tags">
@@ -4106,7 +3857,7 @@
4106
3857
  <xsl:with-param name="keep_sep">true</xsl:with-param>
4107
3858
  </xsl:call-template>
4108
3859
  </xsl:variable>
4109
- <xsl:for-each select="xalan:nodeset($items)/item">
3860
+ <xsl:for-each select="xalan:nodeset($items)/mn:item">
4110
3861
  <xsl:choose>
4111
3862
  <xsl:when test=". = $sep">
4112
3863
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
@@ -4135,17 +3886,13 @@
4135
3886
  </xsl:template> <!-- copyright-statement -->
4136
3887
 
4137
3888
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
4138
-
4139
- <!-- process in the template 'title' -->
4140
- <xsl:call-template name="title"/>
4141
-
3889
+ <!-- process in the template 'title' -->
3890
+ <xsl:call-template name="title"/>
4142
3891
  </xsl:template> <!-- copyright-statement//title -->
4143
3892
 
4144
3893
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
4145
-
4146
- <!-- process in the template 'paragraph' -->
4147
- <xsl:call-template name="paragraph"/>
4148
-
3894
+ <!-- process in the template 'paragraph' -->
3895
+ <xsl:call-template name="paragraph"/>
4149
3896
  </xsl:template> <!-- copyright-statement//p -->
4150
3897
 
4151
3898
  <xsl:template match="*[local-name()='license-statement']">
@@ -4155,42 +3902,34 @@
4155
3902
  </xsl:template> <!-- license-statement -->
4156
3903
 
4157
3904
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
4158
-
4159
- <!-- process in the template 'title' -->
4160
- <xsl:call-template name="title"/>
4161
-
3905
+ <!-- process in the template 'title' -->
3906
+ <xsl:call-template name="title"/>
4162
3907
  </xsl:template> <!-- license-statement/title -->
4163
3908
 
4164
3909
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
4165
-
4166
- <!-- process in the template 'paragraph' -->
4167
- <xsl:call-template name="paragraph"/>
4168
-
3910
+ <!-- process in the template 'paragraph' -->
3911
+ <xsl:call-template name="paragraph"/>
4169
3912
  </xsl:template> <!-- license-statement/p -->
4170
3913
 
4171
3914
  <xsl:template match="*[local-name()='legal-statement']">
4172
3915
  <xsl:param name="isLegacy">false</xsl:param>
4173
3916
  <fo:block xsl:use-attribute-sets="legal-statement-style">
4174
-
4175
3917
  <xsl:apply-templates/>
4176
3918
  </fo:block>
4177
3919
  </xsl:template> <!-- legal-statement -->
4178
3920
 
4179
3921
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
4180
-
4181
- <!-- process in the template 'title' -->
4182
- <xsl:call-template name="title"/>
3922
+ <!-- process in the template 'title' -->
3923
+ <xsl:call-template name="title"/>
4183
3924
 
4184
3925
  </xsl:template> <!-- legal-statement/title -->
4185
3926
 
4186
3927
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
4187
3928
  <xsl:param name="margin"/>
4188
-
4189
- <!-- process in the template 'paragraph' -->
4190
- <xsl:call-template name="paragraph">
4191
- <xsl:with-param name="margin" select="$margin"/>
4192
- </xsl:call-template>
4193
-
3929
+ <!-- process in the template 'paragraph' -->
3930
+ <xsl:call-template name="paragraph">
3931
+ <xsl:with-param name="margin" select="$margin"/>
3932
+ </xsl:call-template>
4194
3933
  </xsl:template> <!-- legal-statement/p -->
4195
3934
 
4196
3935
  <xsl:template match="*[local-name()='feedback-statement']">
@@ -4200,20 +3939,16 @@
4200
3939
  </xsl:template> <!-- feedback-statement -->
4201
3940
 
4202
3941
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
4203
-
4204
- <!-- process in the template 'title' -->
4205
- <xsl:call-template name="title"/>
4206
-
3942
+ <!-- process in the template 'title' -->
3943
+ <xsl:call-template name="title"/>
4207
3944
  </xsl:template>
4208
3945
 
4209
3946
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
4210
3947
  <xsl:param name="margin"/>
4211
-
4212
- <!-- process in the template 'paragraph' -->
4213
- <xsl:call-template name="paragraph">
4214
- <xsl:with-param name="margin" select="$margin"/>
4215
- </xsl:call-template>
4216
-
3948
+ <!-- process in the template 'paragraph' -->
3949
+ <xsl:call-template name="paragraph">
3950
+ <xsl:with-param name="margin" select="$margin"/>
3951
+ </xsl:call-template>
4217
3952
  </xsl:template>
4218
3953
 
4219
3954
  <!-- ================================= -->
@@ -4266,7 +4001,6 @@
4266
4001
  <xsl:template match="*[local-name()='table']" name="table">
4267
4002
 
4268
4003
  <xsl:variable name="table-preamble">
4269
-
4270
4004
  </xsl:variable>
4271
4005
 
4272
4006
  <xsl:variable name="table">
@@ -4284,10 +4018,8 @@
4284
4018
 
4285
4019
  <!-- Display table's name before table as standalone block -->
4286
4020
  <!-- $namespace = 'iso' or -->
4287
-
4288
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
4289
-
4290
- <xsl:call-template name="table_name_fn_display"/>
4021
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
4022
+ <xsl:call-template name="table_name_fn_display"/>
4291
4023
 
4292
4024
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
4293
4025
 
@@ -4340,8 +4072,7 @@
4340
4072
 
4341
4073
  <xsl:variable name="table_width_default">100%</xsl:variable>
4342
4074
  <xsl:variable name="table_width">
4343
- <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
4344
- <xsl:value-of select="$table_width_default"/>
4075
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) --><xsl:value-of select="$table_width_default"/>
4345
4076
  </xsl:variable>
4346
4077
 
4347
4078
  <xsl:variable name="table_attributes">
@@ -4445,8 +4176,7 @@
4445
4176
 
4446
4177
  <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
4447
4178
 
4448
- <!-- https://github.com/metanorma/metanorma-plateau/issues/171 -->
4449
- <!-- table footer after table -->
4179
+ <!-- https://github.com/metanorma/metanorma-plateau/issues/171 --><!-- table footer after table -->
4450
4180
 
4451
4181
  <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
4452
4182
  <xsl:call-template name="insertTableFooterInSeparateTable">
@@ -4485,27 +4215,25 @@
4485
4215
  <xsl:when test="@width and @width != 'full-page-width' and @width != 'text-width'">
4486
4216
 
4487
4217
  <!-- centered table when table name is centered (see table-name-style) -->
4488
-
4489
- <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
4490
-
4491
- <fo:table-column column-width="proportional-column-width(1)"/>
4492
- <fo:table-column column-width="{@width}"/>
4493
- <fo:table-column column-width="proportional-column-width(1)"/>
4494
- <fo:table-body role="SKIP">
4495
- <fo:table-row role="SKIP">
4496
- <fo:table-cell column-number="2" role="SKIP">
4497
- <xsl:copy-of select="$table-preamble"/>
4498
- <fo:block role="SKIP">
4499
- <xsl:call-template name="setTrackChangesStyles">
4500
- <xsl:with-param name="isAdded" select="$isAdded"/>
4501
- <xsl:with-param name="isDeleted" select="$isDeleted"/>
4502
- </xsl:call-template>
4503
- <xsl:copy-of select="$table"/>
4504
- </fo:block>
4505
- </fo:table-cell>
4506
- </fo:table-row>
4507
- </fo:table-body>
4508
- </fo:table>
4218
+ <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
4219
+ <fo:table-column column-width="proportional-column-width(1)"/>
4220
+ <fo:table-column column-width="{@width}"/>
4221
+ <fo:table-column column-width="proportional-column-width(1)"/>
4222
+ <fo:table-body role="SKIP">
4223
+ <fo:table-row role="SKIP">
4224
+ <fo:table-cell column-number="2" role="SKIP">
4225
+ <xsl:copy-of select="$table-preamble"/>
4226
+ <fo:block role="SKIP">
4227
+ <xsl:call-template name="setTrackChangesStyles">
4228
+ <xsl:with-param name="isAdded" select="$isAdded"/>
4229
+ <xsl:with-param name="isDeleted" select="$isDeleted"/>
4230
+ </xsl:call-template>
4231
+ <xsl:copy-of select="$table"/>
4232
+ </fo:block>
4233
+ </fo:table-cell>
4234
+ </fo:table-row>
4235
+ </fo:table-body>
4236
+ </fo:table>
4509
4237
 
4510
4238
  </xsl:when>
4511
4239
  <xsl:otherwise>
@@ -4531,7 +4259,6 @@
4531
4259
  </xsl:template>
4532
4260
 
4533
4261
  <xsl:template name="setBordersTableArray">
4534
-
4535
4262
  </xsl:template>
4536
4263
 
4537
4264
  <!-- table/name-->
@@ -4540,51 +4267,50 @@
4540
4267
  <xsl:param name="cols-count"/>
4541
4268
  <xsl:if test="normalize-space() != ''">
4542
4269
 
4543
- <fo:block xsl:use-attribute-sets="table-name-style">
4544
-
4545
- <xsl:call-template name="refine_table-name-style">
4546
- <xsl:with-param name="continued" select="$continued"/>
4547
- </xsl:call-template>
4270
+ <fo:block xsl:use-attribute-sets="table-name-style">
4548
4271
 
4549
- <xsl:choose>
4550
- <xsl:when test="$continued = 'true'">
4272
+ <xsl:call-template name="refine_table-name-style">
4273
+ <xsl:with-param name="continued" select="$continued"/>
4274
+ </xsl:call-template>
4551
4275
 
4552
- </xsl:when>
4553
- <xsl:otherwise>
4554
- <xsl:apply-templates/>
4555
- </xsl:otherwise>
4556
- </xsl:choose>
4276
+ <xsl:choose>
4277
+ <xsl:when test="$continued = 'true'">
4278
+ </xsl:when>
4279
+ <xsl:otherwise>
4280
+ <xsl:apply-templates/>
4281
+ </xsl:otherwise>
4282
+ </xsl:choose>
4557
4283
 
4558
- </fo:block>
4284
+ </fo:block>
4559
4285
 
4560
- <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
4561
- <xsl:if test="$continued = 'true'">
4286
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
4287
+ <xsl:if test="$continued = 'true'">
4562
4288
 
4563
- <!-- to prevent the error 'THead element may contain only TR elements' -->
4289
+ <!-- to prevent the error 'THead element may contain only TR elements' -->
4564
4290
 
4565
- <xsl:choose>
4566
- <xsl:when test="string(number($cols-count)) != 'NaN'">
4567
- <fo:table width="100%" table-layout="fixed" role="SKIP">
4568
- <fo:table-body role="SKIP">
4569
- <fo:table-row>
4570
- <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
4571
- <fo:block text-align="right" role="SKIP">
4572
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
4573
- </fo:block>
4574
- </fo:table-cell>
4575
- </fo:table-row>
4576
- </fo:table-body>
4577
- </fo:table>
4578
- </xsl:when>
4579
- <xsl:otherwise>
4580
- <fo:block text-align="right">
4581
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
4582
- </fo:block>
4583
- </xsl:otherwise>
4584
- </xsl:choose>
4291
+ <xsl:choose>
4292
+ <xsl:when test="string(number($cols-count)) != 'NaN'">
4293
+ <fo:table width="100%" table-layout="fixed" role="SKIP">
4294
+ <fo:table-body role="SKIP">
4295
+ <fo:table-row>
4296
+ <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
4297
+ <fo:block text-align="right" role="SKIP">
4298
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
4299
+ </fo:block>
4300
+ </fo:table-cell>
4301
+ </fo:table-row>
4302
+ </fo:table-body>
4303
+ </fo:table>
4304
+ </xsl:when>
4305
+ <xsl:otherwise>
4306
+ <fo:block text-align="right">
4307
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
4308
+ </fo:block>
4309
+ </xsl:otherwise>
4310
+ </xsl:choose>
4585
4311
 
4586
- </xsl:if>
4587
- <!-- </xsl:if> -->
4312
+ </xsl:if>
4313
+ <!-- </xsl:if> -->
4588
4314
 
4589
4315
  </xsl:if>
4590
4316
  </xsl:template> <!-- table/name -->
@@ -4959,7 +4685,6 @@
4959
4685
  <xsl:template match="*[local-name()='thead']">
4960
4686
  <xsl:param name="cols-count"/>
4961
4687
  <fo:table-header>
4962
-
4963
4688
  <xsl:apply-templates/>
4964
4689
  </fo:table-header>
4965
4690
  </xsl:template> <!-- thead -->
@@ -4973,21 +4698,20 @@
4973
4698
 
4974
4699
  <xsl:call-template name="refine_table-header-title-style"/>
4975
4700
 
4976
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
4977
- <xsl:with-param name="continued">true</xsl:with-param>
4978
- <xsl:with-param name="cols-count" select="$cols-count"/>
4979
- </xsl:apply-templates>
4701
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
4702
+ <xsl:with-param name="continued">true</xsl:with-param>
4703
+ <xsl:with-param name="cols-count" select="$cols-count"/>
4704
+ </xsl:apply-templates>
4980
4705
 
4981
- <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
4982
- <fo:block role="SKIP"/>
4983
- </xsl:if>
4706
+ <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
4707
+ <fo:block role="SKIP"/>
4708
+ </xsl:if>
4984
4709
 
4985
4710
  </fo:table-cell>
4986
4711
  </fo:table-row>
4987
4712
  </xsl:template> <!-- table-header-title -->
4988
4713
 
4989
4714
  <xsl:template name="refine_table-header-title-style">
4990
-
4991
4715
  </xsl:template> <!-- refine_table-header-title-style -->
4992
4716
 
4993
4717
  <xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -5017,7 +4741,6 @@
5017
4741
  <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']"/>
5018
4742
 
5019
4743
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
5020
-
5021
4744
  </xsl:variable>
5022
4745
 
5023
4746
  <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
@@ -5079,36 +4802,26 @@
5079
4802
  <xsl:call-template name="setBordersTableArray"/>
5080
4803
 
5081
4804
  <!-- fn will be processed inside 'note' processing -->
5082
-
5083
- <!-- for BSI (not PAS) display Notes before footnotes -->
5084
-
5085
- <!-- except gb and bsi -->
5086
-
5087
- <xsl:apply-templates select="../*[local-name()='p']"/>
5088
- <xsl:apply-templates select="../*[local-name()='dl']"/>
5089
- <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
5090
- <xsl:apply-templates select="../*[local-name()='example']"/>
5091
- <xsl:apply-templates select="../*[local-name()='source']"/>
4805
+ <xsl:apply-templates select="../*[local-name()='p']"/>
4806
+ <xsl:apply-templates select="../*[local-name()='dl']"/>
4807
+ <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
4808
+ <xsl:apply-templates select="../*[local-name()='example']"/>
4809
+ <xsl:apply-templates select="../*[local-name()='source']"/>
5092
4810
 
5093
4811
  <xsl:variable name="isDisplayRowSeparator">
5094
-
5095
4812
  </xsl:variable>
5096
4813
 
5097
4814
  <!-- horizontal row separator -->
5098
4815
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
5099
4816
  <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
5100
4817
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
5101
-
5102
4818
  <xsl:call-template name="setBordersTableArray"/>
5103
4819
  <fo:block font-size="1pt"> </fo:block>
5104
4820
  </fo:block-container>
5105
4821
  </xsl:if>
5106
4822
  </xsl:if>
5107
4823
 
5108
- <!-- fn processing -->
5109
- <fo:block/><!-- display fn before 'source', see above -->
5110
-
5111
- <!-- for PAS display Notes after footnotes -->
4824
+ <!-- fn processing --><fo:block/><!-- display fn before 'source', see above -->
5112
4825
 
5113
4826
  </fo:table-cell>
5114
4827
  </fo:table-row>
@@ -5235,7 +4948,7 @@
5235
4948
  <xsl:with-param name="pText" select="$border_under_row_"/>
5236
4949
  </xsl:call-template>
5237
4950
  </xsl:variable>
5238
- <xsl:if test="xalan:nodeset($border_under_row)/item[. = normalize-space($row_num)]">
4951
+ <xsl:if test="xalan:nodeset($border_under_row)/mn:item[. = normalize-space($row_num)]">
5239
4952
  <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
5240
4953
  </xsl:if>
5241
4954
  </xsl:when>
@@ -5352,7 +5065,7 @@
5352
5065
  </xsl:variable>
5353
5066
  <xsl:variable name="quot">"</xsl:variable>
5354
5067
  <xsl:variable name="styles_">
5355
- <xsl:for-each select="xalan:nodeset($styles__)/item">
5068
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
5356
5069
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
5357
5070
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
5358
5071
  <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'">
@@ -5402,9 +5115,7 @@
5402
5115
  <fo:block role="SKIP">
5403
5116
 
5404
5117
  <xsl:if test="$isGenerateTableIF = 'true'">
5405
-
5406
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
5407
-
5118
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
5408
5119
  </xsl:if>
5409
5120
 
5410
5121
  <xsl:apply-templates/>
@@ -5419,25 +5130,23 @@
5419
5130
 
5420
5131
  <!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
5421
5132
  <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">
5133
+ <xsl:call-template name="setNamedDestination"/>
5134
+ <fo:block xsl:use-attribute-sets="table-note-style">
5135
+ <xsl:copy-of select="@id"/>
5422
5136
 
5423
- <xsl:call-template name="setNamedDestination"/>
5424
- <fo:block xsl:use-attribute-sets="table-note-style">
5425
- <xsl:copy-of select="@id"/>
5426
-
5427
- <xsl:call-template name="refine_table-note-style"/>
5428
-
5429
- <!-- Table's note/example name (NOTE, for example) -->
5430
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
5137
+ <xsl:call-template name="refine_table-note-style"/>
5431
5138
 
5432
- <xsl:call-template name="refine_table-note-name-style"/>
5139
+ <!-- Table's note/example name (NOTE, for example) -->
5140
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
5433
5141
 
5434
- <xsl:apply-templates select="*[local-name() = 'name']"/>
5142
+ <xsl:call-template name="refine_table-note-name-style"/>
5435
5143
 
5436
- </fo:inline>
5144
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
5437
5145
 
5438
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5439
- </fo:block>
5146
+ </fo:inline>
5440
5147
 
5148
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5149
+ </fo:block>
5441
5150
  </xsl:template> <!-- table/note -->
5442
5151
 
5443
5152
  <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">
@@ -5482,8 +5191,7 @@
5482
5191
  <xsl:variable name="current_fn_number" select="@reference"/>
5483
5192
 
5484
5193
  <xsl:variable name="current_fn_number_text">
5485
-
5486
- <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
5194
+ <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
5487
5195
 
5488
5196
  </xsl:variable>
5489
5197
 
@@ -5496,12 +5204,10 @@
5496
5204
  <xsl:choose>
5497
5205
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
5498
5206
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
5499
-
5500
5207
  </fn_styles>
5501
5208
  </xsl:when>
5502
5209
  <xsl:otherwise>
5503
5210
  <fn_styles xsl:use-attribute-sets="fn-num-style">
5504
-
5505
5211
  </fn_styles>
5506
5212
  </xsl:otherwise>
5507
5213
  </xsl:choose>
@@ -5519,7 +5225,6 @@
5519
5225
  <xsl:with-param name="element">
5520
5226
  <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 -->
5521
5227
  <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
5522
-
5523
5228
  <xsl:copy-of select="$current_fn_number_text"/>
5524
5229
 
5525
5230
  </fo:inline>
@@ -5557,10 +5262,9 @@
5557
5262
  <here><xsl:copy-of select="$footnotes"/></here> -->
5558
5263
  <xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
5559
5264
  </xsl:variable>
5560
-
5561
- <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
5562
- <xsl:copy-of select="$fn_block"/>
5563
- </fo:block>
5265
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
5266
+ <xsl:copy-of select="$fn_block"/>
5267
+ </fo:block>
5564
5268
 
5565
5269
  </fo:block-container>
5566
5270
  </fo:footnote-body>
@@ -5637,21 +5341,20 @@
5637
5341
  <xsl:variable name="reference" select="@reference"/>
5638
5342
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
5639
5343
  <xsl:for-each select="..//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
5344
+ <fo:block xsl:use-attribute-sets="table-fn-style">
5345
+ <xsl:copy-of select="@id"/>
5346
+ <xsl:call-template name="refine_table-fn-style"/>
5640
5347
 
5641
- <fo:block xsl:use-attribute-sets="table-fn-style">
5642
- <xsl:copy-of select="@id"/>
5643
- <xsl:call-template name="refine_table-fn-style"/>
5644
-
5645
- <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
5646
- <xsl:with-param name="process">true</xsl:with-param>
5647
- </xsl:apply-templates>
5348
+ <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
5349
+ <xsl:with-param name="process">true</xsl:with-param>
5350
+ </xsl:apply-templates>
5648
5351
 
5649
- <fo:inline xsl:use-attribute-sets="table-fn-body-style">
5650
- <!-- <xsl:copy-of select="./node()"/> -->
5651
- <xsl:apply-templates/>
5652
- </fo:inline>
5352
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
5353
+ <!-- <xsl:copy-of select="./node()"/> -->
5354
+ <xsl:apply-templates/>
5355
+ </fo:inline>
5653
5356
 
5654
- </fo:block>
5357
+ </fo:block>
5655
5358
 
5656
5359
  <!-- </xsl:if> -->
5657
5360
  </xsl:for-each>
@@ -5704,9 +5407,7 @@
5704
5407
  <xsl:param name="process">false</xsl:param>
5705
5408
  <xsl:if test="$process = 'true'">
5706
5409
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
5707
-
5708
- <xsl:attribute name="padding-right">2mm</xsl:attribute>
5709
-
5410
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
5710
5411
  </xsl:if>
5711
5412
  </xsl:template>
5712
5413
 
@@ -5790,7 +5491,6 @@
5790
5491
  <xsl:if test="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
5791
5492
 
5792
5493
  <xsl:variable name="key_iso">
5793
-
5794
5494
  </xsl:variable>
5795
5495
 
5796
5496
  <fo:block>
@@ -5836,7 +5536,6 @@
5836
5536
  <fo:table width="95%" table-layout="fixed">
5837
5537
  <xsl:if test="normalize-space($key_iso) = 'true'">
5838
5538
  <xsl:attribute name="font-size">10pt</xsl:attribute>
5839
-
5840
5539
  </xsl:if>
5841
5540
  <xsl:choose>
5842
5541
  <!-- if there 'dl', then set same columns width -->
@@ -5860,30 +5559,24 @@
5860
5559
  <fo:table-row>
5861
5560
  <fo:table-cell>
5862
5561
  <fo:block>
5863
-
5864
- <xsl:attribute name="margin-left"><xsl:value-of select="$tableAnnotationIndent"/></xsl:attribute>
5865
- <xsl:attribute name="font-weight">bold</xsl:attribute>
5866
-
5867
- <fo:inline id="{@id}">
5868
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
5869
- <!-- <xsl:value-of select="@reference"/> -->
5870
- <!-- <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/> -->
5871
- <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']/node()"/>
5872
- </fo:inline>
5562
+ <xsl:attribute name="margin-left"><xsl:value-of select="$tableAnnotationIndent"/></xsl:attribute>
5563
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
5564
+ <fo:inline id="{@id}">
5565
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
5566
+ <!-- <xsl:value-of select="@reference"/> -->
5567
+ <!-- <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/> -->
5568
+ <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']/node()"/>
5569
+ </fo:inline>
5873
5570
 
5874
5571
  </fo:block>
5875
5572
  </fo:table-cell>
5876
5573
  <fo:table-cell>
5877
5574
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
5878
5575
  <xsl:if test="normalize-space($key_iso) = 'true'">
5879
-
5880
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
5881
-
5882
- </xsl:if>
5883
-
5884
- <xsl:attribute name="margin-left">5mm</xsl:attribute>
5885
5576
  <xsl:attribute name="margin-bottom">0</xsl:attribute>
5886
-
5577
+ </xsl:if>
5578
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
5579
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
5887
5580
  <!-- <xsl:copy-of select="./node()"/> -->
5888
5581
  <xsl:apply-templates/>
5889
5582
  </fo:block>
@@ -5933,11 +5626,9 @@
5933
5626
  <!-- figure/dl[@key = 'true']/dt/p/sup -->
5934
5627
  <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">
5935
5628
  <xsl:variable name="key_iso">
5936
-
5937
5629
  </xsl:variable>
5938
5630
  <xsl:if test="normalize-space($key_iso) = 'true'">
5939
5631
  <xsl:attribute name="font-size">10pt</xsl:attribute>
5940
-
5941
5632
  </xsl:if>
5942
5633
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
5943
5634
  <!-- <xsl:value-of select="@reference"/> -->
@@ -5983,8 +5674,7 @@
5983
5674
  <xsl:text>※</xsl:text>
5984
5675
  </xsl:if> -->
5985
5676
  <!-- <xsl:value-of select="@reference"/> -->
5986
-
5987
- <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
5677
+ <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
5988
5678
 
5989
5679
  <!-- <xsl:if test="$namespace = 'bsi'">
5990
5680
  <xsl:text>)</xsl:text>
@@ -6056,15 +5746,13 @@
6056
5746
  </xsl:if>
6057
5747
 
6058
5748
  <xsl:call-template name="setBlockSpanAll"/>
6059
-
6060
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
6061
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
6062
- </xsl:if>
6063
-
6064
- <xsl:if test="@key = 'true' and (ancestor::*[local-name() = 'tfoot'] or parent::*[local-name() = 'figure'])">
6065
- <xsl:attribute name="margin-left"><xsl:value-of select="$tableAnnotationIndent"/></xsl:attribute>
6066
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
6067
- </xsl:if>
5749
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
5750
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
5751
+ </xsl:if>
5752
+ <xsl:if test="@key = 'true' and (ancestor::*[local-name() = 'tfoot'] or parent::*[local-name() = 'figure'])">
5753
+ <xsl:attribute name="margin-left"><xsl:value-of select="$tableAnnotationIndent"/></xsl:attribute>
5754
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
5755
+ </xsl:if>
6068
5756
 
6069
5757
  <xsl:if test="ancestor::*[local-name() = 'sourcecode']">
6070
5758
  <!-- set font-size as sourcecode font-size -->
@@ -6085,7 +5773,6 @@
6085
5773
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
6086
5774
  </xsl:choose>
6087
5775
  </xsl:attribute>
6088
-
6089
5776
  </xsl:if>
6090
5777
 
6091
5778
  <xsl:call-template name="setTrackChangesStyles">
@@ -6094,37 +5781,32 @@
6094
5781
  </xsl:call-template>
6095
5782
 
6096
5783
  <fo:block-container margin-left="0mm" role="SKIP">
6097
-
6098
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
5784
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
6099
5785
 
6100
5786
  <xsl:variable name="parent" select="local-name(..)"/>
6101
5787
 
6102
- <xsl:variable name="key_iso">
6103
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
5788
+ <xsl:variable name="key_iso"> <!-- and (not(../@class) or ../@class !='pseudocode') -->
6104
5789
  </xsl:variable>
6105
5790
 
6106
5791
  <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(*[local-name()='dt']) = 1)"/>
6107
5792
 
6108
5793
  <xsl:choose>
6109
5794
  <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
6110
-
6111
- <fo:block margin-bottom="12pt" text-align="left">
6112
-
6113
- <!-- <xsl:variable name="title-where">
5795
+ <fo:block margin-bottom="12pt" text-align="left">
5796
+ <!-- <xsl:variable name="title-where">
6114
5797
  <xsl:call-template name="getLocalizedString">
6115
5798
  <xsl:with-param name="key">where</xsl:with-param>
6116
5799
  </xsl:call-template>
6117
5800
  </xsl:variable>
6118
5801
  <xsl:value-of select="$title-where"/> -->
6119
- <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
6120
- <xsl:text> </xsl:text>
6121
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
6122
- <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
6123
- <xsl:text> </xsl:text>
6124
- </xsl:if>
6125
- <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
6126
- </fo:block>
6127
-
5802
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
5803
+ <xsl:text> </xsl:text>
5804
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
5805
+ <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
5806
+ <xsl:text> </xsl:text>
5807
+ </xsl:if>
5808
+ <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
5809
+ </fo:block>
6128
5810
  </xsl:when> <!-- END: only one component -->
6129
5811
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
6130
5812
  <fo:block margin-bottom="12pt" text-align="left">
@@ -6144,19 +5826,17 @@
6144
5826
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
6145
5827
  <!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
6146
5828
  <xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
5829
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
6147
5830
 
6148
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
6149
-
6150
- <xsl:call-template name="refine_figure_key_style"/>
6151
-
6152
- <xsl:variable name="title-key">
6153
- <xsl:call-template name="getLocalizedString">
6154
- <xsl:with-param name="key">key</xsl:with-param>
6155
- </xsl:call-template>
6156
- </xsl:variable>
6157
- <xsl:value-of select="$title-key"/>
6158
- </fo:block>
5831
+ <xsl:call-template name="refine_figure_key_style"/>
6159
5832
 
5833
+ <xsl:variable name="title-key">
5834
+ <xsl:call-template name="getLocalizedString">
5835
+ <xsl:with-param name="key">key</xsl:with-param>
5836
+ </xsl:call-template>
5837
+ </xsl:variable>
5838
+ <xsl:value-of select="$title-key"/>
5839
+ </fo:block>
6160
5840
  </xsl:if>
6161
5841
  </xsl:when> <!-- END: definition list in a figure -->
6162
5842
  </xsl:choose>
@@ -6189,12 +5869,10 @@
6189
5869
  <xsl:if test="$isGenerateTableIF = 'true'">
6190
5870
  <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
6191
5871
  </xsl:if>
6192
-
6193
5872
  <xsl:choose>
6194
5873
  <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
6195
5874
  <xsl:when test="normalize-space($key_iso) = 'true'">
6196
5875
  <xsl:attribute name="font-size">10pt</xsl:attribute>
6197
-
6198
5876
  </xsl:when>
6199
5877
  </xsl:choose>
6200
5878
 
@@ -6299,46 +5977,44 @@
6299
5977
  <xsl:call-template name="getMaxLength_dt"/>
6300
5978
  </xsl:variable>
6301
5979
 
6302
- <xsl:variable name="isContainsKeepTogetherTag_">
6303
- false
5980
+ <xsl:variable name="isContainsKeepTogetherTag_">false
6304
5981
  </xsl:variable>
6305
5982
  <xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
6306
5983
  <!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
6307
-
6308
- <xsl:choose>
6309
- <!-- https://github.com/metanorma/metanorma-plateau/issues/171 -->
6310
- <xsl:when test="@key = 'true' and (ancestor::*[local-name() = 'tfoot'] or parent::*[local-name() = 'figure'])"> <!-- and not(xalan:nodeset($colwidths)//column) -->
6311
- <xsl:variable name="dt_nodes">
6312
- <xsl:for-each select="*[local-name() = 'dt']">
6313
- <xsl:apply-templates select="." mode="dt_clean"/>
6314
- </xsl:for-each>
6315
- </xsl:variable>
6316
- <!-- <xsl:copy-of select="$dt_nodes"/> -->
6317
- <xsl:variable name="dt_length_max">
6318
- <xsl:for-each select="xalan:nodeset($dt_nodes)//*[local-name() = 'dt']">
6319
- <xsl:sort select="string-length(normalize-space())" data-type="number" order="descending"/>
6320
- <xsl:if test="position() = 1"><xsl:value-of select="string-length(normalize-space())"/></xsl:if>
6321
- </xsl:for-each>
6322
- </xsl:variable>
6323
- <xsl:variable name="col1_percent_" select="number($dt_length_max) + 1"/>
6324
- <xsl:variable name="col1_percent">
6325
- <xsl:choose>
6326
- <xsl:when test="$col1_percent_ &gt; 50">50</xsl:when>
6327
- <xsl:otherwise><xsl:value-of select="$col1_percent_"/></xsl:otherwise>
6328
- </xsl:choose>
6329
- </xsl:variable>
6330
- <fo:table-column column-width="{$col1_percent}%"/>
6331
- <fo:table-column column-width="{100 - $col1_percent}%"/>
6332
- </xsl:when>
6333
- <xsl:otherwise>
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>
6339
- </xsl:otherwise>
6340
- </xsl:choose>
6341
- <!-- $namespace = 'plateau' -->
5984
+ <xsl:choose>
5985
+ <!-- https://github.com/metanorma/metanorma-plateau/issues/171 -->
5986
+ <xsl:when test="@key = 'true' and (ancestor::*[local-name() = 'tfoot'] or parent::*[local-name() = 'figure'])"> <!-- and not(xalan:nodeset($colwidths)//column) -->
5987
+ <xsl:variable name="dt_nodes">
5988
+ <xsl:for-each select="*[local-name() = 'dt']">
5989
+ <xsl:apply-templates select="." mode="dt_clean"/>
5990
+ </xsl:for-each>
5991
+ </xsl:variable>
5992
+ <!-- <xsl:copy-of select="$dt_nodes"/> -->
5993
+ <xsl:variable name="dt_length_max">
5994
+ <xsl:for-each select="xalan:nodeset($dt_nodes)//*[local-name() = 'dt']">
5995
+ <xsl:sort select="string-length(normalize-space())" data-type="number" order="descending"/>
5996
+ <xsl:if test="position() = 1"><xsl:value-of select="string-length(normalize-space())"/></xsl:if>
5997
+ </xsl:for-each>
5998
+ </xsl:variable>
5999
+ <xsl:variable name="col1_percent_" select="number($dt_length_max) + 1"/>
6000
+ <xsl:variable name="col1_percent">
6001
+ <xsl:choose>
6002
+ <xsl:when test="$col1_percent_ &gt; 50">50</xsl:when>
6003
+ <xsl:otherwise><xsl:value-of select="$col1_percent_"/></xsl:otherwise>
6004
+ </xsl:choose>
6005
+ </xsl:variable>
6006
+ <fo:table-column column-width="{$col1_percent}%"/>
6007
+ <fo:table-column column-width="{100 - $col1_percent}%"/>
6008
+ </xsl:when>
6009
+ <xsl:otherwise>
6010
+ <xsl:call-template name="setColumnWidth_dl">
6011
+ <xsl:with-param name="colwidths" select="$colwidths"/>
6012
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
6013
+ <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
6014
+ </xsl:call-template>
6015
+ </xsl:otherwise>
6016
+ </xsl:choose>
6017
+ <!-- $namespace = 'plateau' -->
6342
6018
 
6343
6019
  <fo:table-body>
6344
6020
 
@@ -6389,21 +6065,17 @@
6389
6065
  </xsl:template>
6390
6066
 
6391
6067
  <xsl:template name="refine_dl_formula_where_style">
6392
-
6393
6068
  </xsl:template> <!-- refine_dl_formula_where_style -->
6394
6069
 
6395
6070
  <xsl:template name="refine_figure_key_style">
6396
-
6397
6071
  </xsl:template> <!-- refine_figure_key_style -->
6398
6072
 
6399
6073
  <xsl:template name="refine_multicomponent_style">
6400
6074
  <xsl:variable name="parent" select="local-name(..)"/>
6401
-
6402
6075
  </xsl:template> <!-- refine_multicomponent_style -->
6403
6076
 
6404
6077
  <xsl:template name="refine_multicomponent_block_style">
6405
6078
  <xsl:variable name="parent" select="local-name(..)"/>
6406
-
6407
6079
  </xsl:template> <!-- refine_multicomponent_block_style -->
6408
6080
 
6409
6081
  <!-- ignore 'p' with 'where' in formula, before 'dl' -->
@@ -6414,12 +6086,11 @@
6414
6086
  <xsl:param name="process">false</xsl:param>
6415
6087
  <xsl:if test="$process = 'true'">
6416
6088
  <fo:block xsl:use-attribute-sets="dl-name-style">
6417
-
6418
- <xsl:if test="ancestor::*[local-name() = 'tfoot'] and ../@key = 'true'">
6419
- <xsl:attribute name="margin-left">-<xsl:value-of select="$tableAnnotationIndent"/></xsl:attribute>
6420
- <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
6421
- <xsl:attribute name="font-weight">bold</xsl:attribute>
6422
- </xsl:if>
6089
+ <xsl:if test="ancestor::*[local-name() = 'tfoot'] and ../@key = 'true'">
6090
+ <xsl:attribute name="margin-left">-<xsl:value-of select="$tableAnnotationIndent"/></xsl:attribute>
6091
+ <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
6092
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6093
+ </xsl:if>
6423
6094
 
6424
6095
  <xsl:apply-templates/>
6425
6096
  </fo:block>
@@ -6596,14 +6267,11 @@
6596
6267
  <xsl:attribute name="id">
6597
6268
  <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
6598
6269
  </xsl:attribute>
6599
-
6600
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
6601
- <xsl:with-param name="process">true</xsl:with-param>
6602
- </xsl:apply-templates>
6603
-
6270
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
6271
+ <xsl:with-param name="process">true</xsl:with-param>
6272
+ </xsl:apply-templates>
6604
6273
  </td>
6605
6274
  </tr>
6606
-
6607
6275
  </xsl:template>
6608
6276
 
6609
6277
  <!-- Definition's term -->
@@ -6612,7 +6280,6 @@
6612
6280
  <xsl:param name="split_keep-within-line"/>
6613
6281
 
6614
6282
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
6615
-
6616
6283
  <xsl:call-template name="insert_dt_cell">
6617
6284
  <xsl:with-param name="key_iso" select="$key_iso"/>
6618
6285
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -6634,7 +6301,6 @@
6634
6301
  <!-- border is mandatory, to calculate real width -->
6635
6302
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
6636
6303
  <xsl:attribute name="text-align">left</xsl:attribute>
6637
-
6638
6304
  </xsl:if>
6639
6305
 
6640
6306
  <xsl:call-template name="refine_dt-cell-style"/>
@@ -6644,9 +6310,7 @@
6644
6310
 
6645
6311
  <xsl:choose>
6646
6312
  <xsl:when test="$isGenerateTableIF = 'true'">
6647
-
6648
- <xsl:copy-of select="@id"/>
6649
-
6313
+ <xsl:copy-of select="@id"/>
6650
6314
  </xsl:when>
6651
6315
  <xsl:otherwise>
6652
6316
  <xsl:copy-of select="@id"/>
@@ -6683,9 +6347,7 @@
6683
6347
  <fo:block role="SKIP">
6684
6348
 
6685
6349
  <xsl:if test="$isGenerateTableIF = 'true'">
6686
-
6687
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
6688
-
6350
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
6689
6351
  </xsl:if>
6690
6352
 
6691
6353
  <xsl:choose>
@@ -6833,7 +6495,6 @@
6833
6495
  </xsl:template>
6834
6496
 
6835
6497
  <xsl:template name="refine_italic_style">
6836
-
6837
6498
  </xsl:template>
6838
6499
 
6839
6500
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
@@ -6849,7 +6510,6 @@
6849
6510
  </xsl:template>
6850
6511
 
6851
6512
  <xsl:template name="refine_strong_style">
6852
-
6853
6513
  <xsl:if test="ancestor::*['preferred']">
6854
6514
  <xsl:attribute name="role">SKIP</xsl:attribute>
6855
6515
  </xsl:if>
@@ -6874,10 +6534,7 @@
6874
6534
  <xsl:template match="*[local-name()='tt']">
6875
6535
  <fo:inline xsl:use-attribute-sets="tt-style">
6876
6536
 
6877
- <xsl:variable name="_font-size">
6878
-
6879
- <!-- inherit -->
6880
-
6537
+ <xsl:variable name="_font-size"> <!-- inherit -->
6881
6538
  </xsl:variable>
6882
6539
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
6883
6540
  <xsl:if test="$font-size != ''">
@@ -7093,8 +6750,7 @@
7093
6750
  </xsl:otherwise>
7094
6751
  </xsl:choose>
7095
6752
  </xsl:variable>
7096
- <xsl:variable name="ratio_">
7097
- 0.75
6753
+ <xsl:variable name="ratio_">0.75
7098
6754
  </xsl:variable>
7099
6755
  <xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
7100
6756
  <fo:inline font-size="{$ratio * 100}%" role="SKIP">
@@ -7184,7 +6840,7 @@
7184
6840
 
7185
6841
  <xsl:variable name="quot">"</xsl:variable>
7186
6842
  <xsl:variable name="styles_">
7187
- <xsl:for-each select="xalan:nodeset($styles__)/item">
6843
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
7188
6844
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
7189
6845
  <xsl:variable name="value_" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
7190
6846
  <xsl:variable name="value">
@@ -7196,7 +6852,7 @@
7196
6852
  </xsl:otherwise>
7197
6853
  </xsl:choose>
7198
6854
  </xsl:variable>
7199
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
6855
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
7200
6856
  <style name="{$key}"><xsl:value-of select="$value"/></style>
7201
6857
  </xsl:if>
7202
6858
  <xsl:if test="$key = 'text-indent'">
@@ -7210,7 +6866,6 @@
7210
6866
  <fo:inline>
7211
6867
  <xsl:for-each select="$styles/style">
7212
6868
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
7213
-
7214
6869
  </xsl:for-each>
7215
6870
  <xsl:apply-templates/>
7216
6871
  </fo:inline>
@@ -8197,10 +7852,9 @@
8197
7852
  <xsl:variable name="mathml_content">
8198
7853
  <xsl:apply-templates select="." mode="mathml_actual_text"/>
8199
7854
  </xsl:variable>
8200
-
8201
- <xsl:call-template name="mathml_instream_object">
8202
- <xsl:with-param name="mathml_content" select="$mathml_content"/>
8203
- </xsl:call-template>
7855
+ <xsl:call-template name="mathml_instream_object">
7856
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
7857
+ </xsl:call-template>
8204
7858
 
8205
7859
  </fo:inline>
8206
7860
  </xsl:template>
@@ -8234,7 +7888,6 @@
8234
7888
  <xsl:template name="getMathml_asciimath_text">
8235
7889
  <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
8236
7890
  <xsl:variable name="latexmath">
8237
-
8238
7891
  </xsl:variable>
8239
7892
  <xsl:variable name="asciimath_text_following">
8240
7893
  <xsl:choose>
@@ -8307,7 +7960,6 @@
8307
7960
  </xsl:template>
8308
7961
 
8309
7962
  <xsl:template name="refine_mathml_insteam_object_style">
8310
-
8311
7963
  </xsl:template> <!-- refine_mathml_insteam_object_style -->
8312
7964
 
8313
7965
  <xsl:template match="mathml:*" mode="mathml_actual_text">
@@ -8705,7 +8357,6 @@
8705
8357
  <xsl:variable name="annotation-id" select="@id"/>
8706
8358
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
8707
8359
  <fo:block id="{$annotation-id}" white-space="nowrap">
8708
-
8709
8360
  <fo:inline>
8710
8361
  <xsl:apply-templates>
8711
8362
  <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
@@ -8734,7 +8385,6 @@
8734
8385
  <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'])">
8735
8386
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
8736
8387
  </xsl:if>
8737
-
8738
8388
  <xsl:if test="parent::*[local-name() = 'add']">
8739
8389
  <xsl:call-template name="append_add-style"/>
8740
8390
  </xsl:if>
@@ -8745,8 +8395,7 @@
8745
8395
  </xsl:template>
8746
8396
 
8747
8397
  <!-- command between two xref points to non-standard bibitem -->
8748
- <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']]]">
8749
- <xsl:value-of select="."/>
8398
+ <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="."/>
8750
8399
  </xsl:template>
8751
8400
 
8752
8401
  <!-- ====== -->
@@ -8761,7 +8410,6 @@
8761
8410
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
8762
8411
  </xsl:choose>
8763
8412
  </xsl:attribute>
8764
-
8765
8413
  </xsl:if>
8766
8414
  <fo:block-container margin-left="0mm" role="SKIP">
8767
8415
  <xsl:call-template name="setNamedDestination"/>
@@ -8851,57 +8499,52 @@
8851
8499
 
8852
8500
  <xsl:template match="*[local-name() = 'note']" name="note">
8853
8501
 
8854
- <xsl:call-template name="setNamedDestination"/>
8855
-
8856
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8857
-
8858
- <xsl:call-template name="setBlockSpanAll"/>
8859
-
8860
- <xsl:call-template name="refine_note-style"/>
8502
+ <xsl:call-template name="setNamedDestination"/>
8861
8503
 
8862
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8504
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8863
8505
 
8864
- <fo:block>
8506
+ <xsl:call-template name="setBlockSpanAll"/>
8865
8507
 
8866
- <xsl:call-template name="refine_note_block_style"/>
8508
+ <xsl:call-template name="refine_note-style"/>
8867
8509
 
8868
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8510
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8511
+ <fo:block>
8869
8512
 
8870
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
8513
+ <xsl:call-template name="refine_note_block_style"/>
8871
8514
 
8872
- <xsl:call-template name="refine_note-name-style"/>
8515
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8873
8516
 
8874
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8875
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8876
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8877
- <xsl:call-template name="append_add-style"/>
8878
- </xsl:if>
8517
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
8879
8518
 
8880
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8881
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8882
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8883
- <xsl:with-param name="skip">false</xsl:with-param>
8884
- </xsl:apply-templates>
8885
- </xsl:if>
8519
+ <xsl:call-template name="refine_note-name-style"/>
8886
8520
 
8887
- <xsl:apply-templates select="*[local-name() = 'name']"/>
8521
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8522
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8523
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8524
+ <xsl:call-template name="append_add-style"/>
8525
+ </xsl:if>
8888
8526
 
8889
- </fo:inline>
8527
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8528
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8529
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8530
+ <xsl:with-param name="skip">false</xsl:with-param>
8531
+ </xsl:apply-templates>
8532
+ </xsl:if>
8890
8533
 
8891
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8892
- </fo:block>
8534
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8893
8535
 
8894
- </fo:block-container>
8895
- </fo:block-container>
8536
+ </fo:inline>
8896
8537
 
8538
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8539
+ </fo:block>
8540
+ </fo:block-container>
8541
+ </fo:block-container>
8897
8542
  </xsl:template>
8898
8543
 
8899
8544
  <xsl:template name="refine_note_block_style">
8900
-
8901
- <xsl:if test="ancestor::*[local-name() = 'figure']">
8902
- <xsl:attribute name="margin-left"><xsl:value-of select="$tableAnnotationIndent"/></xsl:attribute>
8903
- </xsl:if>
8904
-
8545
+ <xsl:if test="ancestor::*[local-name() = 'figure']">
8546
+ <xsl:attribute name="margin-left"><xsl:value-of select="$tableAnnotationIndent"/></xsl:attribute>
8547
+ </xsl:if>
8905
8548
  </xsl:template> <!-- refine_note_block_style -->
8906
8549
 
8907
8550
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
@@ -8954,7 +8597,6 @@
8954
8597
  <xsl:value-of select="$sfx"/>
8955
8598
  </xsl:when>
8956
8599
  <xsl:otherwise>
8957
-
8958
8600
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
8959
8601
  <!-- <xsl:if test="$namespace = 'ieee'">
8960
8602
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -8962,7 +8604,6 @@
8962
8604
  <!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
8963
8605
  <xsl:text>:</xsl:text>
8964
8606
  </xsl:if> -->
8965
-
8966
8607
  <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
8967
8608
  <xsl:text> – </xsl:text> en dash &#x2013;
8968
8609
  </xsl:if> -->
@@ -8983,7 +8624,6 @@
8983
8624
  <xsl:value-of select="$sfx"/>
8984
8625
  </xsl:when>
8985
8626
  <xsl:otherwise>
8986
-
8987
8627
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
8988
8628
  <!-- <xsl:if test="$namespace = 'ieee'">
8989
8629
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -9039,7 +8679,6 @@
9039
8679
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
9040
8680
 
9041
8681
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
9042
-
9043
8682
  </xsl:if>
9044
8683
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9045
8684
  </fo:block>
@@ -9079,8 +8718,7 @@
9079
8718
  <!-- Example: Dimensions in millimeters -->
9080
8719
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
9081
8720
 
9082
- <xsl:variable name="show_figure_key_in_block_container">
9083
- true
8721
+ <xsl:variable name="show_figure_key_in_block_container">true
9084
8722
  </xsl:variable>
9085
8723
 
9086
8724
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
@@ -9095,11 +8733,9 @@
9095
8733
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
9096
8734
  <xsl:call-template name="showFigureKey"/>
9097
8735
  </xsl:if>
9098
-
9099
- <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
8736
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
9100
8737
 
9101
8738
  </fo:block-container>
9102
-
9103
8739
  </xsl:template>
9104
8740
 
9105
8741
  <xsl:template name="showFigureKey">
@@ -9137,13 +8773,12 @@
9137
8773
  <!-- SOURCE: ... -->
9138
8774
  <!-- figure/source -->
9139
8775
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
9140
-
9141
- <xsl:call-template name="termsource"/>
9142
-
8776
+ <xsl:call-template name="termsource"/>
9143
8777
  </xsl:template>
9144
8778
 
9145
8779
  <xsl:template match="*[local-name() = 'image']">
9146
8780
  <xsl:param name="indent">0</xsl:param>
8781
+ <xsl:param name="logo_width"/>
9147
8782
  <xsl:variable name="isAdded" select="../@added"/>
9148
8783
  <xsl:variable name="isDeleted" select="../@deleted"/>
9149
8784
  <xsl:choose>
@@ -9165,9 +8800,18 @@
9165
8800
 
9166
8801
  <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
9167
8802
 
9168
- <!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
9169
8803
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
9170
8804
 
8805
+ <xsl:if test="parent::*[local-name() = 'logo']"> <!-- publisher's logo -->
8806
+ <xsl:attribute name="width">100%</xsl:attribute>
8807
+ <xsl:if test="normalize-space($logo_width) != ''">
8808
+ <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
8809
+ </xsl:if>
8810
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8811
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8812
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
8813
+ </xsl:if>
8814
+
9171
8815
  <xsl:variable name="width">
9172
8816
  <xsl:call-template name="setImageWidth"/>
9173
8817
  </xsl:variable>
@@ -9245,8 +8889,7 @@
9245
8889
  </xsl:call-template>
9246
8890
  </xsl:variable>
9247
8891
 
9248
- <xsl:variable name="scaleRatio">
9249
- 1
8892
+ <xsl:variable name="scaleRatio">1
9250
8893
  </xsl:variable>
9251
8894
 
9252
8895
  <xsl:if test="number($scale) &lt; 100">
@@ -9357,18 +9000,14 @@
9357
9000
  </xsl:variable>
9358
9001
 
9359
9002
  <xsl:variable name="image_width_effective">
9360
-
9361
- <xsl:value-of select="$width_effective - number($indent_left)"/>
9362
-
9003
+ <xsl:value-of select="$width_effective - number($indent_left)"/>
9363
9004
  </xsl:variable>
9364
9005
  <xsl:variable name="image_height_effective" select="$height_effective - number($indent_left)"/>
9365
9006
  <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
9366
9007
  <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
9367
9008
  <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
9368
9009
  <xsl:variable name="scale">
9369
-
9370
- <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
9371
-
9010
+ <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
9372
9011
  </xsl:variable>
9373
9012
  <xsl:value-of select="$scale"/>
9374
9013
  </xsl:template>
@@ -9389,7 +9028,8 @@
9389
9028
  </xsl:when>
9390
9029
  <xsl:when test="not(starts-with(@src, 'data:'))">
9391
9030
  <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
9392
- <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
9031
+ <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>
9032
+ <xsl:value-of select="concat('url(', $file_protocol, $src_external, ')')"/>
9393
9033
  </xsl:when>
9394
9034
  <xsl:otherwise>
9395
9035
  <xsl:value-of select="@src"/>
@@ -9685,8 +9325,8 @@
9685
9325
  </xsl:call-template>
9686
9326
  </xsl:variable>
9687
9327
  <xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
9688
- <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
9689
- <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
9328
+ <xsl:variable name="width" select="normalize-space($viewbox//mn:item[3])"/>
9329
+ <xsl:variable name="height" select="normalize-space($viewbox//mn:item[4])"/>
9690
9330
 
9691
9331
  <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
9692
9332
  <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
@@ -9758,8 +9398,8 @@
9758
9398
  </xsl:variable>
9759
9399
  <xsl:variable name="components" select="xalan:nodeset($components_)"/>
9760
9400
  <xsl:variable name="att_name" select="local-name()"/>
9761
- <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
9762
- <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
9401
+ <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>
9402
+ <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/mn:item[4]"/></xsl:attribute>
9763
9403
  </xsl:template>
9764
9404
 
9765
9405
  <!-- ============== -->
@@ -9832,13 +9472,13 @@
9832
9472
  </xsl:call-template>
9833
9473
  </xsl:variable>
9834
9474
  <xsl:variable name="x_coords">
9835
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
9475
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 1]">
9836
9476
  <xsl:sort select="." data-type="number"/>
9837
9477
  <x><xsl:value-of select="."/></x>
9838
9478
  </xsl:for-each>
9839
9479
  </xsl:variable>
9840
9480
  <xsl:variable name="y_coords">
9841
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
9481
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 0]">
9842
9482
  <xsl:sort select="." data-type="number"/>
9843
9483
  <y><xsl:value-of select="."/></y>
9844
9484
  </xsl:for-each>
@@ -10043,11 +9683,11 @@
10043
9683
  <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
10044
9684
  </xsl:variable>
10045
9685
 
10046
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
10047
- <title>
9686
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
9687
+ <mn:title>
10048
9688
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
10049
- </title>
10050
- </item>
9689
+ </mn:title>
9690
+ </mn:item>
10051
9691
  </xsl:if>
10052
9692
  </xsl:template>
10053
9693
 
@@ -10118,12 +9758,12 @@
10118
9758
  <xsl:param name="contents"/>
10119
9759
  <xsl:param name="contents_addon"/>
10120
9760
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
10121
- <xsl:if test="$contents_nodes//item">
9761
+ <xsl:if test="$contents_nodes//mn:item">
10122
9762
  <fo:bookmark-tree>
10123
9763
  <xsl:choose>
10124
- <xsl:when test="$contents_nodes/doc">
9764
+ <xsl:when test="$contents_nodes/mn:doc">
10125
9765
  <xsl:choose>
10126
- <xsl:when test="count($contents_nodes/doc) &gt; 1">
9766
+ <xsl:when test="count($contents_nodes/mn:doc) &gt; 1">
10127
9767
 
10128
9768
  <xsl:if test="$contents_nodes/collection">
10129
9769
  <fo:bookmark internal-destination="{$contents/collection/@firstpage_id}">
@@ -10131,8 +9771,8 @@
10131
9771
  </fo:bookmark>
10132
9772
  </xsl:if>
10133
9773
 
10134
- <xsl:for-each select="$contents_nodes/doc">
10135
- <fo:bookmark internal-destination="{contents/item[@display = 'true'][1]/@id}" starting-state="hide">
9774
+ <xsl:for-each select="$contents_nodes/mn:doc">
9775
+ <fo:bookmark internal-destination="{contents/mn:item[@display = 'true'][1]/@id}" starting-state="hide">
10136
9776
  <xsl:if test="@bundle = 'true'">
10137
9777
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
10138
9778
  </xsl:if>
@@ -10166,14 +9806,14 @@
10166
9806
  </xsl:choose>
10167
9807
  </fo:bookmark-title>
10168
9808
 
10169
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
9809
+ <xsl:apply-templates select="contents/mn:item" mode="bookmark"/>
10170
9810
 
10171
9811
  <xsl:call-template name="insertFigureBookmarks">
10172
- <xsl:with-param name="contents" select="contents"/>
9812
+ <xsl:with-param name="contents" select="mn:contents"/>
10173
9813
  </xsl:call-template>
10174
9814
 
10175
9815
  <xsl:call-template name="insertTableBookmarks">
10176
- <xsl:with-param name="contents" select="contents"/>
9816
+ <xsl:with-param name="contents" select="mn:contents"/>
10177
9817
  <xsl:with-param name="lang" select="@lang"/>
10178
9818
  </xsl:call-template>
10179
9819
 
@@ -10182,16 +9822,16 @@
10182
9822
  </xsl:for-each>
10183
9823
  </xsl:when>
10184
9824
  <xsl:otherwise>
10185
- <xsl:for-each select="$contents_nodes/doc">
9825
+ <xsl:for-each select="$contents_nodes/mn:doc">
10186
9826
 
10187
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
9827
+ <xsl:apply-templates select="mn:contents/mn:item" mode="bookmark"/>
10188
9828
 
10189
9829
  <xsl:call-template name="insertFigureBookmarks">
10190
- <xsl:with-param name="contents" select="contents"/>
9830
+ <xsl:with-param name="contents" select="mn:contents"/>
10191
9831
  </xsl:call-template>
10192
9832
 
10193
9833
  <xsl:call-template name="insertTableBookmarks">
10194
- <xsl:with-param name="contents" select="contents"/>
9834
+ <xsl:with-param name="contents" select="mn:contents"/>
10195
9835
  <xsl:with-param name="lang" select="@lang"/>
10196
9836
  </xsl:call-template>
10197
9837
 
@@ -10200,14 +9840,14 @@
10200
9840
  </xsl:choose>
10201
9841
  </xsl:when>
10202
9842
  <xsl:otherwise>
10203
- <xsl:apply-templates select="$contents_nodes/contents/item" mode="bookmark"/>
9843
+ <xsl:apply-templates select="$contents_nodes/mn:contents/mn:item" mode="bookmark"/>
10204
9844
 
10205
9845
  <xsl:call-template name="insertFigureBookmarks">
10206
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
9846
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
10207
9847
  </xsl:call-template>
10208
9848
 
10209
9849
  <xsl:call-template name="insertTableBookmarks">
10210
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
9850
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
10211
9851
  <xsl:with-param name="lang" select="@lang"/>
10212
9852
  </xsl:call-template>
10213
9853
 
@@ -10224,80 +9864,72 @@
10224
9864
  <xsl:template name="insertFigureBookmarks">
10225
9865
  <xsl:param name="contents"/>
10226
9866
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
10227
- <xsl:if test="$contents_nodes/figure">
10228
- <fo:bookmark internal-destination="{$contents_nodes/figure[1]/@id}" starting-state="hide">
9867
+ <xsl:if test="$contents_nodes/mn:figure">
9868
+ <fo:bookmark internal-destination="{$contents_nodes/mn:figure[1]/@id}" starting-state="hide">
10229
9869
  <fo:bookmark-title>Figures</fo:bookmark-title>
10230
- <xsl:for-each select="$contents_nodes/figure">
9870
+ <xsl:for-each select="$contents_nodes/mn:figure">
10231
9871
  <fo:bookmark internal-destination="{@id}">
10232
9872
  <fo:bookmark-title>
10233
- <xsl:value-of select="normalize-space(title)"/>
9873
+ <xsl:value-of select="normalize-space(mn:title)"/>
10234
9874
  </fo:bookmark-title>
10235
9875
  </fo:bookmark>
10236
9876
  </xsl:for-each>
10237
9877
  </fo:bookmark>
10238
9878
  </xsl:if>
9879
+ <xsl:if test="$contents_nodes//mn:figures/mn:figure">
9880
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
10239
9881
 
10240
- <xsl:if test="$contents_nodes//figures/figure">
10241
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
10242
-
10243
- <xsl:variable name="bookmark-title">
10244
-
10245
- <xsl:value-of select="$title-list-figures"/>
10246
-
10247
- </xsl:variable>
10248
- <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
10249
- <xsl:for-each select="$contents_nodes//figures/figure">
10250
- <fo:bookmark internal-destination="{@id}">
10251
- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
10252
- </fo:bookmark>
10253
- </xsl:for-each>
9882
+ <xsl:variable name="bookmark-title">
9883
+ <xsl:value-of select="$title-list-figures"/>
9884
+ </xsl:variable>
9885
+ <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
9886
+ <xsl:for-each select="$contents_nodes//mn:figures/mn:figure">
9887
+ <fo:bookmark internal-destination="{@id}">
9888
+ <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
10254
9889
  </fo:bookmark>
10255
- </xsl:if>
10256
-
9890
+ </xsl:for-each>
9891
+ </fo:bookmark>
9892
+ </xsl:if>
10257
9893
  </xsl:template> <!-- insertFigureBookmarks -->
10258
9894
 
10259
9895
  <xsl:template name="insertTableBookmarks">
10260
9896
  <xsl:param name="contents"/>
10261
9897
  <xsl:param name="lang"/>
10262
9898
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
10263
- <xsl:if test="$contents_nodes/table">
10264
- <fo:bookmark internal-destination="{$contents_nodes/table[1]/@id}" starting-state="hide">
9899
+ <xsl:if test="$contents_nodes/mn:table">
9900
+ <fo:bookmark internal-destination="{$contents_nodes/mn:table[1]/@id}" starting-state="hide">
10265
9901
  <fo:bookmark-title>
10266
9902
  <xsl:choose>
10267
9903
  <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
10268
9904
  <xsl:otherwise>Tables</xsl:otherwise>
10269
9905
  </xsl:choose>
10270
9906
  </fo:bookmark-title>
10271
- <xsl:for-each select="$contents_nodes/table">
9907
+ <xsl:for-each select="$contents_nodes/mn:table">
10272
9908
  <fo:bookmark internal-destination="{@id}">
10273
9909
  <fo:bookmark-title>
10274
- <xsl:value-of select="normalize-space(title)"/>
9910
+ <xsl:value-of select="normalize-space(mn:title)"/>
10275
9911
  </fo:bookmark-title>
10276
9912
  </fo:bookmark>
10277
9913
  </xsl:for-each>
10278
9914
  </fo:bookmark>
10279
9915
  </xsl:if>
9916
+ <xsl:if test="$contents_nodes//mn:tables/mn:table">
9917
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
10280
9918
 
10281
- <xsl:if test="$contents_nodes//tables/table">
10282
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
10283
-
10284
- <xsl:variable name="bookmark-title">
10285
-
10286
- <xsl:value-of select="$title-list-tables"/>
10287
-
10288
- </xsl:variable>
9919
+ <xsl:variable name="bookmark-title">
9920
+ <xsl:value-of select="$title-list-tables"/>
9921
+ </xsl:variable>
10289
9922
 
10290
- <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
9923
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
10291
9924
 
10292
- <xsl:for-each select="$contents_nodes//tables/table">
10293
- <fo:bookmark internal-destination="{@id}">
10294
- <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
10295
- <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
10296
- </fo:bookmark>
10297
- </xsl:for-each>
9925
+ <xsl:for-each select="$contents_nodes//mn:tables/mn:table">
9926
+ <fo:bookmark internal-destination="{@id}">
9927
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
9928
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
10298
9929
  </fo:bookmark>
10299
- </xsl:if>
10300
-
9930
+ </xsl:for-each>
9931
+ </fo:bookmark>
9932
+ </xsl:if>
10301
9933
  </xsl:template> <!-- insertTableBookmarks -->
10302
9934
  <!-- End Bookmarks -->
10303
9935
 
@@ -10327,17 +9959,15 @@
10327
9959
  <xsl:param name="title" select="''"/>
10328
9960
  <xsl:choose>
10329
9961
  <xsl:when test="$lang = 'en'">
10330
-
10331
9962
  </xsl:when>
10332
9963
  <xsl:when test="$lang = 'fr'">
10333
-
10334
9964
  </xsl:when>
10335
9965
  <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
10336
9966
  <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
10337
9967
  </xsl:choose>
10338
9968
  </xsl:template>
10339
9969
 
10340
- <xsl:template match="item" mode="bookmark">
9970
+ <xsl:template match="mn:item" mode="bookmark">
10341
9971
  <xsl:choose>
10342
9972
  <xsl:when test="@id != ''">
10343
9973
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
@@ -10347,7 +9977,7 @@
10347
9977
  <xsl:text> </xsl:text>
10348
9978
  </xsl:if>
10349
9979
  <xsl:variable name="title">
10350
- <xsl:for-each select="title/node()">
9980
+ <xsl:for-each select="mn:title/node()">
10351
9981
  <xsl:choose>
10352
9982
  <xsl:when test="local-name() = 'add' and starts-with(., $ace_tag)"><!-- skip --></xsl:when>
10353
9983
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
@@ -10365,7 +9995,7 @@
10365
9995
  </xsl:choose>
10366
9996
  </xsl:template>
10367
9997
 
10368
- <xsl:template match="title" mode="bookmark"/>
9998
+ <xsl:template match="mn:title" mode="bookmark"/>
10369
9999
  <xsl:template match="text()" mode="bookmark"/>
10370
10000
 
10371
10001
  <!-- figure/name -->
@@ -10594,9 +10224,9 @@
10594
10224
  <xsl:template match="text()" mode="contents_item">
10595
10225
  <xsl:variable name="text">
10596
10226
  <!-- to split by '_' and other chars -->
10597
- <text><xsl:call-template name="add-zero-spaces-java"/></text>
10227
+ <mn:text><xsl:call-template name="add-zero-spaces-java"/></mn:text>
10598
10228
  </xsl:variable>
10599
- <xsl:for-each select="xalan:nodeset($text)/text/text()">
10229
+ <xsl:for-each select="xalan:nodeset($text)/mn:text/text()">
10600
10230
  <xsl:call-template name="keep_together_standard_number"/>
10601
10231
  </xsl:for-each>
10602
10232
  </xsl:template>
@@ -10629,14 +10259,7 @@
10629
10259
 
10630
10260
  <xsl:template name="get_sourcecode_attributes">
10631
10261
  <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
10632
- <xsl:variable name="_font-size">
10633
-
10634
- <!-- inherit -->
10635
-
10636
- <!-- <xsl:if test="$namespace = 'ieee'">
10637
- <xsl:if test="$current_template = 'standard'">8</xsl:if>
10638
- </xsl:if> -->
10639
-
10262
+ <xsl:variable name="_font-size"><!-- inherit -->
10640
10263
  </xsl:variable>
10641
10264
 
10642
10265
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -10692,7 +10315,6 @@
10692
10315
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
10693
10316
  </xsl:choose>
10694
10317
  </xsl:attribute>
10695
-
10696
10318
  </xsl:if>
10697
10319
  <fo:block-container margin-left="0mm" role="SKIP">
10698
10320
 
@@ -10716,8 +10338,7 @@
10716
10338
  </fo:block>
10717
10339
 
10718
10340
  <xsl:apply-templates select="*[local-name() = 'dl']"/> <!-- Key table -->
10719
-
10720
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
10341
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
10721
10342
 
10722
10343
  </fo:block-container>
10723
10344
  </fo:block-container>
@@ -10894,25 +10515,6 @@
10894
10515
  </xsl:choose>
10895
10516
  </xsl:template>
10896
10517
 
10897
- <!-- insert 'char' between each character in the string -->
10898
- <xsl:template name="interspers">
10899
- <xsl:param name="str"/>
10900
- <xsl:param name="char" select="$zero_width_space"/>
10901
- <xsl:if test="$str != ''">
10902
- <xsl:value-of select="substring($str, 1, 1)"/>
10903
-
10904
- <xsl:variable name="next_char" select="substring($str, 2, 1)"/>
10905
- <xsl:if test="not(contains(concat(' -.:=_— ', $char), $next_char))">
10906
- <xsl:value-of select="$char"/>
10907
- </xsl:if>
10908
-
10909
- <xsl:call-template name="interspers">
10910
- <xsl:with-param name="str" select="substring($str, 2)"/>
10911
- <xsl:with-param name="char" select="$char"/>
10912
- </xsl:call-template>
10913
- </xsl:if>
10914
- </xsl:template>
10915
-
10916
10518
  <xsl:template name="interspers-java">
10917
10519
  <xsl:param name="str"/>
10918
10520
  <xsl:param name="char" select="$zero_width_space"/>
@@ -11009,7 +10611,7 @@
11009
10611
  </xsl:variable>
11010
10612
  <xsl:variable name="classes" select="xalan:nodeset($classes_)"/>
11011
10613
 
11012
- <xsl:for-each select="$classes/item">
10614
+ <xsl:for-each select="$classes/*[local-name() = 'item']">
11013
10615
  <xsl:variable name="class_name" select="."/>
11014
10616
  <xsl:for-each select="$syntax_highlight_styles/style[@class = $class_name]/@*[not(local-name() = 'class')]">
11015
10617
  <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
@@ -11092,12 +10694,9 @@
11092
10694
 
11093
10695
  <xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
11094
10696
  <xsl:if test="normalize-space() != ''">
11095
-
11096
- <fo:block xsl:use-attribute-sets="permission-name-style">
11097
- <xsl:apply-templates/>
11098
-
11099
- </fo:block>
11100
-
10697
+ <fo:block xsl:use-attribute-sets="permission-name-style">
10698
+ <xsl:apply-templates/>
10699
+ </fo:block>
11101
10700
  </xsl:if>
11102
10701
  </xsl:template>
11103
10702
 
@@ -11126,12 +10725,9 @@
11126
10725
  <xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
11127
10726
  <xsl:if test="normalize-space() != ''">
11128
10727
 
11129
- <fo:block xsl:use-attribute-sets="requirement-name-style">
11130
-
11131
- <xsl:apply-templates/>
11132
-
11133
- </fo:block>
11134
-
10728
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
10729
+ <xsl:apply-templates/>
10730
+ </fo:block>
11135
10731
  </xsl:if>
11136
10732
  </xsl:template>
11137
10733
 
@@ -11170,11 +10766,9 @@
11170
10766
  <xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
11171
10767
  <xsl:if test="normalize-space() != ''">
11172
10768
 
11173
- <fo:block xsl:use-attribute-sets="recommendation-name-style">
11174
- <xsl:apply-templates/>
11175
-
11176
- </fo:block>
11177
-
10769
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
10770
+ <xsl:apply-templates/>
10771
+ </fo:block>
11178
10772
  </xsl:if>
11179
10773
  </xsl:template>
11180
10774
 
@@ -11300,7 +10894,6 @@
11300
10894
 
11301
10895
  <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 ')">
11302
10896
  <xsl:attribute name="font-weight">bold</xsl:attribute>
11303
-
11304
10897
  </xsl:if>
11305
10898
 
11306
10899
  <xsl:apply-templates mode="requirement"/>
@@ -11345,7 +10938,6 @@
11345
10938
 
11346
10939
  <xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
11347
10940
  <fo:block font-size="11pt">
11348
-
11349
10941
  <xsl:apply-templates/>
11350
10942
  </fo:block>
11351
10943
  </xsl:template>
@@ -11385,7 +10977,6 @@
11385
10977
  <xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
11386
10978
  <xsl:variable name="element">inline
11387
10979
 
11388
-
11389
10980
  </xsl:variable>
11390
10981
  <xsl:choose>
11391
10982
  <xsl:when test="contains($element, 'block')">
@@ -11417,110 +11008,105 @@
11417
11008
  text line 2
11418
11009
  -->
11419
11010
  <xsl:template match="*[local-name() = 'example']" name="example">
11011
+ <xsl:call-template name="setNamedDestination"/>
11012
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
11420
11013
 
11421
- <xsl:call-template name="setNamedDestination"/>
11422
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
11014
+ <xsl:call-template name="setBlockSpanAll"/>
11423
11015
 
11424
- <xsl:call-template name="setBlockSpanAll"/>
11016
+ <xsl:call-template name="refine_example-style"/>
11425
11017
 
11426
- <xsl:call-template name="refine_example-style"/>
11018
+ <xsl:variable name="fo_element">
11019
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>block
11020
+ </xsl:variable>
11427
11021
 
11428
- <xsl:variable name="fo_element">
11429
- <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
11430
- block
11431
- </xsl:variable>
11022
+ <fo:block-container margin-left="0mm" role="SKIP">
11432
11023
 
11433
- <fo:block-container margin-left="0mm" role="SKIP">
11024
+ <xsl:choose>
11434
11025
 
11435
- <xsl:choose>
11026
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
11436
11027
 
11437
- <xsl:when test="contains(normalize-space($fo_element), 'block')">
11028
+ <!-- display name 'EXAMPLE' in a separate block -->
11029
+ <fo:block>
11030
+ <xsl:apply-templates select="*[local-name()='name']">
11031
+ <xsl:with-param name="fo_element" select="$fo_element"/>
11032
+ </xsl:apply-templates>
11033
+ </fo:block>
11438
11034
 
11439
- <!-- display name 'EXAMPLE' in a separate block -->
11440
- <fo:block>
11441
- <xsl:apply-templates select="*[local-name()='name']">
11035
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
11036
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11037
+ <xsl:variable name="example_body">
11038
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
11442
11039
  <xsl:with-param name="fo_element" select="$fo_element"/>
11443
11040
  </xsl:apply-templates>
11444
- </fo:block>
11445
-
11446
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
11447
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11448
- <xsl:variable name="example_body">
11449
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
11450
- <xsl:with-param name="fo_element" select="$fo_element"/>
11451
- </xsl:apply-templates>
11452
- </xsl:variable>
11453
- <xsl:choose>
11454
- <xsl:when test="xalan:nodeset($example_body)/*">
11455
- <xsl:copy-of select="$example_body"/>
11456
- </xsl:when>
11457
- <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
11458
- </xsl:choose>
11459
- </fo:block-container>
11460
- </fo:block-container>
11461
- </xsl:when> <!-- end block -->
11462
-
11463
- <xsl:when test="contains(normalize-space($fo_element), 'list')">
11041
+ </xsl:variable>
11042
+ <xsl:choose>
11043
+ <xsl:when test="xalan:nodeset($example_body)/*">
11044
+ <xsl:copy-of select="$example_body"/>
11045
+ </xsl:when>
11046
+ <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
11047
+ </xsl:choose>
11048
+ </fo:block-container>
11049
+ </fo:block-container>
11050
+ </xsl:when> <!-- end block -->
11464
11051
 
11465
- <xsl:variable name="provisional_distance_between_starts_">
11466
- 7
11467
- </xsl:variable>
11468
- <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
11469
- <xsl:variable name="indent_">
11470
- 0
11471
- </xsl:variable>
11472
- <xsl:variable name="indent" select="normalize-space($indent_)"/>
11473
-
11474
- <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
11475
- <fo:list-item>
11476
- <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
11477
- <fo:block>
11478
- <xsl:apply-templates select="*[local-name()='name']">
11479
- <xsl:with-param name="fo_element">block</xsl:with-param>
11480
- </xsl:apply-templates>
11481
- </fo:block>
11482
- </fo:list-item-label>
11483
- <fo:list-item-body start-indent="body-start()">
11484
- <fo:block>
11485
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
11486
- <xsl:with-param name="fo_element" select="$fo_element"/>
11487
- </xsl:apply-templates>
11488
- </fo:block>
11489
- </fo:list-item-body>
11490
- </fo:list-item>
11491
- </fo:list-block>
11492
- </xsl:when> <!-- end list -->
11052
+ <xsl:when test="contains(normalize-space($fo_element), 'list')">
11493
11053
 
11494
- <xsl:otherwise> <!-- inline -->
11054
+ <xsl:variable name="provisional_distance_between_starts_">7
11055
+ </xsl:variable>
11056
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
11057
+ <xsl:variable name="indent_">0
11058
+ </xsl:variable>
11059
+ <xsl:variable name="indent" select="normalize-space($indent_)"/>
11495
11060
 
11496
- <!-- display 'EXAMPLE' and first element in the same line -->
11497
- <fo:block>
11498
- <xsl:apply-templates select="*[local-name()='name']">
11499
- <xsl:with-param name="fo_element" select="$fo_element"/>
11500
- </xsl:apply-templates>
11501
- <fo:inline>
11502
- <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
11061
+ <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
11062
+ <fo:list-item>
11063
+ <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
11064
+ <fo:block>
11065
+ <xsl:apply-templates select="*[local-name()='name']">
11066
+ <xsl:with-param name="fo_element">block</xsl:with-param>
11067
+ </xsl:apply-templates>
11068
+ </fo:block>
11069
+ </fo:list-item-label>
11070
+ <fo:list-item-body start-indent="body-start()">
11071
+ <fo:block>
11072
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
11503
11073
  <xsl:with-param name="fo_element" select="$fo_element"/>
11504
11074
  </xsl:apply-templates>
11505
- </fo:inline>
11506
- </fo:block>
11075
+ </fo:block>
11076
+ </fo:list-item-body>
11077
+ </fo:list-item>
11078
+ </fo:list-block>
11079
+ </xsl:when> <!-- end list -->
11507
11080
 
11508
- <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
11509
- <!-- display further elements in blocks -->
11510
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
11511
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11512
- <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
11513
- <xsl:with-param name="fo_element" select="'block'"/>
11514
- </xsl:apply-templates>
11515
- </fo:block-container>
11516
- </fo:block-container>
11517
- </xsl:if>
11518
- </xsl:otherwise> <!-- end inline -->
11081
+ <xsl:otherwise> <!-- inline -->
11519
11082
 
11520
- </xsl:choose>
11521
- </fo:block-container>
11522
- </fo:block-container>
11083
+ <!-- display 'EXAMPLE' and first element in the same line -->
11084
+ <fo:block>
11085
+ <xsl:apply-templates select="*[local-name()='name']">
11086
+ <xsl:with-param name="fo_element" select="$fo_element"/>
11087
+ </xsl:apply-templates>
11088
+ <fo:inline>
11089
+ <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
11090
+ <xsl:with-param name="fo_element" select="$fo_element"/>
11091
+ </xsl:apply-templates>
11092
+ </fo:inline>
11093
+ </fo:block>
11523
11094
 
11095
+ <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
11096
+ <!-- display further elements in blocks -->
11097
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
11098
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11099
+ <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
11100
+ <xsl:with-param name="fo_element" select="'block'"/>
11101
+ </xsl:apply-templates>
11102
+ </fo:block-container>
11103
+ </fo:block-container>
11104
+ </xsl:if>
11105
+ </xsl:otherwise> <!-- end inline -->
11106
+
11107
+ </xsl:choose>
11108
+ </fo:block-container>
11109
+ </fo:block-container>
11524
11110
  </xsl:template>
11525
11111
 
11526
11112
  <!-- example/name -->
@@ -11535,7 +11121,6 @@
11535
11121
  </xsl:when>
11536
11122
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
11537
11123
  <fo:block xsl:use-attribute-sets="example-name-style">
11538
-
11539
11124
  <xsl:apply-templates/>
11540
11125
  </fo:block>
11541
11126
  </xsl:when>
@@ -11552,9 +11137,7 @@
11552
11137
  <!-- table/example/name, table/tfoot//example/name -->
11553
11138
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'example']/*[local-name() = 'name']">
11554
11139
  <fo:inline xsl:use-attribute-sets="example-name-style">
11555
-
11556
- <xsl:attribute name="font-weight">bold</xsl:attribute>
11557
-
11140
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
11558
11141
  <xsl:apply-templates/>
11559
11142
  </fo:inline>
11560
11143
  </xsl:template>
@@ -11564,7 +11147,6 @@
11564
11147
 
11565
11148
  <xsl:variable name="num"><xsl:number/></xsl:variable>
11566
11149
  <xsl:variable name="element">
11567
-
11568
11150
  <xsl:value-of select="$fo_element"/>
11569
11151
  </xsl:variable>
11570
11152
  <xsl:choose>
@@ -11682,7 +11264,7 @@
11682
11264
  </xsl:call-template>
11683
11265
  </xsl:variable>
11684
11266
 
11685
- <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
11267
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
11686
11268
  <xsl:choose>
11687
11269
  <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>
11688
11270
  <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>
@@ -11719,7 +11301,6 @@
11719
11301
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
11720
11302
  </xsl:if>
11721
11303
  </xsl:if>
11722
-
11723
11304
  <fo:block-container margin-left="0mm" role="SKIP">
11724
11305
  <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
11725
11306
 
@@ -11802,7 +11383,6 @@
11802
11383
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
11803
11384
  <xsl:attribute name="vertical-align">super</xsl:attribute>
11804
11385
  <xsl:attribute name="font-size">80%</xsl:attribute>
11805
-
11806
11386
  </xsl:if>
11807
11387
 
11808
11388
  <xsl:call-template name="refine_eref-style"/>
@@ -11851,7 +11431,6 @@
11851
11431
  </xsl:template>
11852
11432
 
11853
11433
  <xsl:template name="refine_basic_link_style">
11854
-
11855
11434
  </xsl:template> <!-- refine_basic_link_style -->
11856
11435
 
11857
11436
  <!-- ====== -->
@@ -11868,7 +11447,6 @@
11868
11447
  </xsl:variable>
11869
11448
 
11870
11449
  <xsl:variable name="padding">
11871
-
11872
11450
  </xsl:variable>
11873
11451
 
11874
11452
  <xsl:variable name="padding-right">
@@ -11879,7 +11457,6 @@
11879
11457
  </xsl:otherwise>
11880
11458
  </xsl:choose>
11881
11459
  </xsl:variable>
11882
-
11883
11460
  <xsl:choose>
11884
11461
  <xsl:when test="$lang = 'zh'">
11885
11462
  <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -11903,7 +11480,6 @@
11903
11480
  <xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']/*[local-name() = 'tab']" priority="2"/>
11904
11481
 
11905
11482
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab">
11906
-
11907
11483
  </xsl:template>
11908
11484
 
11909
11485
  <xsl:template name="insertNonBreakSpaces">
@@ -11921,8 +11497,7 @@
11921
11497
  <xsl:variable name="level">
11922
11498
  <xsl:call-template name="getLevel"/>
11923
11499
  </xsl:variable>
11924
- <xsl:variable name="font-size">
11925
- inherit
11500
+ <xsl:variable name="font-size">inherit
11926
11501
  </xsl:variable>
11927
11502
  <xsl:variable name="levelTerm">
11928
11503
  <xsl:call-template name="getLevelTermName"/>
@@ -11974,11 +11549,9 @@
11974
11549
  </xsl:template>
11975
11550
 
11976
11551
  <xsl:template name="setStyle_preferred">
11977
-
11978
- <xsl:if test="*[local-name() = 'strong']">
11979
- <xsl:attribute name="font-weight">normal</xsl:attribute>
11980
- </xsl:if>
11981
-
11552
+ <xsl:if test="*[local-name() = 'strong']">
11553
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
11554
+ </xsl:if>
11982
11555
  </xsl:template>
11983
11556
 
11984
11557
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
@@ -12055,7 +11628,6 @@
12055
11628
 
12056
11629
  <!-- main sections -->
12057
11630
  <xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
12058
-
12059
11631
  <xsl:call-template name="setNamedDestination"/>
12060
11632
  <fo:block>
12061
11633
  <xsl:call-template name="setId"/>
@@ -12090,13 +11662,10 @@
12090
11662
  </xsl:template>
12091
11663
 
12092
11664
  <xsl:template name="sections_element_style">
12093
-
12094
11665
  </xsl:template> <!-- sections_element_style -->
12095
11666
 
12096
11667
  <xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
12097
-
12098
- <fo:block break-after="page"/>
12099
-
11668
+ <fo:block break-after="page"/>
12100
11669
  <xsl:call-template name="setNamedDestination"/>
12101
11670
  <fo:block>
12102
11671
  <xsl:call-template name="setId"/>
@@ -12145,7 +11714,6 @@
12145
11714
  </xsl:template>
12146
11715
 
12147
11716
  <xsl:template name="refine_clause_style">
12148
-
12149
11717
  </xsl:template> <!-- refine_clause_style -->
12150
11718
 
12151
11719
  <xsl:template match="*[local-name() = 'definitions']">
@@ -12185,7 +11753,6 @@
12185
11753
  </xsl:template>
12186
11754
 
12187
11755
  <xsl:template name="refine_annex_style">
12188
-
12189
11756
  </xsl:template>
12190
11757
 
12191
11758
  <!-- document text (not figures, or tables) footnotes -->
@@ -12289,16 +11856,14 @@
12289
11856
  <!-- Lists processing -->
12290
11857
  <!-- ===================================== -->
12291
11858
  <xsl:variable name="ul_labels_">
12292
-
12293
- <label level="1">-</label> <!-- full-width hyphen minus -->
12294
- <label level="2" font-size="130%" line-height="1.2">・</label> <!-- Katakana Middle Dot -->
11859
+ <label level="1">-</label> <!-- full-width hyphen minus -->
11860
+ <label level="2" font-size="130%" line-height="1.2">・</label> <!-- Katakana Middle Dot -->
12295
11861
 
12296
11862
  </xsl:variable>
12297
11863
  <xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
12298
11864
 
12299
11865
  <xsl:template name="setULLabel">
12300
- <xsl:variable name="list_level__">
12301
- <xsl:value-of select="count(ancestor::*[local-name() = 'ul'])"/>
11866
+ <xsl:variable name="list_level__"><xsl:value-of select="count(ancestor::*[local-name() = 'ul'])"/>
12302
11867
  </xsl:variable>
12303
11868
  <xsl:variable name="list_level_" select="number($list_level__)"/>
12304
11869
  <xsl:variable name="list_level">
@@ -12355,28 +11920,22 @@
12355
11920
  <xsl:variable name="label">
12356
11921
 
12357
11922
  <xsl:variable name="style_prefix_">
12358
- <xsl:if test="$type = 'roman'">
12359
- <!-- Example: (i) -->
11923
+ <xsl:if test="$type = 'roman'"> <!-- Example: (i) -->
12360
11924
  </xsl:if>
12361
11925
  <xsl:if test="$type = 'alphabet'">
12362
-
12363
11926
  </xsl:if>
12364
11927
  </xsl:variable>
12365
11928
  <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
12366
11929
 
12367
11930
  <xsl:variable name="style_suffix_">
12368
11931
  <xsl:choose>
12369
- <xsl:when test="$type = 'arabic'">
12370
- )
11932
+ <xsl:when test="$type = 'arabic'">)
12371
11933
  </xsl:when>
12372
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
12373
- )
11934
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">)
12374
11935
  </xsl:when>
12375
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
12376
- .
11936
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">.
12377
11937
  </xsl:when>
12378
- <xsl:when test="$type = 'roman'">
12379
- )
11938
+ <xsl:when test="$type = 'roman'">)
12380
11939
  </xsl:when>
12381
11940
  <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
12382
11941
  </xsl:choose>
@@ -12393,8 +11952,7 @@
12393
11952
  <xsl:value-of select="$style_suffix"/>
12394
11953
  </xsl:if>
12395
11954
  </xsl:variable>
12396
-
12397
- <xsl:value-of select="normalize-space($label)"/>
11955
+ <xsl:value-of select="normalize-space($label)"/>
12398
11956
 
12399
11957
  </xsl:when>
12400
11958
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
@@ -12451,17 +12009,13 @@
12451
12009
 
12452
12010
  <xsl:variable name="format">
12453
12011
  <xsl:choose>
12454
- <xsl:when test="$type = 'arabic'">
12455
- 1)
12012
+ <xsl:when test="$type = 'arabic'">1)
12456
12013
  </xsl:when>
12457
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
12458
- a)
12014
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">a)
12459
12015
  </xsl:when>
12460
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
12461
- A.
12016
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">A.
12462
12017
  </xsl:when>
12463
- <xsl:when test="$type = 'roman'">
12464
- i)
12018
+ <xsl:when test="$type = 'roman'">i)
12465
12019
  </xsl:when>
12466
12020
  <xsl:when test="$type = 'roman_upper'">I.</xsl:when>
12467
12021
  <xsl:otherwise>1.</xsl:otherwise> <!-- for any case, if $type has non-determined value, not using -->
@@ -12498,26 +12052,24 @@
12498
12052
  </fo:block-container>
12499
12053
  </xsl:when>
12500
12054
  <xsl:otherwise>
12501
-
12502
- <fo:block-container role="SKIP">
12503
- <xsl:if test="local-name() = 'ol' and (ancestor::plateau:li)">
12504
- <xsl:attribute name="margin-left"><xsl:value-of select="count(ancestor::plateau:li) * 6 + 6"/>mm</xsl:attribute>
12505
- </xsl:if>
12506
- <fo:block-container margin-left="0mm" role="SKIP">
12507
- <fo:block>
12508
- <xsl:apply-templates select="." mode="list">
12509
- <xsl:with-param name="indent" select="$indent"/>
12510
- </xsl:apply-templates>
12511
- </fo:block>
12512
- </fo:block-container>
12513
- </fo:block-container>
12055
+ <fo:block-container role="SKIP">
12056
+ <xsl:if test="local-name() = 'ol' and (ancestor::plateau:li)">
12057
+ <xsl:attribute name="margin-left"><xsl:value-of select="count(ancestor::plateau:li) * 6 + 6"/>mm</xsl:attribute>
12058
+ </xsl:if>
12059
+ <fo:block-container margin-left="0mm" role="SKIP">
12060
+ <fo:block>
12061
+ <xsl:apply-templates select="." mode="list">
12062
+ <xsl:with-param name="indent" select="$indent"/>
12063
+ </xsl:apply-templates>
12064
+ </fo:block>
12065
+ </fo:block-container>
12066
+ </fo:block-container>
12514
12067
 
12515
12068
  </xsl:otherwise>
12516
12069
  </xsl:choose>
12517
12070
  </xsl:template>
12518
12071
 
12519
12072
  <xsl:template name="refine_list_container_style">
12520
-
12521
12073
  </xsl:template> <!-- refine_list_container_style -->
12522
12074
 
12523
12075
  <xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
@@ -12581,7 +12133,6 @@
12581
12133
  </xsl:template>
12582
12134
 
12583
12135
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
12584
-
12585
12136
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
12586
12137
 
12587
12138
  <xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
@@ -12866,9 +12417,7 @@
12866
12417
  <xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
12867
12418
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
12868
12419
  <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
12869
-
12870
- <xsl:attribute name="space-after">12pt</xsl:attribute>
12871
-
12420
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
12872
12421
  <xsl:apply-templates/>
12873
12422
  </fo:block>
12874
12423
  </xsl:template>
@@ -12920,7 +12469,6 @@
12920
12469
  <fo:table-column column-width="15mm"/>
12921
12470
  <fo:table-body>
12922
12471
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
12923
-
12924
12472
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
12925
12473
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
12926
12474
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
@@ -12956,7 +12504,6 @@
12956
12504
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
12957
12505
  <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
12958
12506
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
12959
-
12960
12507
  </xsl:template>
12961
12508
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
12962
12509
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
@@ -12967,16 +12514,13 @@
12967
12514
  <xsl:call-template name="setNamedDestination"/>
12968
12515
  <fo:block id="{@id}">
12969
12516
  <xsl:apply-templates/>
12970
-
12971
12517
  </fo:block>
12972
12518
  </xsl:template>
12973
12519
 
12974
12520
  <!-- Bibliography (non-normative references) -->
12975
12521
  <xsl:template match="*[local-name() = 'references']">
12976
12522
  <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
12977
-
12978
- <fo:block break-after="page"/>
12979
-
12523
+ <fo:block break-after="page"/>
12980
12524
  </xsl:if>
12981
12525
 
12982
12526
  <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
@@ -12992,9 +12536,7 @@
12992
12536
 
12993
12537
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
12994
12538
  <xsl:apply-templates select="node()[not(local-name() = 'title' and @columns = 1)]"/>
12995
-
12996
12539
  </fo:block>
12997
-
12998
12540
  </xsl:template> <!-- references -->
12999
12541
 
13000
12542
  <xsl:template match="*[local-name() = 'bibitem']">
@@ -13004,44 +12546,39 @@
13004
12546
  <!-- Normative references -->
13005
12547
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
13006
12548
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
13007
-
13008
- <xsl:call-template name="setNamedDestination"/>
13009
- <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
13010
-
13011
- <xsl:call-template name="processBibitem"/>
13012
- </fo:block>
12549
+ <xsl:call-template name="setNamedDestination"/>
12550
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
12551
+ <xsl:call-template name="processBibitem"/>
12552
+ </fo:block>
13013
12553
 
13014
12554
  </xsl:template> <!-- bibitem -->
13015
12555
 
13016
12556
  <!-- Bibliography (non-normative references) -->
13017
12557
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
13018
- <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
13019
- <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
12558
+ <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
13020
12559
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
13021
- <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
13022
- <xsl:call-template name="setNamedDestination"/>
13023
- <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
13024
-
13025
- <fo:list-item>
13026
- <fo:list-item-label end-indent="label-end()">
13027
- <fo:block role="SKIP">
13028
- <fo:inline role="SKIP">
13029
-
13030
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
13031
- <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
13032
- </xsl:apply-templates>
13033
- </fo:inline>
13034
- </fo:block>
13035
- </fo:list-item-label>
13036
- <fo:list-item-body start-indent="body-start()">
13037
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
13038
- <xsl:call-template name="processBibitem">
13039
- <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
13040
- </xsl:call-template>
13041
- </fo:block>
13042
- </fo:list-item-body>
13043
- </fo:list-item>
13044
- </fo:list-block>
12560
+ <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
12561
+ <xsl:call-template name="setNamedDestination"/>
12562
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
12563
+ <fo:list-item>
12564
+ <fo:list-item-label end-indent="label-end()">
12565
+ <fo:block role="SKIP">
12566
+ <fo:inline role="SKIP">
12567
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
12568
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
12569
+ </xsl:apply-templates>
12570
+ </fo:inline>
12571
+ </fo:block>
12572
+ </fo:list-item-label>
12573
+ <fo:list-item-body start-indent="body-start()">
12574
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
12575
+ <xsl:call-template name="processBibitem">
12576
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
12577
+ </xsl:call-template>
12578
+ </fo:block>
12579
+ </fo:list-item-body>
12580
+ </fo:list-item>
12581
+ </fo:list-block>
13045
12582
 
13046
12583
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
13047
12584
 
@@ -13051,7 +12588,6 @@
13051
12588
  <xsl:otherwise>
13052
12589
  <xsl:call-template name="setNamedDestination"/>
13053
12590
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
13054
-
13055
12591
  <fo:list-item-label end-indent="label-end()">
13056
12592
  <fo:block role="SKIP">
13057
12593
  <fo:inline role="SKIP">
@@ -13078,18 +12614,16 @@
13078
12614
 
13079
12615
  <xsl:template name="processBibitem">
13080
12616
  <xsl:param name="biblio_tag_part">both</xsl:param>
12617
+ <!-- start bibitem processing -->
12618
+ <xsl:if test=".//*[local-name() = 'fn']">
12619
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
12620
+ </xsl:if>
13081
12621
 
13082
- <!-- start bibitem processing -->
13083
- <xsl:if test=".//*[local-name() = 'fn']">
13084
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
13085
- </xsl:if>
13086
-
13087
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
13088
- <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
13089
- </xsl:apply-templates>
13090
- <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
13091
- <!-- end bibitem processing -->
13092
-
12622
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
12623
+ <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
12624
+ </xsl:apply-templates>
12625
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
12626
+ <!-- end bibitem processing -->
13093
12627
  </xsl:template> <!-- processBibitem (bibitem) -->
13094
12628
 
13095
12629
  <xsl:template match="*[local-name() = 'title']" mode="title">
@@ -13232,8 +12766,7 @@
13232
12766
  <xsl:choose>
13233
12767
  <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
13234
12768
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
13235
- <xsl:otherwise><!-- default value -->
13236
- 2
12769
+ <xsl:otherwise><!-- default value -->2
13237
12770
  </xsl:otherwise>
13238
12771
  </xsl:choose>
13239
12772
  </xsl:variable>
@@ -13441,26 +12974,19 @@
13441
12974
  <!-- ================ -->
13442
12975
  <!-- Admonition -->
13443
12976
  <!-- ================ -->
13444
- <xsl:template match="*[local-name() = 'admonition']">
13445
-
13446
- <!-- text in the box -->
13447
- <xsl:call-template name="setNamedDestination"/>
13448
- <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
13449
-
13450
- <xsl:call-template name="setBlockSpanAll"/>
13451
-
13452
- <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
13453
-
13454
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
13455
- <fo:block>
13456
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
13457
- </fo:block>
13458
- </fo:block-container>
13459
-
13460
- </fo:block-container>
13461
-
13462
- </fo:block-container>
12977
+ <xsl:template match="*[local-name() = 'admonition']"> <!-- text in the box -->
12978
+ <xsl:call-template name="setNamedDestination"/>
12979
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
13463
12980
 
12981
+ <xsl:call-template name="setBlockSpanAll"/>
12982
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
12983
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
12984
+ <fo:block>
12985
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
12986
+ </fo:block>
12987
+ </fo:block-container>
12988
+ </fo:block-container>
12989
+ </fo:block-container>
13464
12990
  </xsl:template>
13465
12991
 
13466
12992
  <xsl:template name="displayAdmonitionName">
@@ -13508,12 +13034,10 @@
13508
13034
  </xsl:template> -->
13509
13035
 
13510
13036
  <xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
13037
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
13511
13038
 
13512
- <fo:block xsl:use-attribute-sets="admonition-p-style">
13513
-
13514
- <xsl:apply-templates/>
13515
- </fo:block>
13516
-
13039
+ <xsl:apply-templates/>
13040
+ </fo:block>
13517
13041
  </xsl:template>
13518
13042
 
13519
13043
  <!-- ================ -->
@@ -13549,10 +13073,9 @@
13549
13073
 
13550
13074
  <!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
13551
13075
  <xsl:variable name="updated_xml_step2">
13552
-
13553
- <xsl:if test="$table_if = 'false'">
13554
- <xsl:apply-templates select="xalan:nodeset($updated_xml_step1)" mode="update_xml_step2"/>
13555
- </xsl:if>
13076
+ <xsl:if test="$table_if = 'false'">
13077
+ <xsl:apply-templates select="xalan:nodeset($updated_xml_step1)" mode="update_xml_step2"/>
13078
+ </xsl:if>
13556
13079
 
13557
13080
  </xsl:variable>
13558
13081
 
@@ -14028,7 +13551,6 @@
14028
13551
  </xsl:template>
14029
13552
 
14030
13553
  <xsl:template name="addNamedDestinationAttribute">
14031
-
14032
13554
  </xsl:template>
14033
13555
 
14034
13556
  <xsl:template match="*[local-name() = 'fmt-name']"/>
@@ -14483,58 +14005,57 @@
14483
14005
  <!-- =========================================================================== -->
14484
14006
  <!-- END STEP MOVE PAGEBREAK: move <pagebreak/> at top level under 'preface' and 'sections' -->
14485
14007
  <!-- =========================================================================== -->
14008
+ <!-- =========================================================================== -->
14009
+ <!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
14010
+ <!-- =========================================================================== -->
14011
+ <xsl:template match="@*|node()" mode="update_xml_step2">
14012
+ <xsl:copy>
14013
+ <xsl:apply-templates select="@*|node()" mode="update_xml_step2"/>
14014
+ </xsl:copy>
14015
+ </xsl:template>
14486
14016
 
14487
- <!-- =========================================================================== -->
14488
- <!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
14489
- <!-- =========================================================================== -->
14490
- <xsl:template match="@*|node()" mode="update_xml_step2">
14491
- <xsl:copy>
14492
- <xsl:apply-templates select="@*|node()" mode="update_xml_step2"/>
14493
- </xsl:copy>
14494
- </xsl:template>
14495
-
14496
- <xsl:variable name="localized_string_withdrawn">
14017
+ <xsl:variable name="localized_string_withdrawn">
14018
+ <xsl:call-template name="getLocalizedString">
14019
+ <xsl:with-param name="key">withdrawn</xsl:with-param>
14020
+ </xsl:call-template>
14021
+ </xsl:variable>
14022
+ <xsl:variable name="localized_string_cancelled_and_replaced">
14023
+ <xsl:variable name="str">
14497
14024
  <xsl:call-template name="getLocalizedString">
14498
- <xsl:with-param name="key">withdrawn</xsl:with-param>
14025
+ <xsl:with-param name="key">cancelled_and_replaced</xsl:with-param>
14499
14026
  </xsl:call-template>
14500
14027
  </xsl:variable>
14501
- <xsl:variable name="localized_string_cancelled_and_replaced">
14502
- <xsl:variable name="str">
14503
- <xsl:call-template name="getLocalizedString">
14504
- <xsl:with-param name="key">cancelled_and_replaced</xsl:with-param>
14505
- </xsl:call-template>
14506
- </xsl:variable>
14507
- <xsl:choose>
14508
- <xsl:when test="contains($str, '%')"><xsl:value-of select="substring-before($str, '%')"/></xsl:when>
14509
- <xsl:otherwise><xsl:value-of select="$str"/></xsl:otherwise>
14510
- </xsl:choose>
14511
- </xsl:variable>
14028
+ <xsl:choose>
14029
+ <xsl:when test="contains($str, '%')"><xsl:value-of select="substring-before($str, '%')"/></xsl:when>
14030
+ <xsl:otherwise><xsl:value-of select="$str"/></xsl:otherwise>
14031
+ </xsl:choose>
14032
+ </xsl:variable>
14512
14033
 
14513
- <!-- add 'fn' after eref and origin, to reference bibitem with note = 'Withdrawn.' or 'Cancelled and replaced...' -->
14514
- <xsl:template match="*[local-name() = 'eref'] | *[local-name() = 'origin']" mode="update_xml_step2">
14515
- <xsl:copy-of select="."/>
14034
+ <!-- add 'fn' after eref and origin, to reference bibitem with note = 'Withdrawn.' or 'Cancelled and replaced...' -->
14035
+ <xsl:template match="*[local-name() = 'eref'] | *[local-name() = 'origin']" mode="update_xml_step2">
14036
+ <xsl:copy-of select="."/>
14516
14037
 
14517
- <xsl:variable name="bibitemid" select="@bibitemid"/>
14518
- <xsl:variable name="local_name" select="local-name()"/>
14519
- <xsl:variable name="position"><xsl:number count="*[local-name() = $local_name][@bibitemid = $bibitemid]" level="any"/></xsl:variable>
14520
- <xsl:if test="normalize-space($position) = '1'">
14521
- <xsl:variable name="fn_text">
14522
- <!-- <xsl:copy-of select="key('bibitems', $bibitemid)[1]/*[local-name() = 'note'][not(@type='Unpublished-Status')][normalize-space() = $localized_string_withdrawn or starts-with(normalize-space(), $localized_string_cancelled_and_replaced)]/node()" /> -->
14523
- <xsl:copy-of select="$bibitems/*[local-name() ='bibitem'][@id = $bibitemid][1]/*[local-name() = 'note'][not(@type='Unpublished-Status')][normalize-space() = $localized_string_withdrawn or starts-with(normalize-space(), $localized_string_cancelled_and_replaced)]/node()"/>
14524
- </xsl:variable>
14525
- <xsl:if test="normalize-space($fn_text) != ''">
14526
- <xsl:element name="fn" namespace="{$namespace_full}">
14527
- <xsl:attribute name="reference">bibitem_<xsl:value-of select="$bibitemid"/></xsl:attribute>
14528
- <xsl:element name="p" namespace="{$namespace_full}">
14529
- <xsl:copy-of select="$fn_text"/>
14530
- </xsl:element>
14038
+ <xsl:variable name="bibitemid" select="@bibitemid"/>
14039
+ <xsl:variable name="local_name" select="local-name()"/>
14040
+ <xsl:variable name="position"><xsl:number count="*[local-name() = $local_name][@bibitemid = $bibitemid]" level="any"/></xsl:variable>
14041
+ <xsl:if test="normalize-space($position) = '1'">
14042
+ <xsl:variable name="fn_text">
14043
+ <!-- <xsl:copy-of select="key('bibitems', $bibitemid)[1]/*[local-name() = 'note'][not(@type='Unpublished-Status')][normalize-space() = $localized_string_withdrawn or starts-with(normalize-space(), $localized_string_cancelled_and_replaced)]/node()" /> -->
14044
+ <xsl:copy-of select="$bibitems/*[local-name() ='bibitem'][@id = $bibitemid][1]/*[local-name() = 'note'][not(@type='Unpublished-Status')][normalize-space() = $localized_string_withdrawn or starts-with(normalize-space(), $localized_string_cancelled_and_replaced)]/node()"/>
14045
+ </xsl:variable>
14046
+ <xsl:if test="normalize-space($fn_text) != ''">
14047
+ <xsl:element name="fn" namespace="{$namespace_full}">
14048
+ <xsl:attribute name="reference">bibitem_<xsl:value-of select="$bibitemid"/></xsl:attribute>
14049
+ <xsl:element name="p" namespace="{$namespace_full}">
14050
+ <xsl:copy-of select="$fn_text"/>
14531
14051
  </xsl:element>
14532
- </xsl:if>
14052
+ </xsl:element>
14533
14053
  </xsl:if>
14534
- </xsl:template>
14054
+ </xsl:if>
14055
+ </xsl:template>
14535
14056
 
14536
- <!-- add id for table without id (for autolayout algorithm) -->
14537
- <!-- <xsl:template match="*[local-name() = 'table'][not(@id)]" mode="update_xml_step2">
14057
+ <!-- add id for table without id (for autolayout algorithm) -->
14058
+ <!-- <xsl:template match="*[local-name() = 'table'][not(@id)]" mode="update_xml_step2">
14538
14059
  <xsl:copy>
14539
14060
  <xsl:apply-templates select="@*" mode="update_xml_step2"/>
14540
14061
  <xsl:attribute name="id">_abc<xsl:value-of select="generate-id()"/></xsl:attribute>
@@ -14543,17 +14064,17 @@
14543
14064
  </xsl:copy>
14544
14065
  </xsl:template> -->
14545
14066
 
14546
- <!-- add @reference for fn -->
14547
- <xsl:template match="*[local-name() = 'fn'][not(@reference)]" mode="update_xml_step2">
14548
- <xsl:copy>
14549
- <xsl:apply-templates select="@*" mode="update_xml_step2"/>
14550
- <xsl:attribute name="reference"><xsl:value-of select="generate-id(.)"/></xsl:attribute>
14551
- <xsl:apply-templates select="node()" mode="update_xml_step2"/>
14552
- </xsl:copy>
14553
- </xsl:template>
14067
+ <!-- add @reference for fn -->
14068
+ <xsl:template match="*[local-name() = 'fn'][not(@reference)]" mode="update_xml_step2">
14069
+ <xsl:copy>
14070
+ <xsl:apply-templates select="@*" mode="update_xml_step2"/>
14071
+ <xsl:attribute name="reference"><xsl:value-of select="generate-id(.)"/></xsl:attribute>
14072
+ <xsl:apply-templates select="node()" mode="update_xml_step2"/>
14073
+ </xsl:copy>
14074
+ </xsl:template>
14554
14075
 
14555
- <!-- add @reference for bibitem/note, similar to fn/reference -->
14556
- <!-- <xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" mode="update_xml_step2">
14076
+ <!-- add @reference for bibitem/note, similar to fn/reference -->
14077
+ <!-- <xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" mode="update_xml_step2">
14557
14078
  <xsl:copy>
14558
14079
  <xsl:apply-templates select="@*" mode="update_xml_step2"/>
14559
14080
 
@@ -14565,28 +14086,28 @@
14565
14086
  </xsl:copy>
14566
14087
  </xsl:template> -->
14567
14088
 
14568
- <!-- enclose sequence of 'char x' + 'combining char y' to <lang_none>xy</lang_none> -->
14569
- <xsl:variable name="regex_combining_chars">(.[̀-ͯ])</xsl:variable>
14570
- <xsl:variable name="element_name_lang_none">lang_none</xsl:variable>
14571
- <xsl:variable name="tag_element_name_lang_none_open">###<xsl:value-of select="$element_name_lang_none"/>###</xsl:variable>
14572
- <xsl:variable name="tag_element_name_lang_none_close">###/<xsl:value-of select="$element_name_lang_none"/>###</xsl:variable>
14573
-
14574
- <xsl:template match="text()" mode="update_xml_step2">
14575
- <xsl:variable name="text_" select="java:replaceAll(java:java.lang.String.new(.), $regex_combining_chars, concat($tag_element_name_lang_none_open,'$1',$tag_element_name_lang_none_close))"/>
14576
- <xsl:call-template name="replace_text_tags">
14577
- <xsl:with-param name="tag_open" select="$tag_element_name_lang_none_open"/>
14578
- <xsl:with-param name="tag_close" select="$tag_element_name_lang_none_close"/>
14579
- <xsl:with-param name="text" select="$text_"/>
14580
- </xsl:call-template>
14581
- </xsl:template>
14089
+ <!-- enclose sequence of 'char x' + 'combining char y' to <lang_none>xy</lang_none> -->
14090
+ <xsl:variable name="regex_combining_chars">(.[̀-ͯ])</xsl:variable>
14091
+ <xsl:variable name="element_name_lang_none">lang_none</xsl:variable>
14092
+ <xsl:variable name="tag_element_name_lang_none_open">###<xsl:value-of select="$element_name_lang_none"/>###</xsl:variable>
14093
+ <xsl:variable name="tag_element_name_lang_none_close">###/<xsl:value-of select="$element_name_lang_none"/>###</xsl:variable>
14094
+
14095
+ <xsl:template match="text()" mode="update_xml_step2">
14096
+ <xsl:variable name="text_" select="java:replaceAll(java:java.lang.String.new(.), $regex_combining_chars, concat($tag_element_name_lang_none_open,'$1',$tag_element_name_lang_none_close))"/>
14097
+ <xsl:call-template name="replace_text_tags">
14098
+ <xsl:with-param name="tag_open" select="$tag_element_name_lang_none_open"/>
14099
+ <xsl:with-param name="tag_close" select="$tag_element_name_lang_none_close"/>
14100
+ <xsl:with-param name="text" select="$text_"/>
14101
+ </xsl:call-template>
14102
+ </xsl:template>
14582
14103
 
14583
- <xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image']" mode="update_xml_step2">
14584
- <xsl:copy-of select="."/>
14585
- </xsl:template>
14104
+ <xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image']" mode="update_xml_step2">
14105
+ <xsl:copy-of select="."/>
14106
+ </xsl:template>
14586
14107
 
14587
- <!-- =========================================================================== -->
14588
- <!-- END STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
14589
- <!-- =========================================================================== -->
14108
+ <!-- =========================================================================== -->
14109
+ <!-- END STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
14110
+ <!-- =========================================================================== -->
14590
14111
 
14591
14112
  <!-- =========================================================================== -->
14592
14113
  <!-- XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
@@ -14627,7 +14148,6 @@
14627
14148
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
14628
14149
  <xsl:if test="not(ancestor::*[local-name() = 'table'])"><regex><xsl:value-of select="$regex_standard_reference"/></regex></xsl:if>
14629
14150
  <!-- if EXPRESS reference -->
14630
-
14631
14151
  <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
14632
14152
  <regex><xsl:value-of select="$regex_solidus_units"/></regex>
14633
14153
  <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
@@ -14681,8 +14201,7 @@
14681
14201
 
14682
14202
  <xsl:variable name="text2">
14683
14203
  <xsl:element name="text" namespace="{$namespace_full}">
14684
- <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()">
14685
- <xsl:copy-of select="."/>
14204
+ <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()"><xsl:copy-of select="."/>
14686
14205
  </xsl:for-each>
14687
14206
  </xsl:element>
14688
14207
  </xsl:variable>
@@ -14974,11 +14493,10 @@
14974
14493
  </xsl:attribute>
14975
14494
  <xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
14976
14495
  <xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
14977
-
14978
- <xsl:choose>
14979
- <xsl:when test="ancestor::*[local-name() = 'ul' or local-name() ='ol' or local-name() = 'bibitem' or local-name() = 'quote']">true</xsl:when>
14980
- <xsl:otherwise><xsl:value-of select="$skip_footnote_body_"/></xsl:otherwise>
14981
- </xsl:choose>
14496
+ <xsl:choose>
14497
+ <xsl:when test="ancestor::*[local-name() = 'ul' or local-name() ='ol' or local-name() = 'bibitem' or local-name() = 'quote']">true</xsl:when>
14498
+ <xsl:otherwise><xsl:value-of select="$skip_footnote_body_"/></xsl:otherwise>
14499
+ </xsl:choose>
14982
14500
 
14983
14501
  </xsl:attribute>
14984
14502
  <xsl:attribute name="ref_id">
@@ -15068,7 +14586,6 @@
15068
14586
 
15069
14587
  <xsl:template name="printEdition">
15070
14588
  <xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
15071
-
15072
14589
  <xsl:choose>
15073
14590
  <xsl:when test="$edition_i18n != ''">
15074
14591
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -15297,16 +14814,32 @@
15297
14814
  <dc:title>
15298
14815
  <xsl:variable name="title">
15299
14816
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
15300
-
15301
- <xsl:choose>
15302
- <xsl:when test="*[local-name() = 'title'][@language = $lang and @type = 'main']">
15303
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
15304
- </xsl:when>
15305
- <xsl:otherwise>
15306
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'title-main']"/>
15307
- </xsl:otherwise>
15308
- </xsl:choose>
15309
-
14817
+ <xsl:choose>
14818
+ <xsl:when test="*[local-name() = 'title'][@language = $lang and @type = 'main']">
14819
+ <!-- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/> -->
14820
+ <xsl:variable name="bibdata_doctype" select="*[local-name() = 'ext']/*[local-name() = 'doctype']"/>
14821
+ <xsl:if test="$bibdata_doctype = 'amendment'">
14822
+ <xsl:variable name="bibdata_doctype_localized" select="*[local-name() = 'ext']/*[local-name() = 'doctype'][@language = $lang]"/>
14823
+ <xsl:variable name="bibdata_amendment_number" select="*[local-name() = 'ext']/*[local-name() = 'structuredidentifier']/*[local-name() = 'project-number']/@amendment"/>
14824
+ <xsl:value-of select="normalize-space(concat($bibdata_doctype_localized, ' ', $bibdata_amendment_number))"/>
14825
+ <xsl:text> — </xsl:text>
14826
+ </xsl:if>
14827
+ <xsl:variable name="partnumber" select="*[local-name() = 'ext']/*[local-name() = 'structuredidentifier']/*[local-name() = 'project-number']/@part"/>
14828
+ <xsl:for-each select="*[local-name() = 'title'][@language = $lang and @type = 'title-intro'] | *[local-name() = 'title'][@language = $lang and @type = 'title-main'] | *[local-name() = 'title'][@language = $lang and @type = 'title-complementary'] | *[local-name() = 'title'][@language = $lang and @type = 'title-part']">
14829
+ <xsl:if test="@type = 'title-part'">
14830
+ <xsl:call-template name="getLocalizedString"><xsl:with-param name="key">locality.part</xsl:with-param></xsl:call-template>
14831
+ <xsl:text> </xsl:text>
14832
+ <xsl:value-of select="$partnumber"/>
14833
+ <xsl:text>: </xsl:text>
14834
+ </xsl:if>
14835
+ <xsl:value-of select="."/>
14836
+ <xsl:if test="position() != last()"><xsl:text> — </xsl:text></xsl:if>
14837
+ </xsl:for-each>
14838
+ </xsl:when>
14839
+ <xsl:otherwise>
14840
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'title-main']"/>
14841
+ </xsl:otherwise>
14842
+ </xsl:choose>
15310
14843
  </xsl:for-each>
15311
14844
  </xsl:variable>
15312
14845
  <rdf:Alt>
@@ -15324,16 +14857,14 @@
15324
14857
  </dc:title>
15325
14858
  <xsl:variable name="dc_creator">
15326
14859
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
15327
-
15328
- <rdf:Seq>
15329
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
15330
- <rdf:li>
15331
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
15332
- </rdf:li>
15333
- <!-- <xsl:if test="position() != last()">; </xsl:if> -->
15334
- </xsl:for-each>
15335
- </rdf:Seq>
15336
-
14860
+ <rdf:Seq>
14861
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role'][not(*[local-name() = 'description'])]/@type='author']">
14862
+ <rdf:li>
14863
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
14864
+ </rdf:li>
14865
+ <!-- <xsl:if test="position() != last()">; </xsl:if> -->
14866
+ </xsl:for-each>
14867
+ </rdf:Seq>
15337
14868
  </xsl:for-each>
15338
14869
  </xsl:variable>
15339
14870
  <xsl:if test="normalize-space($dc_creator) != ''">
@@ -15344,9 +14875,7 @@
15344
14875
 
15345
14876
  <xsl:variable name="dc_description">
15346
14877
  <xsl:variable name="abstract">
15347
-
15348
- <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
15349
-
14878
+ <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
15350
14879
  </xsl:variable>
15351
14880
  <rdf:Alt>
15352
14881
  <rdf:li xml:lang="x-default">
@@ -15411,7 +14940,9 @@
15411
14940
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
15412
14941
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
15413
14942
  <xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
15414
- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
14943
+ <!-- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/> -->
14944
+ <!-- See https://github.com/metanorma/metanorma-iso/issues/1369 -->
14945
+ <xsl:variable name="url" select="concat('url(file:///',$outputpdf_basepath, $attachment_path, ')')"/>
15415
14946
  <xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
15416
14947
  <!-- Todo: need update -->
15417
14948
  <xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
@@ -15576,7 +15107,7 @@
15576
15107
  <xsl:param name="normalize-space" select="'true'"/>
15577
15108
  <xsl:param name="keep_sep" select="'false'"/>
15578
15109
  <xsl:if test="string-length($pText) &gt;0">
15579
- <item>
15110
+ <xsl:element name="item" namespace="{$namespace_mn_xsl}">
15580
15111
  <xsl:choose>
15581
15112
  <xsl:when test="$normalize-space = 'true'">
15582
15113
  <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
@@ -15585,8 +15116,8 @@
15585
15116
  <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
15586
15117
  </xsl:otherwise>
15587
15118
  </xsl:choose>
15588
- </item>
15589
- <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><item><xsl:value-of select="$sep"/></item></xsl:if>
15119
+ </xsl:element>
15120
+ <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>
15590
15121
  <xsl:call-template name="split">
15591
15122
  <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
15592
15123
  <xsl:with-param name="sep" select="$sep"/>
@@ -15604,28 +15135,6 @@
15604
15135
  <xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
15605
15136
  </xsl:template>
15606
15137
 
15607
- <xsl:template name="namespaceCheck">
15608
- <xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
15609
- <xsl:variable name="XSLNS">
15610
-
15611
- </xsl:variable>
15612
- <!-- <xsl:if test="$documentNS != $XSLNS">
15613
- <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
15614
- </xsl:if> -->
15615
- </xsl:template> <!-- namespaceCheck -->
15616
-
15617
- <xsl:template name="getLanguage">
15618
- <xsl:param name="lang"/>
15619
- <xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
15620
- <xsl:choose>
15621
- <xsl:when test="$language = 'en'">English</xsl:when>
15622
- <xsl:when test="$language = 'fr'">French</xsl:when>
15623
- <xsl:when test="$language = 'de'">Deutsch</xsl:when>
15624
- <xsl:when test="$language = 'cn'">Chinese</xsl:when>
15625
- <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
15626
- </xsl:choose>
15627
- </xsl:template>
15628
-
15629
15138
  <xsl:template name="setId">
15630
15139
  <xsl:param name="prefix"/>
15631
15140
  <xsl:attribute name="id">