metanorma-itu 2.6.7 → 2.6.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:itu="https://www.metanorma.org/ns/standoc" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java redirect" extension-element-prefixes="redirect" version="1.0">
1
+ <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:itu="https://www.metanorma.org/ns/standoc" xmlns:mn="https://www.metanorma.org/ns/xslt" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java redirect" extension-element-prefixes="redirect" version="1.0">
2
2
 
3
3
  <xsl:output method="xml" encoding="UTF-8" indent="no"/>
4
4
 
@@ -32,8 +32,8 @@
32
32
  </xsl:variable>
33
33
 
34
34
  <xsl:for-each select="xalan:nodeset($current_document)">
35
- <doc num="{$num}" firstpage_id="firstpage_id_{$num}" title-part="{$docnumber}" bundle="{$bundle}"> <!-- 'bundle' means several different documents (not language versions) in one xml -->
36
- <contents>
35
+ <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 -->
36
+ <mn:contents>
37
37
  <xsl:call-template name="processMainSectionsDefault_Contents"/>
38
38
 
39
39
  <xsl:apply-templates select="//itu:table" mode="contents"/>
@@ -43,15 +43,14 @@
43
43
  <xsl:call-template name="processTablesFigures_Contents">
44
44
  <xsl:with-param name="always" select="$doctype = 'technical-report' or $doctype = 'technical-paper'"/>
45
45
  </xsl:call-template>
46
- </contents>
47
- </doc>
46
+ </mn:contents>
47
+ </mn:doc>
48
48
  </xsl:for-each>
49
49
  </xsl:for-each>
50
50
  </xsl:variable>
51
51
  <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
52
52
 
53
53
  <xsl:template match="/">
54
- <xsl:call-template name="namespaceCheck"/>
55
54
  <fo:root xml:lang="{$lang}">
56
55
  <xsl:variable name="root-style">
57
56
  <root-style xsl:use-attribute-sets="root-style">
@@ -1819,7 +1818,7 @@
1819
1818
  <fo:block role="TOC">
1820
1819
  <xsl:if test="count(*) = 1 and *[local-name() = 'title']"> <!-- if there isn't user ToC -->
1821
1820
 
1822
- <xsl:for-each select="$contents/doc[@num = $num]//item[@display = 'true']">
1821
+ <xsl:for-each select="$contents/mn:doc[@num = $num]//mn:item[@display = 'true']">
1823
1822
  <fo:block role="TOCI">
1824
1823
  <xsl:if test="@level = 1">
1825
1824
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
@@ -1858,8 +1857,8 @@
1858
1857
  </fo:list-item-label>
1859
1858
  <fo:list-item-body start-indent="body-start()">
1860
1859
  <fo:block text-align-last="justify">
1861
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
1862
- <xsl:apply-templates select="title"/>
1860
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{mn:title}">
1861
+ <xsl:apply-templates select="mn:title"/>
1863
1862
  <fo:inline keep-together.within-line="always">
1864
1863
  <fo:leader leader-pattern="dots"/>
1865
1864
  <fo:page-number-citation ref-id="{@id}"/>
@@ -1875,7 +1874,7 @@
1875
1874
  <xsl:variable name="i18n_page"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">Page.sg</xsl:with-param><xsl:with-param name="bibdata_updated" select="/*/itu:bibdata"/></xsl:call-template></xsl:variable>
1876
1875
 
1877
1876
  <!-- List of Tables -->
1878
- <xsl:if test="$contents//tables/table">
1877
+ <xsl:if test="$contents//mn:tables/mn:table">
1879
1878
  <xsl:call-template name="insertListOf_Title">
1880
1879
  <xsl:with-param name="title" select="$title-list-tables"/>
1881
1880
  </xsl:call-template>
@@ -1883,14 +1882,14 @@
1883
1882
  <xsl:value-of select="$i18n_page"/>
1884
1883
  </fo:block>
1885
1884
  <fo:block-container>
1886
- <xsl:for-each select="$contents//tables/table">
1885
+ <xsl:for-each select="$contents//mn:tables/mn:table">
1887
1886
  <xsl:call-template name="insertListOf_Item"/>
1888
1887
  </xsl:for-each>
1889
1888
  </fo:block-container>
1890
1889
  </xsl:if>
1891
1890
 
1892
1891
  <!-- List of Figures -->
1893
- <xsl:if test="$contents//figures/figure">
1892
+ <xsl:if test="$contents//mn:figures/mn:figure">
1894
1893
  <xsl:call-template name="insertListOf_Title">
1895
1894
  <xsl:with-param name="title" select="$title-list-figures"/>
1896
1895
  </xsl:call-template>
@@ -1898,7 +1897,7 @@
1898
1897
  <xsl:value-of select="$i18n_page"/>
1899
1898
  </fo:block>
1900
1899
  <fo:block-container>
1901
- <xsl:for-each select="$contents//figures/figure">
1900
+ <xsl:for-each select="$contents//mn:figures/mn:figure">
1902
1901
  <xsl:call-template name="insertListOf_Item"/>
1903
1902
  </xsl:for-each>
1904
1903
  </fo:block-container>
@@ -2007,13 +2006,13 @@
2007
2006
  <xsl:call-template name="getName"/>
2008
2007
  </xsl:variable>
2009
2008
 
2010
- <item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
2009
+ <mn:item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
2011
2010
  <xsl:call-template name="setId"/>
2012
- <title>
2011
+ <mn:title>
2013
2012
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
2014
- </title>
2013
+ </mn:title>
2015
2014
  <xsl:apply-templates mode="contents"/>
2016
- </item>
2015
+ </mn:item>
2017
2016
 
2018
2017
  </xsl:if>
2019
2018
 
@@ -3042,34 +3041,25 @@
3042
3041
  </xsl:if>
3043
3042
  </xsl:template>
3044
3043
 
3045
- <!-- <xsl:strip-space elements="itu:xref"/> -->
3044
+ <!-- https://www.metanorma.org/ns/standoc -->
3045
+ <xsl:variable name="namespace_full" select="namespace-uri(//*[local-name() = 'metanorma'][1])"/>
3046
3046
 
3047
- <xsl:variable name="namespace_full_">
3048
- <xsl:choose>
3049
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
3050
- <xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
3051
- </xsl:choose>
3052
- </xsl:variable>
3053
- <xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
3047
+ <!-- https://www.metanorma.org/ns/xsl -->
3048
+ <xsl:variable name="namespace_mn_xsl">https://www.metanorma.org/ns/xslt</xsl:variable>
3054
3049
 
3055
- <xsl:variable name="root_element_">
3056
- <xsl:choose>
3057
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
3058
- <xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
3059
- </xsl:choose>
3060
- </xsl:variable>
3061
- <xsl:variable name="root_element" select="normalize-space($root_element_)"/>
3050
+ <xsl:variable name="root_element">metanorma</xsl:variable>
3062
3051
 
3052
+ <!---examples: 2013, 2024 -->
3063
3053
  <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'])"/>
3064
3054
 
3065
3055
  <!-- external parameters -->
3066
-
3067
3056
  <xsl:param name="svg_images"/> <!-- svg images array -->
3068
3057
  <xsl:variable name="images" select="document($svg_images)"/>
3069
3058
  <xsl:param name="basepath"/> <!-- base path for images -->
3070
3059
  <xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
3071
3060
  <xsl:param name="inputxml_filename"/> <!-- input xml file name -->
3072
3061
  <xsl:param name="output_path"/> <!-- output PDF file name -->
3062
+ <xsl:param name="outputpdf_basepath"/> <!-- output PDF folder -->
3073
3063
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
3074
3064
  <xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
3075
3065
  <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 -->
@@ -3116,20 +3106,13 @@
3116
3106
 
3117
3107
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
3118
3108
 
3119
- <xsl:variable name="isApplyAutolayoutAlgorithm_">
3120
- true
3109
+ <!-- don't remove and rename this variable, it's using in mn2pdf tool -->
3110
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">true
3121
3111
  </xsl:variable>
3122
3112
  <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
3123
3113
 
3124
- <xsl:variable name="isGenerateTableIF_">
3125
- <xsl:choose>
3126
- <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
3127
- <xsl:value-of select="normalize-space($table_if) = 'true'"/>
3128
- </xsl:when>
3129
- <xsl:otherwise>false</xsl:otherwise>
3130
- </xsl:choose>
3131
- </xsl:variable>
3132
- <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
3114
+ <xsl:variable name="isGenerateTableIF"><xsl:value-of select="$table_if"/></xsl:variable>
3115
+ <!-- <xsl:variable name="isGenerateTableIF" select="normalize-space(normalize-space($table_if) = 'true' and 1 = 1)"/> -->
3133
3116
 
3134
3117
  <xsl:variable name="lang">
3135
3118
  <xsl:call-template name="getLang"/>
@@ -3181,8 +3164,7 @@
3181
3164
  <xsl:variable name="pageWidth_">
3182
3165
  <xsl:choose>
3183
3166
  <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
3184
- <xsl:otherwise>
3185
- 210
3167
+ <xsl:otherwise>210
3186
3168
  </xsl:otherwise>
3187
3169
  </xsl:choose>
3188
3170
  </xsl:variable>
@@ -3192,8 +3174,7 @@
3192
3174
  <xsl:variable name="pageHeight_">
3193
3175
  <xsl:choose>
3194
3176
  <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
3195
- <xsl:otherwise>
3196
- 297
3177
+ <xsl:otherwise>297
3197
3178
  </xsl:otherwise>
3198
3179
  </xsl:choose>
3199
3180
  </xsl:variable>
@@ -3202,23 +3183,19 @@
3202
3183
  <!-- Page margins in mm (just digits, without 'mm')-->
3203
3184
  <!-- marginLeftRight1 and marginLeftRight2 - is left or right margin depends on odd/even page,
3204
3185
  for example, left margin on odd page and right margin on even page -->
3205
- <xsl:variable name="marginLeftRight1_">
3206
- 20
3186
+ <xsl:variable name="marginLeftRight1_">20
3207
3187
  </xsl:variable>
3208
3188
  <xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/>
3209
3189
 
3210
- <xsl:variable name="marginLeftRight2_">
3211
- 20
3190
+ <xsl:variable name="marginLeftRight2_">20
3212
3191
  </xsl:variable>
3213
3192
  <xsl:variable name="marginLeftRight2" select="normalize-space($marginLeftRight2_)"/>
3214
3193
 
3215
- <xsl:variable name="marginTop_">
3216
- 20
3194
+ <xsl:variable name="marginTop_">20
3217
3195
  </xsl:variable>
3218
3196
  <xsl:variable name="marginTop" select="normalize-space($marginTop_)"/>
3219
3197
 
3220
- <xsl:variable name="marginBottom_">
3221
- 20
3198
+ <xsl:variable name="marginBottom_">20
3222
3199
  </xsl:variable>
3223
3200
  <xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
3224
3201
 
@@ -3267,13 +3244,10 @@
3267
3244
  <title-toc lang="zh">目次</title-toc>
3268
3245
 
3269
3246
  <title-part lang="en">
3270
-
3271
3247
  </title-part>
3272
3248
  <title-part lang="fr">
3273
-
3274
3249
  </title-part>
3275
3250
  <title-part lang="ru">
3276
-
3277
3251
  </title-part>
3278
3252
  <title-part lang="zh">第 # 部分:</title-part>
3279
3253
 
@@ -3369,11 +3343,9 @@
3369
3343
  <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>
3370
3344
  <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>
3371
3345
  <xsl:attribute-set name="root-style">
3372
-
3373
- <xsl:attribute name="font-family">Times New Roman, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
3374
- <xsl:attribute name="font-family-generic">Serif</xsl:attribute>
3375
- <xsl:attribute name="font-size">12pt</xsl:attribute>
3376
-
3346
+ <xsl:attribute name="font-family">Times New Roman, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
3347
+ <xsl:attribute name="font-family-generic">Serif</xsl:attribute>
3348
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
3377
3349
  </xsl:attribute-set> <!-- root-style -->
3378
3350
 
3379
3351
  <xsl:template name="insertRootStyle">
@@ -3461,31 +3433,24 @@
3461
3433
 
3462
3434
  <!-- Preface sections styles -->
3463
3435
  <xsl:attribute-set name="copyright-statement-style">
3464
-
3465
3436
  </xsl:attribute-set> <!-- copyright-statement-style -->
3466
3437
 
3467
3438
  <xsl:attribute-set name="copyright-statement-title-style">
3468
-
3469
3439
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
3470
3440
 
3471
3441
  <xsl:attribute-set name="copyright-statement-p-style">
3472
-
3473
3442
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
3474
3443
 
3475
3444
  <xsl:attribute-set name="license-statement-style">
3476
-
3477
3445
  </xsl:attribute-set>
3478
3446
 
3479
3447
  <xsl:attribute-set name="license-statement-title-style">
3480
3448
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3481
-
3482
- <xsl:attribute name="text-align">center</xsl:attribute>
3483
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
3484
-
3449
+ <xsl:attribute name="text-align">center</xsl:attribute>
3450
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3485
3451
  </xsl:attribute-set> <!-- license-statement-title-style -->
3486
3452
 
3487
3453
  <xsl:attribute-set name="license-statement-p-style">
3488
-
3489
3454
  </xsl:attribute-set> <!-- license-statement-p-style -->
3490
3455
 
3491
3456
  <xsl:attribute-set name="legal-statement-style">
@@ -3494,89 +3459,69 @@
3494
3459
 
3495
3460
  <xsl:attribute-set name="legal-statement-title-style">
3496
3461
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3497
-
3498
- <xsl:attribute name="text-align">center</xsl:attribute>
3499
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
3500
-
3462
+ <xsl:attribute name="text-align">center</xsl:attribute>
3463
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3501
3464
  </xsl:attribute-set> <!-- legal-statement-title-style -->
3502
3465
 
3503
3466
  <xsl:attribute-set name="legal-statement-p-style">
3504
-
3505
3467
  </xsl:attribute-set> <!-- legal-statement-p-style -->
3506
3468
 
3507
3469
  <xsl:attribute-set name="feedback-statement-style">
3508
-
3509
3470
  </xsl:attribute-set> <!-- feedback-statement-style -->
3510
3471
 
3511
3472
  <xsl:attribute-set name="feedback-statement-title-style">
3512
3473
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3513
-
3514
3474
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
3515
3475
 
3516
3476
  <xsl:attribute-set name="feedback-statement-p-style">
3517
-
3518
3477
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
3519
3478
 
3520
3479
  <!-- End Preface sections styles -->
3521
3480
 
3522
3481
  <xsl:attribute-set name="link-style">
3523
-
3524
3482
  </xsl:attribute-set>
3525
3483
 
3526
3484
  <xsl:template name="refine_link-style">
3527
-
3528
3485
  </xsl:template> <!-- refine_link-style -->
3529
3486
 
3530
3487
  <xsl:attribute-set name="sourcecode-container-style">
3531
-
3532
3488
  </xsl:attribute-set>
3533
3489
 
3534
3490
  <xsl:attribute-set name="sourcecode-style">
3535
3491
  <xsl:attribute name="white-space">pre</xsl:attribute>
3536
3492
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
3537
3493
  <xsl:attribute name="role">Code</xsl:attribute>
3538
-
3539
- <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
3540
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
3541
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3542
-
3494
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
3495
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3496
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3543
3497
  </xsl:attribute-set>
3544
3498
 
3545
3499
  <xsl:template name="refine_sourcecode-style">
3546
-
3547
3500
  </xsl:template> <!-- refine_sourcecode-style -->
3548
3501
 
3549
3502
  <xsl:attribute-set name="pre-style">
3550
3503
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
3551
3504
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3552
-
3553
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
3554
-
3505
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3555
3506
  </xsl:attribute-set>
3556
3507
 
3557
3508
  <xsl:attribute-set name="permission-style">
3558
-
3559
3509
  </xsl:attribute-set>
3560
3510
 
3561
3511
  <xsl:attribute-set name="permission-name-style">
3562
-
3563
3512
  </xsl:attribute-set>
3564
3513
 
3565
3514
  <xsl:attribute-set name="permission-label-style">
3566
-
3567
3515
  </xsl:attribute-set>
3568
3516
 
3569
3517
  <xsl:attribute-set name="requirement-style">
3570
-
3571
3518
  </xsl:attribute-set>
3572
3519
 
3573
3520
  <xsl:attribute-set name="requirement-name-style">
3574
3521
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3575
-
3576
3522
  </xsl:attribute-set>
3577
3523
 
3578
3524
  <xsl:attribute-set name="requirement-label-style">
3579
-
3580
3525
  </xsl:attribute-set>
3581
3526
 
3582
3527
  <xsl:attribute-set name="subject-style">
@@ -3604,130 +3549,103 @@
3604
3549
  </xsl:attribute-set>
3605
3550
 
3606
3551
  <xsl:attribute-set name="recommendation-style">
3607
-
3608
3552
  </xsl:attribute-set>
3609
3553
 
3610
3554
  <xsl:attribute-set name="recommendation-name-style">
3611
-
3612
3555
  </xsl:attribute-set>
3613
3556
 
3614
3557
  <xsl:attribute-set name="recommendation-label-style">
3615
-
3616
3558
  </xsl:attribute-set>
3617
3559
 
3618
3560
  <xsl:attribute-set name="termexample-style">
3619
-
3620
3561
  </xsl:attribute-set>
3621
3562
 
3622
3563
  <xsl:template name="refine_termexample-style">
3623
-
3624
3564
  </xsl:template>
3625
3565
 
3626
3566
  <xsl:attribute-set name="example-style">
3627
-
3628
- <xsl:attribute name="font-size">10pt</xsl:attribute>
3629
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
3630
-
3567
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
3568
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
3631
3569
  </xsl:attribute-set> <!-- example-style -->
3632
3570
 
3633
3571
  <xsl:template name="refine_example-style">
3634
-
3635
3572
  </xsl:template> <!-- refine_example-style -->
3636
3573
 
3637
3574
  <xsl:attribute-set name="example-body-style">
3638
-
3639
3575
  </xsl:attribute-set> <!-- example-body-style -->
3640
3576
 
3641
3577
  <xsl:attribute-set name="example-name-style">
3642
-
3643
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
3644
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3645
-
3578
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
3579
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3646
3580
  </xsl:attribute-set> <!-- example-name-style -->
3647
3581
 
3648
3582
  <xsl:template name="refine_example-name-style">
3649
-
3650
3583
  </xsl:template>
3651
3584
 
3652
3585
  <xsl:attribute-set name="example-p-style">
3653
-
3654
- <xsl:attribute name="font-size">10pt</xsl:attribute>
3655
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
3656
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3586
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
3587
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
3588
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3657
3589
 
3658
3590
  </xsl:attribute-set> <!-- example-p-style -->
3659
3591
 
3660
3592
  <xsl:template name="refine_example-p-style">
3661
-
3662
3593
  </xsl:template> <!-- refine_example-p-style -->
3663
3594
 
3664
3595
  <xsl:attribute-set name="termexample-name-style">
3665
-
3666
3596
  </xsl:attribute-set> <!-- termexample-name-style -->
3667
3597
 
3668
3598
  <xsl:template name="refine_termexample-name-style">
3669
-
3670
3599
  </xsl:template>
3671
3600
 
3672
3601
  <!-- ========================== -->
3673
3602
  <!-- Table styles -->
3674
3603
  <!-- ========================== -->
3675
3604
  <xsl:variable name="table-border_">
3676
-
3677
3605
  </xsl:variable>
3678
3606
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
3679
3607
 
3680
3608
  <xsl:variable name="table-cell-border_">
3681
-
3682
3609
  </xsl:variable>
3683
3610
  <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
3684
3611
 
3685
3612
  <xsl:attribute-set name="table-container-style">
3686
3613
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
3687
3614
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
3688
-
3689
- <xsl:attribute name="font-size">10pt</xsl:attribute>
3690
- <xsl:attribute name="space-after">18pt</xsl:attribute>
3691
-
3615
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
3616
+ <xsl:attribute name="space-after">18pt</xsl:attribute>
3692
3617
  </xsl:attribute-set> <!-- table-container-style -->
3693
3618
 
3694
3619
  <xsl:template name="refine_table-container-style">
3695
3620
  <xsl:param name="margin-side"/>
3696
-
3697
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3698
- <xsl:if test="$doctype = 'service-publication' and $lang != 'ar'">
3699
- <xsl:attribute name="font-family">Calibri</xsl:attribute>
3700
- </xsl:if>
3701
-
3621
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3622
+ <xsl:if test="$doctype = 'service-publication' and $lang != 'ar'">
3623
+ <xsl:attribute name="font-family">Calibri</xsl:attribute>
3624
+ </xsl:if>
3702
3625
  <!-- end table block-container attributes -->
3703
3626
  </xsl:template> <!-- refine_table-container-style -->
3704
3627
 
3705
3628
  <xsl:attribute-set name="table-style">
3706
3629
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
3707
3630
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
3708
-
3709
3631
  </xsl:attribute-set><!-- table-style -->
3710
3632
 
3711
3633
  <xsl:template name="refine_table-style">
3712
3634
  <xsl:param name="margin-side"/>
3713
3635
 
3714
3636
  <xsl:call-template name="setBordersTableArray"/>
3715
-
3716
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3717
- <xsl:if test="$doctype = 'service-publication'">
3718
- <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3719
- </xsl:if>
3720
-
3637
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3638
+ <xsl:if test="$doctype = 'service-publication'">
3639
+ <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3640
+ </xsl:if>
3721
3641
  </xsl:template> <!-- refine_table-style -->
3722
3642
 
3723
3643
  <xsl:attribute-set name="table-name-style">
3724
3644
  <xsl:attribute name="role">Caption</xsl:attribute>
3725
3645
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3726
-
3727
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3728
- <xsl:attribute name="text-align">center</xsl:attribute>
3729
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3730
-
3646
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3647
+ <xsl:attribute name="text-align">center</xsl:attribute>
3648
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3731
3649
  </xsl:attribute-set> <!-- table-name-style -->
3732
3650
 
3733
3651
  <xsl:template name="refine_table-name-style">
@@ -3735,36 +3653,29 @@
3735
3653
  <xsl:if test="$continued = 'true'">
3736
3654
  <xsl:attribute name="role">SKIP</xsl:attribute>
3737
3655
  </xsl:if>
3738
-
3739
3656
  </xsl:template> <!-- refine_table-name-style -->
3740
3657
 
3741
3658
  <xsl:attribute-set name="table-row-style">
3742
3659
  <xsl:attribute name="min-height">4mm</xsl:attribute>
3743
-
3744
3660
  </xsl:attribute-set>
3745
3661
 
3746
3662
  <xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
3747
3663
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3748
-
3749
3664
  </xsl:attribute-set>
3750
3665
 
3751
3666
  <xsl:template name="refine_table-header-row-style">
3752
3667
 
3753
3668
  <xsl:call-template name="setBordersTableArray"/>
3754
-
3755
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3756
- <xsl:if test="$doctype = 'service-publication'">
3757
- <xsl:attribute name="border-bottom">1.1pt solid black</xsl:attribute>
3758
- </xsl:if>
3759
-
3669
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3670
+ <xsl:if test="$doctype = 'service-publication'">
3671
+ <xsl:attribute name="border-bottom">1.1pt solid black</xsl:attribute>
3672
+ </xsl:if>
3760
3673
  </xsl:template> <!-- refine_table-header-row-style -->
3761
3674
 
3762
3675
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
3763
-
3764
3676
  </xsl:attribute-set>
3765
3677
 
3766
3678
  <xsl:template name="refine_table-footer-row-style">
3767
-
3768
3679
  </xsl:template> <!-- refine_table-footer-row-style -->
3769
3680
 
3770
3681
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
@@ -3774,7 +3685,6 @@
3774
3685
  <xsl:template name="refine_table-body-row-style">
3775
3686
 
3776
3687
  <xsl:call-template name="setBordersTableArray"/>
3777
-
3778
3688
  </xsl:template> <!-- refine_table-body-row-style -->
3779
3689
 
3780
3690
  <xsl:attribute-set name="table-header-cell-style">
@@ -3782,41 +3692,36 @@
3782
3692
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
3783
3693
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3784
3694
  <xsl:attribute name="display-align">center</xsl:attribute>
3785
-
3786
3695
  </xsl:attribute-set> <!-- table-header-cell-style -->
3787
3696
 
3788
3697
  <xsl:template name="refine_table-header-cell-style">
3789
3698
 
3790
3699
  <xsl:call-template name="setBordersTableArray"/>
3791
-
3792
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3793
- <xsl:if test="ancestor::*[local-name()='preface']">
3794
- <xsl:if test="$doctype != 'service-publication'">
3795
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3796
- </xsl:if>
3797
- </xsl:if>
3798
- <xsl:if test="$doctype = 'service-publication'">
3799
- <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3800
- <xsl:attribute name="border-bottom">1pt solid black</xsl:attribute>
3801
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
3700
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3701
+ <xsl:if test="ancestor::*[local-name()='preface']">
3702
+ <xsl:if test="$doctype != 'service-publication'">
3703
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3802
3704
  </xsl:if>
3705
+ </xsl:if>
3706
+ <xsl:if test="$doctype = 'service-publication'">
3707
+ <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3708
+ <xsl:attribute name="border-bottom">1pt solid black</xsl:attribute>
3709
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
3710
+ </xsl:if>
3803
3711
 
3804
3712
  <xsl:if test="$lang = 'ar'">
3805
3713
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3806
3714
  </xsl:if>
3807
3715
 
3808
3716
  <xsl:call-template name="setTableCellAttributes"/>
3809
-
3810
3717
  </xsl:template> <!-- refine_table-header-cell-style -->
3811
3718
 
3812
3719
  <xsl:attribute-set name="table-cell-style">
3813
3720
  <xsl:attribute name="display-align">center</xsl:attribute>
3814
3721
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
3815
3722
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3816
-
3817
- <xsl:attribute name="border">solid black 1pt</xsl:attribute>
3818
- <xsl:attribute name="display-align">before</xsl:attribute>
3819
-
3723
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
3724
+ <xsl:attribute name="display-align">before</xsl:attribute>
3820
3725
  </xsl:attribute-set> <!-- table-cell-style -->
3821
3726
 
3822
3727
  <xsl:template name="refine_table-cell-style">
@@ -3825,18 +3730,15 @@
3825
3730
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3826
3731
  </xsl:if>
3827
3732
 
3828
- <!-- bsi -->
3829
-
3830
3733
  <xsl:call-template name="setBordersTableArray"/>
3831
-
3832
- <xsl:if test="ancestor::*[local-name()='preface']">
3833
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3834
- </xsl:if>
3835
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3836
- <xsl:if test="$doctype = 'service-publication'">
3837
- <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3838
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
3839
- </xsl:if>
3734
+ <xsl:if test="ancestor::*[local-name()='preface']">
3735
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3736
+ </xsl:if>
3737
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3738
+ <xsl:if test="$doctype = 'service-publication'">
3739
+ <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3740
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
3741
+ </xsl:if>
3840
3742
 
3841
3743
  </xsl:template> <!-- refine_table-cell-style -->
3842
3744
 
@@ -3845,74 +3747,59 @@
3845
3747
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
3846
3748
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3847
3749
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
3848
-
3849
3750
  </xsl:attribute-set> <!-- table-footer-cell-style -->
3850
3751
 
3851
3752
  <xsl:template name="refine_table-footer-cell-style">
3852
-
3853
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3854
- <xsl:if test="ancestor::*[local-name()='preface']">
3855
- <xsl:if test="$doctype != 'service-publication'">
3856
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3857
- </xsl:if>
3858
- </xsl:if>
3859
- <xsl:if test="$doctype = 'service-publication'">
3860
- <xsl:attribute name="border">none</xsl:attribute>
3753
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3754
+ <xsl:if test="ancestor::*[local-name()='preface']">
3755
+ <xsl:if test="$doctype != 'service-publication'">
3756
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3861
3757
  </xsl:if>
3862
-
3758
+ </xsl:if>
3759
+ <xsl:if test="$doctype = 'service-publication'">
3760
+ <xsl:attribute name="border">none</xsl:attribute>
3761
+ </xsl:if>
3863
3762
  </xsl:template> <!-- refine_table-footer-cell-style -->
3864
3763
 
3865
3764
  <xsl:attribute-set name="table-note-style">
3866
3765
  <xsl:attribute name="font-size">10pt</xsl:attribute>
3867
3766
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3868
-
3869
3767
  </xsl:attribute-set><!-- table-note-style -->
3870
3768
 
3871
3769
  <xsl:template name="refine_table-note-style">
3872
-
3873
3770
  </xsl:template> <!-- refine_table-note-style -->
3874
3771
 
3875
3772
  <xsl:attribute-set name="table-fn-style">
3876
3773
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3877
-
3878
- <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
3879
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
3880
- <xsl:attribute name="text-indent">-5mm</xsl:attribute>
3881
- <xsl:attribute name="start-indent">5mm</xsl:attribute>
3882
-
3774
+ <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
3775
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
3776
+ <xsl:attribute name="text-indent">-5mm</xsl:attribute>
3777
+ <xsl:attribute name="start-indent">5mm</xsl:attribute>
3883
3778
  </xsl:attribute-set> <!-- table-fn-style -->
3884
3779
 
3885
3780
  <xsl:template name="refine_table-fn-style">
3886
-
3887
3781
  </xsl:template>
3888
3782
 
3889
3783
  <xsl:attribute-set name="table-fn-number-style">
3890
3784
  <!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
3891
-
3892
- <!-- <xsl:attribute name="padding-right">3mm</xsl:attribute> -->
3893
-
3785
+ <!-- <xsl:attribute name="padding-right">3mm</xsl:attribute> -->
3894
3786
  </xsl:attribute-set> <!-- table-fn-number-style -->
3895
3787
 
3896
3788
  <xsl:attribute-set name="table-fmt-fn-label-style">
3897
3789
  <xsl:attribute name="font-size">80%</xsl:attribute>
3898
-
3899
- <xsl:attribute name="vertical-align">super</xsl:attribute>
3900
- <xsl:attribute name="font-size">70%</xsl:attribute>
3901
-
3790
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
3791
+ <xsl:attribute name="font-size">70%</xsl:attribute>
3902
3792
  </xsl:attribute-set> <!-- table-fmt-fn-label-style -->
3903
3793
 
3904
3794
  <xsl:template name="refine_table-fmt-fn-label-style">
3905
-
3906
3795
  </xsl:template>
3907
3796
 
3908
3797
  <xsl:attribute-set name="fn-container-body-style">
3909
3798
  <xsl:attribute name="text-indent">0</xsl:attribute>
3910
3799
  <xsl:attribute name="start-indent">0</xsl:attribute>
3911
-
3912
3800
  </xsl:attribute-set>
3913
3801
 
3914
3802
  <xsl:attribute-set name="table-fn-body-style">
3915
-
3916
3803
  </xsl:attribute-set>
3917
3804
 
3918
3805
  <xsl:attribute-set name="figure-fn-number-style">
@@ -3922,17 +3809,14 @@
3922
3809
  <xsl:attribute-set name="figure-fmt-fn-label-style">
3923
3810
  <xsl:attribute name="font-size">80%</xsl:attribute>
3924
3811
  <xsl:attribute name="vertical-align">super</xsl:attribute>
3925
-
3926
3812
  </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
3927
3813
 
3928
3814
  <xsl:template name="refine_figure-fmt-fn-label-style">
3929
-
3930
3815
  </xsl:template>
3931
3816
 
3932
3817
  <xsl:attribute-set name="figure-fn-body-style">
3933
3818
  <xsl:attribute name="text-align">justify</xsl:attribute>
3934
3819
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3935
-
3936
3820
  </xsl:attribute-set>
3937
3821
  <!-- ========================== -->
3938
3822
  <!-- END Table styles -->
@@ -3943,55 +3827,42 @@
3943
3827
  <!-- ========================== -->
3944
3828
 
3945
3829
  <xsl:attribute-set name="dl-block-style">
3946
-
3947
3830
  </xsl:attribute-set>
3948
3831
 
3949
3832
  <xsl:attribute-set name="dt-row-style">
3950
-
3951
3833
  </xsl:attribute-set>
3952
3834
 
3953
3835
  <xsl:attribute-set name="dt-cell-style">
3954
-
3955
3836
  </xsl:attribute-set>
3956
3837
 
3957
3838
  <xsl:template name="refine_dt-cell-style">
3958
-
3959
- <xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
3960
- <xsl:attribute name="padding-right">3mm</xsl:attribute>
3961
- </xsl:if>
3962
-
3839
+ <xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
3840
+ <xsl:attribute name="padding-right">3mm</xsl:attribute>
3841
+ </xsl:if>
3963
3842
  </xsl:template> <!-- refine_dt-cell-style -->
3964
3843
 
3965
3844
  <xsl:attribute-set name="dt-block-style">
3966
3845
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
3967
-
3968
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
3969
-
3846
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3970
3847
  </xsl:attribute-set>
3971
3848
 
3972
3849
  <xsl:template name="refine_dt-block-style">
3973
-
3974
- <xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
3975
- <xsl:attribute name="text-align">right</xsl:attribute>
3976
- </xsl:if>
3977
-
3850
+ <xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
3851
+ <xsl:attribute name="text-align">right</xsl:attribute>
3852
+ </xsl:if>
3978
3853
  </xsl:template> <!-- refine_dt-block-style -->
3979
3854
 
3980
3855
  <xsl:attribute-set name="dl-name-style">
3981
3856
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3982
3857
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3983
-
3984
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3985
-
3858
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3986
3859
  </xsl:attribute-set> <!-- dl-name-style -->
3987
3860
 
3988
3861
  <xsl:attribute-set name="dd-cell-style">
3989
3862
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
3990
-
3991
3863
  </xsl:attribute-set>
3992
3864
 
3993
3865
  <xsl:template name="refine_dd-cell-style">
3994
-
3995
3866
  </xsl:template> <!-- refine_dd-cell-style -->
3996
3867
 
3997
3868
  <!-- ========================== -->
@@ -3999,237 +3870,177 @@
3999
3870
  <!-- ========================== -->
4000
3871
 
4001
3872
  <xsl:attribute-set name="appendix-style">
4002
-
4003
3873
  </xsl:attribute-set>
4004
3874
 
4005
3875
  <xsl:attribute-set name="appendix-example-style">
4006
-
4007
3876
  </xsl:attribute-set>
4008
3877
 
4009
3878
  <xsl:attribute-set name="xref-style">
4010
-
4011
- <xsl:attribute name="color">blue</xsl:attribute>
4012
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
4013
-
3879
+ <xsl:attribute name="color">blue</xsl:attribute>
3880
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4014
3881
  </xsl:attribute-set>
4015
3882
 
4016
3883
  <xsl:attribute-set name="eref-style">
4017
-
4018
- <xsl:attribute name="color">blue</xsl:attribute>
4019
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
4020
-
3884
+ <xsl:attribute name="color">blue</xsl:attribute>
3885
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4021
3886
  </xsl:attribute-set>
4022
3887
 
4023
3888
  <xsl:template name="refine_eref-style">
4024
3889
  <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
4025
3890
  <xsl:variable name="text" select="normalize-space()"/>
4026
-
4027
3891
  </xsl:template> <!-- refine_eref-style -->
4028
3892
 
4029
3893
  <xsl:attribute-set name="note-style">
4030
-
4031
- <xsl:attribute name="font-size">11pt</xsl:attribute>
4032
- <xsl:attribute name="space-before">4pt</xsl:attribute>
4033
- <xsl:attribute name="text-align">justify</xsl:attribute>
4034
-
3894
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
3895
+ <xsl:attribute name="space-before">4pt</xsl:attribute>
3896
+ <xsl:attribute name="text-align">justify</xsl:attribute>
4035
3897
  </xsl:attribute-set>
4036
3898
 
4037
3899
  <xsl:template name="refine_note-style">
4038
-
4039
3900
  </xsl:template>
4040
3901
 
4041
3902
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
4042
3903
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
4043
3904
 
4044
3905
  <xsl:attribute-set name="note-name-style">
4045
-
4046
3906
  </xsl:attribute-set>
4047
3907
 
4048
3908
  <xsl:template name="refine_note-name-style">
4049
-
4050
3909
  </xsl:template> <!-- refine_note-name-style -->
4051
3910
 
4052
3911
  <xsl:attribute-set name="table-note-name-style">
4053
3912
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
4054
-
4055
3913
  </xsl:attribute-set>
4056
3914
 
4057
3915
  <xsl:template name="refine_table-note-name-style">
4058
-
4059
3916
  </xsl:template> <!-- refine_table-note-name-style -->
4060
3917
 
4061
3918
  <xsl:attribute-set name="note-p-style">
4062
-
4063
- <xsl:attribute name="space-before">4pt</xsl:attribute>
4064
-
3919
+ <xsl:attribute name="space-before">4pt</xsl:attribute>
4065
3920
  </xsl:attribute-set>
4066
3921
 
4067
3922
  <xsl:attribute-set name="termnote-style">
4068
-
4069
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
4070
-
3923
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
4071
3924
  </xsl:attribute-set>
4072
3925
 
4073
3926
  <xsl:template name="refine_termnote-style">
4074
-
4075
3927
  </xsl:template> <!-- refine_termnote-style -->
4076
3928
 
4077
3929
  <xsl:attribute-set name="termnote-name-style">
4078
-
4079
3930
  </xsl:attribute-set>
4080
3931
 
4081
3932
  <xsl:template name="refine_termnote-name-style">
4082
-
4083
- <!-- <xsl:if test="$namespace = 'ieee'">
4084
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
4085
- </xsl:if> -->
4086
-
4087
3933
  </xsl:template>
4088
3934
 
4089
3935
  <xsl:attribute-set name="termnote-p-style">
4090
-
4091
3936
  </xsl:attribute-set>
4092
3937
 
4093
3938
  <xsl:attribute-set name="quote-style">
4094
3939
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
4095
3940
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
4096
-
4097
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4098
-
3941
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4099
3942
  </xsl:attribute-set>
4100
3943
 
4101
3944
  <xsl:template name="refine_quote-style">
4102
-
4103
3945
  </xsl:template>
4104
3946
 
4105
3947
  <xsl:attribute-set name="quote-source-style">
4106
3948
  <xsl:attribute name="text-align">right</xsl:attribute>
4107
-
4108
3949
  </xsl:attribute-set>
4109
3950
 
4110
3951
  <xsl:attribute-set name="termsource-style">
4111
-
4112
3952
  </xsl:attribute-set>
4113
3953
 
4114
3954
  <xsl:template name="refine_termsource-style">
4115
-
4116
3955
  </xsl:template> <!-- refine_termsource-style -->
4117
3956
 
4118
3957
  <xsl:attribute-set name="termsource-text-style">
4119
-
4120
3958
  </xsl:attribute-set>
4121
3959
 
4122
3960
  <xsl:attribute-set name="origin-style">
4123
-
4124
3961
  </xsl:attribute-set>
4125
3962
 
4126
3963
  <xsl:attribute-set name="term-style">
4127
-
4128
3964
  </xsl:attribute-set>
4129
3965
 
4130
3966
  <xsl:attribute-set name="term-name-style">
4131
3967
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4132
3968
  <xsl:attribute name="font-weight">bold</xsl:attribute>
4133
-
4134
3969
  </xsl:attribute-set>
4135
3970
 
4136
3971
  <xsl:attribute-set name="figure-block-style">
4137
3972
  <xsl:attribute name="role">SKIP</xsl:attribute>
4138
-
4139
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4140
-
3973
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4141
3974
  </xsl:attribute-set>
4142
3975
 
4143
3976
  <xsl:template name="refine_figure-block-style">
4144
-
4145
3977
  </xsl:template>
4146
3978
 
4147
3979
  <xsl:attribute-set name="figure-style">
4148
-
4149
3980
  </xsl:attribute-set>
4150
3981
 
4151
3982
  <xsl:attribute-set name="figure-name-style">
4152
3983
  <xsl:attribute name="role">Caption</xsl:attribute>
4153
-
4154
- <xsl:attribute name="font-weight">bold</xsl:attribute>
4155
- <xsl:attribute name="text-align">center</xsl:attribute>
4156
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4157
- <xsl:attribute name="space-after">6pt</xsl:attribute>
4158
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
4159
-
3984
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3985
+ <xsl:attribute name="text-align">center</xsl:attribute>
3986
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3987
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
3988
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
4160
3989
  </xsl:attribute-set>
4161
3990
 
4162
3991
  <xsl:template name="refine_figure-name-style">
4163
-
4164
3992
  </xsl:template> <!-- refine_figure-name-style -->
4165
3993
 
4166
3994
  <xsl:attribute-set name="figure-source-style">
4167
-
4168
3995
  </xsl:attribute-set>
4169
3996
 
4170
3997
  <!-- Formula's styles -->
4171
3998
  <xsl:attribute-set name="formula-style">
4172
3999
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
4173
4000
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4174
-
4175
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4176
-
4001
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4177
4002
  </xsl:attribute-set> <!-- formula-style -->
4178
4003
 
4179
4004
  <xsl:attribute-set name="formula-stem-block-style">
4180
4005
  <xsl:attribute name="text-align">center</xsl:attribute>
4181
-
4182
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
4183
-
4006
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
4184
4007
  </xsl:attribute-set> <!-- formula-stem-block-style -->
4185
4008
 
4186
4009
  <xsl:template name="refine_formula-stem-block-style">
4187
-
4188
4010
  </xsl:template> <!-- refine_formula-stem-block-style -->
4189
4011
 
4190
4012
  <xsl:attribute-set name="formula-stem-number-style">
4191
4013
  <xsl:attribute name="text-align">right</xsl:attribute>
4192
-
4193
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
4194
-
4014
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
4195
4015
  </xsl:attribute-set> <!-- formula-stem-number-style -->
4196
4016
  <!-- End Formula's styles -->
4197
4017
 
4198
4018
  <xsl:template name="refine_formula-stem-number-style">
4199
-
4200
4019
  </xsl:template>
4201
4020
 
4202
4021
  <xsl:attribute-set name="image-style">
4203
4022
  <xsl:attribute name="role">SKIP</xsl:attribute>
4204
4023
  <xsl:attribute name="text-align">center</xsl:attribute>
4205
-
4206
4024
  </xsl:attribute-set>
4207
4025
 
4208
4026
  <xsl:template name="refine_image-style">
4209
-
4210
4027
  </xsl:template>
4211
4028
 
4212
4029
  <xsl:attribute-set name="figure-pseudocode-p-style">
4213
-
4214
- <xsl:attribute name="font-size">10pt</xsl:attribute>
4215
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4216
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4217
-
4030
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
4031
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4032
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4218
4033
  </xsl:attribute-set>
4219
4034
 
4220
4035
  <xsl:attribute-set name="image-graphic-style">
4221
4036
  <xsl:attribute name="width">100%</xsl:attribute>
4222
4037
  <xsl:attribute name="content-height">100%</xsl:attribute>
4223
4038
  <xsl:attribute name="scaling">uniform</xsl:attribute>
4224
-
4225
- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
4226
-
4227
- <xsl:attribute name="width">75%</xsl:attribute>
4228
-
4039
+ <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
4040
+ <xsl:attribute name="width">75%</xsl:attribute>
4229
4041
  </xsl:attribute-set>
4230
4042
 
4231
4043
  <xsl:attribute-set name="tt-style">
4232
-
4233
4044
  </xsl:attribute-set>
4234
4045
 
4235
4046
  <xsl:attribute-set name="sourcecode-name-style">
@@ -4238,50 +4049,41 @@
4238
4049
  <xsl:attribute name="text-align">center</xsl:attribute>
4239
4050
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4240
4051
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
4241
-
4242
4052
  </xsl:attribute-set>
4243
4053
 
4244
4054
  <xsl:attribute-set name="preferred-block-style">
4245
-
4246
4055
  </xsl:attribute-set>
4247
4056
 
4248
4057
  <xsl:attribute-set name="preferred-term-style">
4249
4058
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4250
4059
  <xsl:attribute name="font-weight">bold</xsl:attribute>
4251
-
4252
4060
  </xsl:attribute-set>
4253
4061
 
4254
4062
  <xsl:attribute-set name="domain-style">
4255
-
4256
4063
  </xsl:attribute-set>
4257
4064
 
4258
4065
  <xsl:attribute-set name="admitted-style">
4259
-
4260
4066
  </xsl:attribute-set>
4261
4067
 
4262
4068
  <xsl:attribute-set name="deprecates-style">
4263
-
4264
4069
  </xsl:attribute-set>
4265
4070
 
4266
4071
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
4267
4072
  </xsl:attribute-set>
4268
4073
 
4269
4074
  <xsl:attribute-set name="definition-style">
4270
-
4271
4075
  </xsl:attribute-set>
4272
4076
 
4273
4077
  <xsl:variable name="color-added-text">
4274
4078
  <xsl:text>rgb(0, 255, 0)</xsl:text>
4275
4079
  </xsl:variable>
4276
4080
  <xsl:attribute-set name="add-style">
4277
-
4278
- <xsl:attribute name="color">red</xsl:attribute>
4279
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
4280
- <!-- <xsl:attribute name="color">black</xsl:attribute>
4081
+ <xsl:attribute name="color">red</xsl:attribute>
4082
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4083
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
4281
4084
  <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
4282
4085
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
4283
4086
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
4284
-
4285
4087
  </xsl:attribute-set>
4286
4088
 
4287
4089
  <xsl:variable name="add-style">
@@ -4301,52 +4103,39 @@
4301
4103
 
4302
4104
  <xsl:attribute-set name="mathml-style">
4303
4105
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
4304
-
4305
- <xsl:attribute name="font-size">11pt</xsl:attribute>
4306
-
4106
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
4307
4107
  </xsl:attribute-set>
4308
4108
 
4309
4109
  <xsl:template name="refine_mathml-style">
4310
-
4311
4110
  </xsl:template>
4312
4111
 
4313
4112
  <xsl:attribute-set name="list-style">
4314
-
4315
4113
  </xsl:attribute-set> <!-- list-style -->
4316
4114
 
4317
4115
  <xsl:template name="refine_list-style">
4318
-
4319
4116
  </xsl:template> <!-- refine_list-style -->
4320
4117
 
4321
4118
  <xsl:attribute-set name="list-name-style">
4322
4119
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4323
-
4324
- <xsl:attribute name="font-weight">bold</xsl:attribute>
4325
-
4120
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4326
4121
  </xsl:attribute-set> <!-- list-name-style -->
4327
4122
 
4328
4123
  <xsl:attribute-set name="list-item-style">
4329
-
4330
4124
  </xsl:attribute-set>
4331
4125
 
4332
4126
  <xsl:template name="refine_list-item-style">
4333
-
4334
4127
  </xsl:template> <!-- refine_list-item-style -->
4335
4128
 
4336
4129
  <xsl:attribute-set name="list-item-label-style">
4337
-
4338
4130
  </xsl:attribute-set>
4339
4131
 
4340
4132
  <xsl:template name="refine_list-item-label-style">
4341
-
4342
4133
  </xsl:template> <!-- refine_list-item-label-style -->
4343
4134
 
4344
4135
  <xsl:attribute-set name="list-item-body-style">
4345
-
4346
4136
  </xsl:attribute-set>
4347
4137
 
4348
4138
  <xsl:template name="refine_list-item-body-style">
4349
-
4350
4139
  </xsl:template> <!-- refine_list-item-body-style -->
4351
4140
 
4352
4141
  <xsl:attribute-set name="toc-style">
@@ -4356,14 +4145,12 @@
4356
4145
  <xsl:attribute-set name="fn-reference-style">
4357
4146
  <xsl:attribute name="font-size">80%</xsl:attribute>
4358
4147
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4359
-
4360
- <xsl:attribute name="vertical-align">super</xsl:attribute>
4361
- <xsl:attribute name="color">blue</xsl:attribute>
4148
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
4149
+ <xsl:attribute name="color">blue</xsl:attribute>
4362
4150
 
4363
4151
  </xsl:attribute-set>
4364
4152
 
4365
4153
  <xsl:template name="refine_fn-reference-style">
4366
-
4367
4154
  </xsl:template> <!-- refine_fn-reference-style -->
4368
4155
 
4369
4156
  <xsl:attribute-set name="fn-style">
@@ -4372,10 +4159,8 @@
4372
4159
 
4373
4160
  <xsl:attribute-set name="fn-num-style">
4374
4161
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4375
-
4376
- <xsl:attribute name="font-size">60%</xsl:attribute>
4377
- <xsl:attribute name="vertical-align">super</xsl:attribute>
4378
-
4162
+ <xsl:attribute name="font-size">60%</xsl:attribute>
4163
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
4379
4164
  </xsl:attribute-set>
4380
4165
 
4381
4166
  <xsl:attribute-set name="fn-body-style">
@@ -4383,140 +4168,106 @@
4383
4168
  <xsl:attribute name="font-style">normal</xsl:attribute>
4384
4169
  <xsl:attribute name="text-indent">0</xsl:attribute>
4385
4170
  <xsl:attribute name="start-indent">0</xsl:attribute>
4386
-
4387
- <xsl:attribute name="font-size">11pt</xsl:attribute>
4388
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4389
- <xsl:attribute name="text-align">justify</xsl:attribute>
4390
-
4171
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
4172
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4173
+ <xsl:attribute name="text-align">justify</xsl:attribute>
4391
4174
  </xsl:attribute-set>
4392
4175
 
4393
4176
  <xsl:template name="refine_fn-body-style">
4394
-
4395
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
4396
- <xsl:if test="$doctype = 'service-publication'">
4397
- <xsl:attribute name="font-size">10pt</xsl:attribute>
4398
- </xsl:if>
4399
-
4177
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
4178
+ <xsl:if test="$doctype = 'service-publication'">
4179
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
4180
+ </xsl:if>
4400
4181
  </xsl:template> <!-- refine_fn-body-style -->
4401
4182
 
4402
4183
  <xsl:attribute-set name="fn-body-num-style">
4403
4184
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
4404
-
4405
- <xsl:attribute name="font-size">85%</xsl:attribute>
4406
- <xsl:attribute name="padding-right">2mm</xsl:attribute>
4407
- <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4408
-
4185
+ <xsl:attribute name="font-size">85%</xsl:attribute>
4186
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
4187
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4409
4188
  </xsl:attribute-set> <!-- fn-body-num-style -->
4410
4189
 
4411
4190
  <xsl:template name="refine_fn-body-num-style">
4412
-
4413
4191
  </xsl:template> <!-- refine_fn-body-num-style -->
4414
4192
 
4415
4193
  <!-- admonition -->
4416
4194
  <xsl:attribute-set name="admonition-style">
4417
-
4418
- <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
4419
- <xsl:attribute name="space-before">12pt</xsl:attribute>
4420
- <xsl:attribute name="space-after">12pt</xsl:attribute>
4421
-
4195
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
4196
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
4197
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
4422
4198
  </xsl:attribute-set> <!-- admonition-style -->
4423
4199
 
4424
4200
  <xsl:attribute-set name="admonition-container-style">
4425
4201
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
4426
4202
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
4427
-
4428
- <xsl:attribute name="padding">2mm</xsl:attribute>
4429
- <xsl:attribute name="padding-top">3mm</xsl:attribute>
4430
-
4203
+ <xsl:attribute name="padding">2mm</xsl:attribute>
4204
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
4431
4205
  </xsl:attribute-set> <!-- admonition-container-style -->
4432
4206
 
4433
4207
  <xsl:attribute-set name="admonition-name-style">
4434
4208
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4435
-
4436
- <xsl:attribute name="text-align">center</xsl:attribute>
4437
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4438
- <xsl:attribute name="font-weight">bold</xsl:attribute>
4439
-
4209
+ <xsl:attribute name="text-align">center</xsl:attribute>
4210
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4211
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4440
4212
  </xsl:attribute-set> <!-- admonition-name-style -->
4441
4213
 
4442
4214
  <xsl:attribute-set name="admonition-p-style">
4443
-
4444
4215
  </xsl:attribute-set> <!-- admonition-p-style -->
4445
4216
  <!-- end admonition -->
4446
4217
 
4447
4218
  <!-- bibitem in Normative References (references/@normative="true") -->
4448
4219
  <xsl:attribute-set name="bibitem-normative-style">
4449
-
4450
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4451
- <xsl:attribute name="margin-left">14mm</xsl:attribute>
4452
- <xsl:attribute name="text-indent">-14mm</xsl:attribute>
4453
-
4220
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4221
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
4222
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
4454
4223
  </xsl:attribute-set> <!-- bibitem-normative-style -->
4455
4224
 
4456
4225
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
4457
4226
  <xsl:attribute-set name="bibitem-normative-list-style">
4458
4227
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
4459
4228
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4460
-
4461
- <!-- <xsl:if test="$namespace = 'ieee'">
4462
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4463
- <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
4464
- </xsl:if> -->
4465
-
4466
4229
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
4467
4230
 
4468
4231
  <xsl:attribute-set name="bibitem-non-normative-style">
4469
-
4470
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4471
-
4232
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4472
4233
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
4473
4234
 
4474
4235
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
4475
4236
  <xsl:attribute-set name="bibitem-non-normative-list-style">
4476
4237
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
4477
4238
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4478
-
4479
4239
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
4480
4240
 
4481
4241
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
4482
4242
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4483
-
4484
4243
  </xsl:attribute-set>
4485
4244
 
4486
4245
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
4487
4246
  <xsl:attribute-set name="bibitem-normative-list-body-style">
4488
-
4489
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4490
- <xsl:attribute name="margin-left">14mm</xsl:attribute>
4491
- <xsl:attribute name="text-indent">-14mm</xsl:attribute>
4492
-
4247
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4248
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
4249
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
4493
4250
  </xsl:attribute-set>
4494
4251
 
4495
4252
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
4496
-
4497
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4498
- <xsl:attribute name="margin-left">14mm</xsl:attribute>
4499
- <xsl:attribute name="text-indent">-14mm</xsl:attribute>
4500
-
4253
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4254
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
4255
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
4501
4256
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
4502
4257
 
4503
4258
  <!-- footnote reference number for bibitem, in the text -->
4504
4259
  <xsl:attribute-set name="bibitem-note-fn-style">
4505
4260
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4506
4261
  <xsl:attribute name="font-size">65%</xsl:attribute>
4507
-
4508
- <xsl:attribute name="font-size">8pt</xsl:attribute>
4509
- <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4510
-
4262
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
4263
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4511
4264
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
4512
4265
 
4513
4266
  <!-- footnote number on the page bottom -->
4514
4267
  <xsl:attribute-set name="bibitem-note-fn-number-style">
4515
4268
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
4516
-
4517
- <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
4518
- <xsl:attribute name="padding-right">3mm</xsl:attribute>
4519
-
4269
+ <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
4270
+ <xsl:attribute name="padding-right">3mm</xsl:attribute>
4520
4271
  </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
4521
4272
 
4522
4273
  <!-- footnote body (text) on the page bottom -->
@@ -4524,13 +4275,10 @@
4524
4275
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4525
4276
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4526
4277
  <xsl:attribute name="start-indent">0pt</xsl:attribute>
4527
-
4528
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
4529
-
4278
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
4530
4279
  </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
4531
4280
 
4532
4281
  <xsl:attribute-set name="references-non-normative-style">
4533
-
4534
4282
  </xsl:attribute-set> <!-- references-non-normative-style -->
4535
4283
 
4536
4284
  <!-- Highlight.js syntax GitHub styles -->
@@ -4690,12 +4438,10 @@
4690
4438
  <!-- Index section styles -->
4691
4439
  <xsl:attribute-set name="indexsect-title-style">
4692
4440
  <xsl:attribute name="role">H1</xsl:attribute>
4693
-
4694
4441
  </xsl:attribute-set>
4695
4442
 
4696
4443
  <xsl:attribute-set name="indexsect-clause-title-style">
4697
4444
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4698
-
4699
4445
  </xsl:attribute-set>
4700
4446
 
4701
4447
  <!-- End Index section styles -->
@@ -4772,47 +4518,47 @@
4772
4518
  </xsl:template>
4773
4519
 
4774
4520
  <xsl:template name="processTables_Contents">
4775
- <tables>
4521
+ <mn:tables>
4776
4522
  <xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
4777
4523
  <xsl:choose>
4778
4524
  <xsl:when test="*[local-name() = 'fmt-name']">
4779
4525
  <xsl:variable name="fmt_name">
4780
4526
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
4781
4527
  </xsl:variable>
4782
- <table id="{@id}" alt-text="{normalize-space($fmt_name)}">
4528
+ <mn:table id="{@id}" alt-text="{normalize-space($fmt_name)}">
4783
4529
  <xsl:copy-of select="$fmt_name"/>
4784
- </table>
4530
+ </mn:table>
4785
4531
  </xsl:when>
4786
4532
  <xsl:otherwise>
4787
- <table id="{@id}" alt-text="{*[local-name() = 'name']}">
4533
+ <mn:table id="{@id}" alt-text="{*[local-name() = 'name']}">
4788
4534
  <xsl:copy-of select="*[local-name() = 'name']"/>
4789
- </table>
4535
+ </mn:table>
4790
4536
  </xsl:otherwise>
4791
4537
  </xsl:choose>
4792
4538
  </xsl:for-each>
4793
- </tables>
4539
+ </mn:tables>
4794
4540
  </xsl:template>
4795
4541
 
4796
4542
  <xsl:template name="processFigures_Contents">
4797
- <figures>
4543
+ <mn:figures>
4798
4544
  <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) != '']">
4799
4545
  <xsl:choose>
4800
4546
  <xsl:when test="*[local-name() = 'fmt-name']">
4801
4547
  <xsl:variable name="fmt_name">
4802
4548
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
4803
4549
  </xsl:variable>
4804
- <figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
4550
+ <mn:figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
4805
4551
  <xsl:copy-of select="$fmt_name"/>
4806
- </figure>
4552
+ </mn:figure>
4807
4553
  </xsl:when>
4808
4554
  <xsl:otherwise>
4809
- <figure id="{@id}" alt-text="{*[local-name() = 'name']}">
4555
+ <mn:figure id="{@id}" alt-text="{*[local-name() = 'name']}">
4810
4556
  <xsl:copy-of select="*[local-name() = 'name']"/>
4811
- </figure>
4557
+ </mn:figure>
4812
4558
  </xsl:otherwise>
4813
4559
  </xsl:choose>
4814
4560
  </xsl:for-each>
4815
- </figures>
4561
+ </mn:figures>
4816
4562
  </xsl:template>
4817
4563
 
4818
4564
  <xsl:template name="processPrefaceSectionsDefault">
@@ -4831,7 +4577,6 @@
4831
4577
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
4832
4578
  <xsl:sort select="@displayorder" data-type="number"/>
4833
4579
  <xsl:apply-templates select="."/>
4834
-
4835
4580
  </xsl:for-each>
4836
4581
 
4837
4582
  <xsl:for-each select="/*/*[local-name()='annex']">
@@ -4938,7 +4683,6 @@
4938
4683
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
4939
4684
  <xsl:sort select="@displayorder" data-type="number"/>
4940
4685
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
4941
-
4942
4686
  </xsl:for-each>
4943
4687
  </xsl:element>
4944
4688
  </xsl:element>
@@ -5072,7 +4816,6 @@
5072
4816
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak">
5073
4817
  <xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
5074
4818
  </xsl:apply-templates>
5075
-
5076
4819
  </xsl:for-each>
5077
4820
  </xsl:element>
5078
4821
 
@@ -5112,19 +4855,17 @@
5112
4855
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
5113
4856
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
5114
4857
  <xsl:template match="text()" name="text">
5115
-
5116
- <xsl:choose>
5117
- <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
5118
- <xsl:otherwise>
5119
- <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))"/>
5120
- <xsl:call-template name="replace_fo_inline_tags">
5121
- <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
5122
- <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
5123
- <xsl:with-param name="text" select="$text"/>
5124
- </xsl:call-template>
5125
- </xsl:otherwise>
5126
- </xsl:choose>
5127
-
4858
+ <xsl:choose>
4859
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
4860
+ <xsl:otherwise>
4861
+ <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))"/>
4862
+ <xsl:call-template name="replace_fo_inline_tags">
4863
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
4864
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
4865
+ <xsl:with-param name="text" select="$text"/>
4866
+ </xsl:call-template>
4867
+ </xsl:otherwise>
4868
+ </xsl:choose>
5128
4869
  </xsl:template>
5129
4870
 
5130
4871
  <xsl:template name="replace_fo_inline_tags">
@@ -5178,7 +4919,7 @@
5178
4919
  <xsl:with-param name="keep_sep">true</xsl:with-param>
5179
4920
  </xsl:call-template>
5180
4921
  </xsl:variable>
5181
- <xsl:for-each select="xalan:nodeset($items)/item">
4922
+ <xsl:for-each select="xalan:nodeset($items)/mn:item">
5182
4923
  <xsl:choose>
5183
4924
  <xsl:when test=". = $sep">
5184
4925
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
@@ -5207,17 +4948,13 @@
5207
4948
  </xsl:template> <!-- copyright-statement -->
5208
4949
 
5209
4950
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
5210
-
5211
- <!-- process in the template 'title' -->
5212
- <xsl:call-template name="title"/>
5213
-
4951
+ <!-- process in the template 'title' -->
4952
+ <xsl:call-template name="title"/>
5214
4953
  </xsl:template> <!-- copyright-statement//title -->
5215
4954
 
5216
4955
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
5217
-
5218
- <!-- process in the template 'paragraph' -->
5219
- <xsl:call-template name="paragraph"/>
5220
-
4956
+ <!-- process in the template 'paragraph' -->
4957
+ <xsl:call-template name="paragraph"/>
5221
4958
  </xsl:template> <!-- copyright-statement//p -->
5222
4959
 
5223
4960
  <xsl:template match="*[local-name()='license-statement']">
@@ -5227,51 +4964,44 @@
5227
4964
  </xsl:template> <!-- license-statement -->
5228
4965
 
5229
4966
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
5230
-
5231
- <xsl:variable name="level">
5232
- <xsl:call-template name="getLevel"/>
5233
- </xsl:variable>
5234
- <fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
5235
- <xsl:apply-templates/>
5236
- </fo:block>
4967
+ <xsl:variable name="level">
4968
+ <xsl:call-template name="getLevel"/>
4969
+ </xsl:variable>
4970
+ <fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
4971
+ <xsl:apply-templates/>
4972
+ </fo:block>
5237
4973
 
5238
4974
  </xsl:template> <!-- license-statement/title -->
5239
4975
 
5240
4976
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
5241
-
5242
- <!-- process in the template 'paragraph' -->
5243
- <xsl:call-template name="paragraph"/>
5244
-
4977
+ <!-- process in the template 'paragraph' -->
4978
+ <xsl:call-template name="paragraph"/>
5245
4979
  </xsl:template> <!-- license-statement/p -->
5246
4980
 
5247
4981
  <xsl:template match="*[local-name()='legal-statement']">
5248
4982
  <xsl:param name="isLegacy">false</xsl:param>
5249
4983
  <fo:block xsl:use-attribute-sets="legal-statement-style">
5250
-
5251
4984
  <xsl:apply-templates/>
5252
4985
  </fo:block>
5253
4986
  </xsl:template> <!-- legal-statement -->
5254
4987
 
5255
4988
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
5256
-
5257
- <!-- ogc-white-paper rsd -->
5258
- <xsl:variable name="level">
5259
- <xsl:call-template name="getLevel"/>
5260
- </xsl:variable>
5261
- <fo:block role="H{$level}" xsl:use-attribute-sets="legal-statement-title-style">
5262
- <xsl:apply-templates/>
5263
- </fo:block>
4989
+ <!-- ogc-white-paper rsd -->
4990
+ <xsl:variable name="level">
4991
+ <xsl:call-template name="getLevel"/>
4992
+ </xsl:variable>
4993
+ <fo:block role="H{$level}" xsl:use-attribute-sets="legal-statement-title-style">
4994
+ <xsl:apply-templates/>
4995
+ </fo:block>
5264
4996
 
5265
4997
  </xsl:template> <!-- legal-statement/title -->
5266
4998
 
5267
4999
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
5268
5000
  <xsl:param name="margin"/>
5269
-
5270
- <!-- process in the template 'paragraph' -->
5271
- <xsl:call-template name="paragraph">
5272
- <xsl:with-param name="margin" select="$margin"/>
5273
- </xsl:call-template>
5274
-
5001
+ <!-- process in the template 'paragraph' -->
5002
+ <xsl:call-template name="paragraph">
5003
+ <xsl:with-param name="margin" select="$margin"/>
5004
+ </xsl:call-template>
5275
5005
  </xsl:template> <!-- legal-statement/p -->
5276
5006
 
5277
5007
  <xsl:template match="*[local-name()='feedback-statement']">
@@ -5281,20 +5011,16 @@
5281
5011
  </xsl:template> <!-- feedback-statement -->
5282
5012
 
5283
5013
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
5284
-
5285
- <!-- process in the template 'title' -->
5286
- <xsl:call-template name="title"/>
5287
-
5014
+ <!-- process in the template 'title' -->
5015
+ <xsl:call-template name="title"/>
5288
5016
  </xsl:template>
5289
5017
 
5290
5018
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
5291
5019
  <xsl:param name="margin"/>
5292
-
5293
- <!-- process in the template 'paragraph' -->
5294
- <xsl:call-template name="paragraph">
5295
- <xsl:with-param name="margin" select="$margin"/>
5296
- </xsl:call-template>
5297
-
5020
+ <!-- process in the template 'paragraph' -->
5021
+ <xsl:call-template name="paragraph">
5022
+ <xsl:with-param name="margin" select="$margin"/>
5023
+ </xsl:call-template>
5298
5024
  </xsl:template>
5299
5025
 
5300
5026
  <!-- ================================= -->
@@ -5347,12 +5073,10 @@
5347
5073
  <xsl:template match="*[local-name()='table']" name="table">
5348
5074
 
5349
5075
  <xsl:variable name="table-preamble">
5350
-
5351
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
5352
- <xsl:if test="$doctype != 'service-publication'">
5353
- <fo:block space-before="18pt"> </fo:block>
5354
- </xsl:if>
5355
-
5076
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
5077
+ <xsl:if test="$doctype != 'service-publication'">
5078
+ <fo:block space-before="18pt"> </fo:block>
5079
+ </xsl:if>
5356
5080
  </xsl:variable>
5357
5081
 
5358
5082
  <xsl:variable name="table">
@@ -5370,10 +5094,8 @@
5370
5094
 
5371
5095
  <!-- Display table's name before table as standalone block -->
5372
5096
  <!-- $namespace = 'iso' or -->
5373
-
5374
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
5375
-
5376
- <xsl:call-template name="table_name_fn_display"/>
5097
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
5098
+ <xsl:call-template name="table_name_fn_display"/>
5377
5099
 
5378
5100
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
5379
5101
 
@@ -5426,8 +5148,7 @@
5426
5148
 
5427
5149
  <xsl:variable name="table_width_default">100%</xsl:variable>
5428
5150
  <xsl:variable name="table_width">
5429
- <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
5430
- <xsl:value-of select="$table_width_default"/>
5151
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) --><xsl:value-of select="$table_width_default"/>
5431
5152
  </xsl:variable>
5432
5153
 
5433
5154
  <xsl:variable name="table_attributes">
@@ -5570,27 +5291,25 @@
5570
5291
  <xsl:when test="@width and @width != 'full-page-width' and @width != 'text-width'">
5571
5292
 
5572
5293
  <!-- centered table when table name is centered (see table-name-style) -->
5573
-
5574
- <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
5575
-
5576
- <fo:table-column column-width="proportional-column-width(1)"/>
5577
- <fo:table-column column-width="{@width}"/>
5578
- <fo:table-column column-width="proportional-column-width(1)"/>
5579
- <fo:table-body role="SKIP">
5580
- <fo:table-row role="SKIP">
5581
- <fo:table-cell column-number="2" role="SKIP">
5582
- <xsl:copy-of select="$table-preamble"/>
5583
- <fo:block role="SKIP">
5584
- <xsl:call-template name="setTrackChangesStyles">
5585
- <xsl:with-param name="isAdded" select="$isAdded"/>
5586
- <xsl:with-param name="isDeleted" select="$isDeleted"/>
5587
- </xsl:call-template>
5588
- <xsl:copy-of select="$table"/>
5589
- </fo:block>
5590
- </fo:table-cell>
5591
- </fo:table-row>
5592
- </fo:table-body>
5593
- </fo:table>
5294
+ <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
5295
+ <fo:table-column column-width="proportional-column-width(1)"/>
5296
+ <fo:table-column column-width="{@width}"/>
5297
+ <fo:table-column column-width="proportional-column-width(1)"/>
5298
+ <fo:table-body role="SKIP">
5299
+ <fo:table-row role="SKIP">
5300
+ <fo:table-cell column-number="2" role="SKIP">
5301
+ <xsl:copy-of select="$table-preamble"/>
5302
+ <fo:block role="SKIP">
5303
+ <xsl:call-template name="setTrackChangesStyles">
5304
+ <xsl:with-param name="isAdded" select="$isAdded"/>
5305
+ <xsl:with-param name="isDeleted" select="$isDeleted"/>
5306
+ </xsl:call-template>
5307
+ <xsl:copy-of select="$table"/>
5308
+ </fo:block>
5309
+ </fo:table-cell>
5310
+ </fo:table-row>
5311
+ </fo:table-body>
5312
+ </fo:table>
5594
5313
 
5595
5314
  </xsl:when>
5596
5315
  <xsl:otherwise>
@@ -5616,7 +5335,6 @@
5616
5335
  </xsl:template>
5617
5336
 
5618
5337
  <xsl:template name="setBordersTableArray">
5619
-
5620
5338
  </xsl:template>
5621
5339
 
5622
5340
  <!-- table/name-->
@@ -5625,51 +5343,50 @@
5625
5343
  <xsl:param name="cols-count"/>
5626
5344
  <xsl:if test="normalize-space() != ''">
5627
5345
 
5628
- <fo:block xsl:use-attribute-sets="table-name-style">
5346
+ <fo:block xsl:use-attribute-sets="table-name-style">
5629
5347
 
5630
- <xsl:call-template name="refine_table-name-style">
5631
- <xsl:with-param name="continued" select="$continued"/>
5632
- </xsl:call-template>
5633
-
5634
- <xsl:choose>
5635
- <xsl:when test="$continued = 'true'">
5348
+ <xsl:call-template name="refine_table-name-style">
5349
+ <xsl:with-param name="continued" select="$continued"/>
5350
+ </xsl:call-template>
5636
5351
 
5637
- </xsl:when>
5638
- <xsl:otherwise>
5639
- <xsl:apply-templates/>
5640
- </xsl:otherwise>
5641
- </xsl:choose>
5352
+ <xsl:choose>
5353
+ <xsl:when test="$continued = 'true'">
5354
+ </xsl:when>
5355
+ <xsl:otherwise>
5356
+ <xsl:apply-templates/>
5357
+ </xsl:otherwise>
5358
+ </xsl:choose>
5642
5359
 
5643
- </fo:block>
5360
+ </fo:block>
5644
5361
 
5645
- <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
5646
- <xsl:if test="$continued = 'true'">
5362
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
5363
+ <xsl:if test="$continued = 'true'">
5647
5364
 
5648
- <!-- to prevent the error 'THead element may contain only TR elements' -->
5365
+ <!-- to prevent the error 'THead element may contain only TR elements' -->
5649
5366
 
5650
- <xsl:choose>
5651
- <xsl:when test="string(number($cols-count)) != 'NaN'">
5652
- <fo:table width="100%" table-layout="fixed" role="SKIP">
5653
- <fo:table-body role="SKIP">
5654
- <fo:table-row>
5655
- <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
5656
- <fo:block text-align="right" role="SKIP">
5657
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
5658
- </fo:block>
5659
- </fo:table-cell>
5660
- </fo:table-row>
5661
- </fo:table-body>
5662
- </fo:table>
5663
- </xsl:when>
5664
- <xsl:otherwise>
5665
- <fo:block text-align="right">
5666
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
5667
- </fo:block>
5668
- </xsl:otherwise>
5669
- </xsl:choose>
5367
+ <xsl:choose>
5368
+ <xsl:when test="string(number($cols-count)) != 'NaN'">
5369
+ <fo:table width="100%" table-layout="fixed" role="SKIP">
5370
+ <fo:table-body role="SKIP">
5371
+ <fo:table-row>
5372
+ <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
5373
+ <fo:block text-align="right" role="SKIP">
5374
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
5375
+ </fo:block>
5376
+ </fo:table-cell>
5377
+ </fo:table-row>
5378
+ </fo:table-body>
5379
+ </fo:table>
5380
+ </xsl:when>
5381
+ <xsl:otherwise>
5382
+ <fo:block text-align="right">
5383
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
5384
+ </fo:block>
5385
+ </xsl:otherwise>
5386
+ </xsl:choose>
5670
5387
 
5671
- </xsl:if>
5672
- <!-- </xsl:if> -->
5388
+ </xsl:if>
5389
+ <!-- </xsl:if> -->
5673
5390
 
5674
5391
  </xsl:if>
5675
5392
  </xsl:template> <!-- table/name -->
@@ -6044,7 +5761,6 @@
6044
5761
  <xsl:template match="*[local-name()='thead']">
6045
5762
  <xsl:param name="cols-count"/>
6046
5763
  <fo:table-header>
6047
-
6048
5764
  <xsl:apply-templates/>
6049
5765
  </fo:table-header>
6050
5766
  </xsl:template> <!-- thead -->
@@ -6058,21 +5774,20 @@
6058
5774
 
6059
5775
  <xsl:call-template name="refine_table-header-title-style"/>
6060
5776
 
6061
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
6062
- <xsl:with-param name="continued">true</xsl:with-param>
6063
- <xsl:with-param name="cols-count" select="$cols-count"/>
6064
- </xsl:apply-templates>
5777
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
5778
+ <xsl:with-param name="continued">true</xsl:with-param>
5779
+ <xsl:with-param name="cols-count" select="$cols-count"/>
5780
+ </xsl:apply-templates>
6065
5781
 
6066
- <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
6067
- <fo:block role="SKIP"/>
6068
- </xsl:if>
5782
+ <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5783
+ <fo:block role="SKIP"/>
5784
+ </xsl:if>
6069
5785
 
6070
5786
  </fo:table-cell>
6071
5787
  </fo:table-row>
6072
5788
  </xsl:template> <!-- table-header-title -->
6073
5789
 
6074
5790
  <xsl:template name="refine_table-header-title-style">
6075
-
6076
5791
  </xsl:template> <!-- refine_table-header-title-style -->
6077
5792
 
6078
5793
  <xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -6102,7 +5817,6 @@
6102
5817
  <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']"/>
6103
5818
 
6104
5819
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
6105
-
6106
5820
  </xsl:variable>
6107
5821
 
6108
5822
  <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
@@ -6140,13 +5854,12 @@
6140
5854
  </xsl:otherwise>
6141
5855
  </xsl:choose>
6142
5856
  </xsl:for-each>
6143
-
6144
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
6145
- <xsl:if test="$doctype = 'service-publication'">
6146
- <xsl:attribute name="border">none</xsl:attribute>
6147
- <xsl:attribute name="font-family">Arial</xsl:attribute>
6148
- <xsl:attribute name="font-size">8pt</xsl:attribute>
6149
- </xsl:if>
5857
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
5858
+ <xsl:if test="$doctype = 'service-publication'">
5859
+ <xsl:attribute name="border">none</xsl:attribute>
5860
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
5861
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
5862
+ </xsl:if>
6150
5863
 
6151
5864
  <xsl:choose>
6152
5865
  <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
@@ -6171,31 +5884,23 @@
6171
5884
  <xsl:call-template name="setBordersTableArray"/>
6172
5885
 
6173
5886
  <!-- fn will be processed inside 'note' processing -->
6174
-
6175
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
6176
- <xsl:if test="$doctype = 'service-publication'">
6177
- <fo:block margin-top="7pt" margin-bottom="2pt" role="SKIP"><fo:inline>____________</fo:inline></fo:block>
6178
- </xsl:if>
6179
-
6180
- <!-- for BSI (not PAS) display Notes before footnotes -->
6181
-
6182
- <!-- except gb and bsi -->
6183
-
6184
- <xsl:apply-templates select="../*[local-name()='p']"/>
6185
- <xsl:apply-templates select="../*[local-name()='dl']"/>
6186
- <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
6187
- <xsl:apply-templates select="../*[local-name()='example']"/>
6188
- <xsl:apply-templates select="../*[local-name()='source']"/>
5887
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
5888
+ <xsl:if test="$doctype = 'service-publication'">
5889
+ <fo:block margin-top="7pt" margin-bottom="2pt" role="SKIP"><fo:inline>____________</fo:inline></fo:block>
5890
+ </xsl:if>
5891
+ <xsl:apply-templates select="../*[local-name()='p']"/>
5892
+ <xsl:apply-templates select="../*[local-name()='dl']"/>
5893
+ <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
5894
+ <xsl:apply-templates select="../*[local-name()='example']"/>
5895
+ <xsl:apply-templates select="../*[local-name()='source']"/>
6189
5896
 
6190
5897
  <xsl:variable name="isDisplayRowSeparator">
6191
-
6192
5898
  </xsl:variable>
6193
5899
 
6194
5900
  <!-- horizontal row separator -->
6195
5901
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
6196
5902
  <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
6197
5903
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
6198
-
6199
5904
  <xsl:call-template name="setBordersTableArray"/>
6200
5905
  <fo:block font-size="1pt"> </fo:block>
6201
5906
  </fo:block-container>
@@ -6203,11 +5908,8 @@
6203
5908
  </xsl:if>
6204
5909
 
6205
5910
  <!-- fn processing -->
6206
-
6207
- <!-- <xsl:call-template name="table_fn_display" /> -->
6208
- <xsl:copy-of select="$table_fn_block"/>
6209
-
6210
- <!-- for PAS display Notes after footnotes -->
5911
+ <!-- <xsl:call-template name="table_fn_display" /> -->
5912
+ <xsl:copy-of select="$table_fn_block"/>
6211
5913
 
6212
5914
  </fo:table-cell>
6213
5915
  </fo:table-row>
@@ -6334,7 +6036,7 @@
6334
6036
  <xsl:with-param name="pText" select="$border_under_row_"/>
6335
6037
  </xsl:call-template>
6336
6038
  </xsl:variable>
6337
- <xsl:if test="xalan:nodeset($border_under_row)/item[. = normalize-space($row_num)]">
6039
+ <xsl:if test="xalan:nodeset($border_under_row)/mn:item[. = normalize-space($row_num)]">
6338
6040
  <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
6339
6041
  </xsl:if>
6340
6042
  </xsl:when>
@@ -6372,11 +6074,10 @@
6372
6074
  </xsl:template>
6373
6075
 
6374
6076
  <xsl:template name="setTableRowAttributes">
6375
-
6376
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
6377
- <xsl:if test="$doctype = 'service-publication'">
6378
- <xsl:attribute name="min-height">5mm</xsl:attribute>
6379
- </xsl:if>
6077
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
6078
+ <xsl:if test="$doctype = 'service-publication'">
6079
+ <xsl:attribute name="min-height">5mm</xsl:attribute>
6080
+ </xsl:if>
6380
6081
 
6381
6082
  <xsl:call-template name="setColors"/>
6382
6083
 
@@ -6456,7 +6157,7 @@
6456
6157
  </xsl:variable>
6457
6158
  <xsl:variable name="quot">"</xsl:variable>
6458
6159
  <xsl:variable name="styles_">
6459
- <xsl:for-each select="xalan:nodeset($styles__)/item">
6160
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
6460
6161
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
6461
6162
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
6462
6163
  <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'">
@@ -6506,9 +6207,7 @@
6506
6207
  <fo:block role="SKIP">
6507
6208
 
6508
6209
  <xsl:if test="$isGenerateTableIF = 'true'">
6509
-
6510
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
6511
-
6210
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
6512
6211
  </xsl:if>
6513
6212
 
6514
6213
  <xsl:apply-templates/>
@@ -6523,25 +6222,23 @@
6523
6222
 
6524
6223
  <!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
6525
6224
  <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">
6225
+ <xsl:call-template name="setNamedDestination"/>
6226
+ <fo:block xsl:use-attribute-sets="table-note-style">
6227
+ <xsl:copy-of select="@id"/>
6526
6228
 
6527
- <xsl:call-template name="setNamedDestination"/>
6528
- <fo:block xsl:use-attribute-sets="table-note-style">
6529
- <xsl:copy-of select="@id"/>
6530
-
6531
- <xsl:call-template name="refine_table-note-style"/>
6532
-
6533
- <!-- Table's note/example name (NOTE, for example) -->
6534
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
6229
+ <xsl:call-template name="refine_table-note-style"/>
6535
6230
 
6536
- <xsl:call-template name="refine_table-note-name-style"/>
6231
+ <!-- Table's note/example name (NOTE, for example) -->
6232
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
6537
6233
 
6538
- <xsl:apply-templates select="*[local-name() = 'name']"/>
6234
+ <xsl:call-template name="refine_table-note-name-style"/>
6539
6235
 
6540
- </fo:inline>
6236
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
6541
6237
 
6542
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6543
- </fo:block>
6238
+ </fo:inline>
6544
6239
 
6240
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6241
+ </fo:block>
6545
6242
  </xsl:template> <!-- table/note -->
6546
6243
 
6547
6244
  <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">
@@ -6586,9 +6283,7 @@
6586
6283
  <xsl:variable name="current_fn_number" select="@reference"/>
6587
6284
 
6588
6285
  <xsl:variable name="current_fn_number_text">
6589
-
6590
- <xsl:value-of select="$current_fn_number"/>
6591
-
6286
+ <xsl:value-of select="$current_fn_number"/>
6592
6287
  </xsl:variable>
6593
6288
 
6594
6289
  <xsl:variable name="ref_id" select="@target"/>
@@ -6600,12 +6295,10 @@
6600
6295
  <xsl:choose>
6601
6296
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
6602
6297
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
6603
-
6604
6298
  </fn_styles>
6605
6299
  </xsl:when>
6606
6300
  <xsl:otherwise>
6607
6301
  <fn_styles xsl:use-attribute-sets="fn-num-style">
6608
-
6609
6302
  </fn_styles>
6610
6303
  </xsl:otherwise>
6611
6304
  </xsl:choose>
@@ -6623,7 +6316,6 @@
6623
6316
  <xsl:with-param name="element">
6624
6317
  <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 -->
6625
6318
  <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
6626
-
6627
6319
  <xsl:copy-of select="$current_fn_number_text"/>
6628
6320
 
6629
6321
  </fo:inline>
@@ -6661,10 +6353,9 @@
6661
6353
  <here><xsl:copy-of select="$footnotes"/></here> -->
6662
6354
  <xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
6663
6355
  </xsl:variable>
6664
-
6665
- <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
6666
- <xsl:copy-of select="$fn_block"/>
6667
- </fo:block>
6356
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
6357
+ <xsl:copy-of select="$fn_block"/>
6358
+ </fo:block>
6668
6359
 
6669
6360
  </fo:block-container>
6670
6361
  </fo:footnote-body>
@@ -6741,21 +6432,20 @@
6741
6432
  <xsl:variable name="reference" select="@reference"/>
6742
6433
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
6743
6434
  <xsl:for-each select="..//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
6435
+ <fo:block xsl:use-attribute-sets="table-fn-style">
6436
+ <xsl:copy-of select="@id"/>
6437
+ <xsl:call-template name="refine_table-fn-style"/>
6744
6438
 
6745
- <fo:block xsl:use-attribute-sets="table-fn-style">
6746
- <xsl:copy-of select="@id"/>
6747
- <xsl:call-template name="refine_table-fn-style"/>
6748
-
6749
- <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
6750
- <xsl:with-param name="process">true</xsl:with-param>
6751
- </xsl:apply-templates>
6439
+ <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
6440
+ <xsl:with-param name="process">true</xsl:with-param>
6441
+ </xsl:apply-templates>
6752
6442
 
6753
- <fo:inline xsl:use-attribute-sets="table-fn-body-style">
6754
- <!-- <xsl:copy-of select="./node()"/> -->
6755
- <xsl:apply-templates/>
6756
- </fo:inline>
6443
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
6444
+ <!-- <xsl:copy-of select="./node()"/> -->
6445
+ <xsl:apply-templates/>
6446
+ </fo:inline>
6757
6447
 
6758
- </fo:block>
6448
+ </fo:block>
6759
6449
 
6760
6450
  <!-- </xsl:if> -->
6761
6451
  </xsl:for-each>
@@ -6808,9 +6498,7 @@
6808
6498
  <xsl:param name="process">false</xsl:param>
6809
6499
  <xsl:if test="$process = 'true'">
6810
6500
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
6811
-
6812
- <xsl:attribute name="padding-right">3mm</xsl:attribute>
6813
-
6501
+ <xsl:attribute name="padding-right">3mm</xsl:attribute>
6814
6502
  </xsl:if>
6815
6503
  </xsl:template>
6816
6504
 
@@ -6894,7 +6582,6 @@
6894
6582
  <xsl:if test="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
6895
6583
 
6896
6584
  <xsl:variable name="key_iso">
6897
-
6898
6585
  </xsl:variable>
6899
6586
 
6900
6587
  <fo:block>
@@ -6940,7 +6627,6 @@
6940
6627
  <fo:table width="95%" table-layout="fixed">
6941
6628
  <xsl:if test="normalize-space($key_iso) = 'true'">
6942
6629
  <xsl:attribute name="font-size">10pt</xsl:attribute>
6943
-
6944
6630
  </xsl:if>
6945
6631
  <xsl:choose>
6946
6632
  <!-- if there 'dl', then set same columns width -->
@@ -6964,23 +6650,19 @@
6964
6650
  <fo:table-row>
6965
6651
  <fo:table-cell>
6966
6652
  <fo:block>
6967
-
6968
- <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
6969
- <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
6970
- <!-- <xsl:value-of select="@reference"/> -->
6971
- <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
6972
- </fo:inline>
6653
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
6654
+ <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
6655
+ <!-- <xsl:value-of select="@reference"/> -->
6656
+ <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
6657
+ </fo:inline>
6973
6658
 
6974
6659
  </fo:block>
6975
6660
  </fo:table-cell>
6976
6661
  <fo:table-cell>
6977
6662
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
6978
6663
  <xsl:if test="normalize-space($key_iso) = 'true'">
6979
-
6980
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
6981
-
6664
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
6982
6665
  </xsl:if>
6983
-
6984
6666
  <!-- <xsl:copy-of select="./node()"/> -->
6985
6667
  <xsl:apply-templates/>
6986
6668
  </fo:block>
@@ -7030,11 +6712,9 @@
7030
6712
  <!-- figure/dl[@key = 'true']/dt/p/sup -->
7031
6713
  <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">
7032
6714
  <xsl:variable name="key_iso">
7033
-
7034
6715
  </xsl:variable>
7035
6716
  <xsl:if test="normalize-space($key_iso) = 'true'">
7036
6717
  <xsl:attribute name="font-size">10pt</xsl:attribute>
7037
-
7038
6718
  </xsl:if>
7039
6719
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
7040
6720
  <!-- <xsl:value-of select="@reference"/> -->
@@ -7080,8 +6760,7 @@
7080
6760
  <xsl:text>※</xsl:text>
7081
6761
  </xsl:if> -->
7082
6762
  <!-- <xsl:value-of select="@reference"/> -->
7083
-
7084
- <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
6763
+ <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
7085
6764
 
7086
6765
  <!-- <xsl:if test="$namespace = 'bsi'">
7087
6766
  <xsl:text>)</xsl:text>
@@ -7124,40 +6803,39 @@
7124
6803
  <!-- ===================== -->
7125
6804
  <!-- Definition List -->
7126
6805
  <!-- ===================== -->
7127
-
7128
- <!-- convert table[@class = 'dl'] to dl with colgroup/col/@colwidth -->
7129
- <xsl:template match="*[local-name()='table'][@class = 'dl' and count(.//*[local-name() = 'tr'][1]/*) = 2]" priority="4">
7130
- <xsl:variable name="dl">
7131
- <xsl:element name="dl" namespace="{$namespace_full}">
7132
- <xsl:copy-of select="@*"/>
7133
- <xsl:element name="colgroup" namespace="{$namespace_full}">
7134
- <xsl:for-each select=".//*[local-name()='tr'][1]/*">
7135
- <xsl:element name="col" namespace="{$namespace_full}">
7136
- <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
7137
- </xsl:element>
7138
- </xsl:for-each>
7139
- </xsl:element>
7140
- <xsl:apply-templates mode="table_to_dl"/>
6806
+ <!-- convert table[@class = 'dl'] to dl with colgroup/col/@colwidth -->
6807
+ <xsl:template match="*[local-name()='table'][@class = 'dl' and count(.//*[local-name() = 'tr'][1]/*) = 2]" priority="4">
6808
+ <xsl:variable name="dl">
6809
+ <xsl:element name="dl" namespace="{$namespace_full}">
6810
+ <xsl:copy-of select="@*"/>
6811
+ <xsl:element name="colgroup" namespace="{$namespace_full}">
6812
+ <xsl:for-each select=".//*[local-name()='tr'][1]/*">
6813
+ <xsl:element name="col" namespace="{$namespace_full}">
6814
+ <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
6815
+ </xsl:element>
6816
+ </xsl:for-each>
7141
6817
  </xsl:element>
7142
- </xsl:variable>
7143
- <xsl:apply-templates select="xalan:nodeset($dl)/node()"/>
7144
- </xsl:template>
7145
- <xsl:template match="@*|node()" mode="table_to_dl">
7146
- <xsl:copy>
7147
- <xsl:apply-templates select="@*|node()" mode="table_to_dl"/>
7148
- </xsl:copy>
7149
- </xsl:template>
7150
- <xsl:template match="*[local-name() = 'tbody']" mode="table_to_dl">
7151
- <xsl:apply-templates mode="table_to_dl"/>
7152
- </xsl:template>
7153
- <xsl:template match="*[local-name() = 'tr']" mode="table_to_dl">
7154
- <xsl:element name="dt" namespace="{$namespace_full}">
7155
- <xsl:apply-templates select="*[1]/node()" mode="table_to_dl"/>
6818
+ <xsl:apply-templates mode="table_to_dl"/>
7156
6819
  </xsl:element>
7157
- <xsl:element name="dd" namespace="{$namespace_full}">
7158
- <xsl:apply-templates select="*[2]/node()" mode="table_to_dl"/>
7159
- </xsl:element>
7160
- </xsl:template>
6820
+ </xsl:variable>
6821
+ <xsl:apply-templates select="xalan:nodeset($dl)/node()"/>
6822
+ </xsl:template>
6823
+ <xsl:template match="@*|node()" mode="table_to_dl">
6824
+ <xsl:copy>
6825
+ <xsl:apply-templates select="@*|node()" mode="table_to_dl"/>
6826
+ </xsl:copy>
6827
+ </xsl:template>
6828
+ <xsl:template match="*[local-name() = 'tbody']" mode="table_to_dl">
6829
+ <xsl:apply-templates mode="table_to_dl"/>
6830
+ </xsl:template>
6831
+ <xsl:template match="*[local-name() = 'tr']" mode="table_to_dl">
6832
+ <xsl:element name="dt" namespace="{$namespace_full}">
6833
+ <xsl:apply-templates select="*[1]/node()" mode="table_to_dl"/>
6834
+ </xsl:element>
6835
+ <xsl:element name="dd" namespace="{$namespace_full}">
6836
+ <xsl:apply-templates select="*[2]/node()" mode="table_to_dl"/>
6837
+ </xsl:element>
6838
+ </xsl:template>
7161
6839
 
7162
6840
  <!-- for table auto-layout algorithm -->
7163
6841
  <xsl:template match="*[local-name()='dl']" priority="2">
@@ -7187,10 +6865,9 @@
7187
6865
  </xsl:if>
7188
6866
 
7189
6867
  <xsl:call-template name="setBlockSpanAll"/>
7190
-
7191
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
7192
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
7193
- </xsl:if>
6868
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
6869
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
6870
+ </xsl:if>
7194
6871
 
7195
6872
  <xsl:if test="ancestor::*[local-name() = 'sourcecode']">
7196
6873
  <!-- set font-size as sourcecode font-size -->
@@ -7211,7 +6888,6 @@
7211
6888
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
7212
6889
  </xsl:choose>
7213
6890
  </xsl:attribute>
7214
-
7215
6891
  </xsl:if>
7216
6892
 
7217
6893
  <xsl:call-template name="setTrackChangesStyles">
@@ -7220,37 +6896,32 @@
7220
6896
  </xsl:call-template>
7221
6897
 
7222
6898
  <fo:block-container margin-left="0mm" role="SKIP">
7223
-
7224
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
6899
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
7225
6900
 
7226
6901
  <xsl:variable name="parent" select="local-name(..)"/>
7227
6902
 
7228
- <xsl:variable name="key_iso">
7229
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
6903
+ <xsl:variable name="key_iso"> <!-- and (not(../@class) or ../@class !='pseudocode') -->
7230
6904
  </xsl:variable>
7231
6905
 
7232
6906
  <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(*[local-name()='dt']) = 1)"/>
7233
6907
 
7234
6908
  <xsl:choose>
7235
6909
  <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
7236
-
7237
- <fo:block margin-bottom="12pt" text-align="left">
7238
-
7239
- <!-- <xsl:variable name="title-where">
6910
+ <fo:block margin-bottom="12pt" text-align="left">
6911
+ <!-- <xsl:variable name="title-where">
7240
6912
  <xsl:call-template name="getLocalizedString">
7241
6913
  <xsl:with-param name="key">where</xsl:with-param>
7242
6914
  </xsl:call-template>
7243
6915
  </xsl:variable>
7244
6916
  <xsl:value-of select="$title-where"/> -->
7245
- <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
7246
- <xsl:text> </xsl:text>
7247
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
7248
- <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
7249
- <xsl:text> </xsl:text>
7250
- </xsl:if>
7251
- <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
7252
- </fo:block>
7253
-
6917
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
6918
+ <xsl:text> </xsl:text>
6919
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
6920
+ <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
6921
+ <xsl:text> </xsl:text>
6922
+ </xsl:if>
6923
+ <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
6924
+ </fo:block>
7254
6925
  </xsl:when> <!-- END: only one component -->
7255
6926
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
7256
6927
  <fo:block margin-bottom="12pt" text-align="left">
@@ -7270,19 +6941,17 @@
7270
6941
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
7271
6942
  <!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
7272
6943
  <xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
6944
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
7273
6945
 
7274
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
7275
-
7276
- <xsl:call-template name="refine_figure_key_style"/>
7277
-
7278
- <xsl:variable name="title-key">
7279
- <xsl:call-template name="getLocalizedString">
7280
- <xsl:with-param name="key">key</xsl:with-param>
7281
- </xsl:call-template>
7282
- </xsl:variable>
7283
- <xsl:value-of select="$title-key"/>
7284
- </fo:block>
6946
+ <xsl:call-template name="refine_figure_key_style"/>
7285
6947
 
6948
+ <xsl:variable name="title-key">
6949
+ <xsl:call-template name="getLocalizedString">
6950
+ <xsl:with-param name="key">key</xsl:with-param>
6951
+ </xsl:call-template>
6952
+ </xsl:variable>
6953
+ <xsl:value-of select="$title-key"/>
6954
+ </fo:block>
7286
6955
  </xsl:if>
7287
6956
  </xsl:when> <!-- END: definition list in a figure -->
7288
6957
  </xsl:choose>
@@ -7315,12 +6984,10 @@
7315
6984
  <xsl:if test="$isGenerateTableIF = 'true'">
7316
6985
  <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
7317
6986
  </xsl:if>
7318
-
7319
6987
  <xsl:choose>
7320
6988
  <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
7321
6989
  <xsl:when test="normalize-space($key_iso) = 'true'">
7322
6990
  <xsl:attribute name="font-size">10pt</xsl:attribute>
7323
-
7324
6991
  </xsl:when>
7325
6992
  </xsl:choose>
7326
6993
 
@@ -7425,17 +7092,15 @@
7425
7092
  <xsl:call-template name="getMaxLength_dt"/>
7426
7093
  </xsl:variable>
7427
7094
 
7428
- <xsl:variable name="isContainsKeepTogetherTag_">
7429
- false
7095
+ <xsl:variable name="isContainsKeepTogetherTag_">false
7430
7096
  </xsl:variable>
7431
7097
  <xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
7432
7098
  <!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
7433
-
7434
- <xsl:call-template name="setColumnWidth_dl">
7435
- <xsl:with-param name="colwidths" select="$colwidths"/>
7436
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
7437
- <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
7438
- </xsl:call-template>
7099
+ <xsl:call-template name="setColumnWidth_dl">
7100
+ <xsl:with-param name="colwidths" select="$colwidths"/>
7101
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
7102
+ <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
7103
+ </xsl:call-template>
7439
7104
 
7440
7105
  <fo:table-body>
7441
7106
 
@@ -7486,27 +7151,21 @@
7486
7151
  </xsl:template>
7487
7152
 
7488
7153
  <xsl:template name="refine_dl_formula_where_style">
7489
-
7490
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
7491
-
7154
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
7492
7155
  </xsl:template> <!-- refine_dl_formula_where_style -->
7493
7156
 
7494
7157
  <xsl:template name="refine_figure_key_style">
7495
-
7496
7158
  </xsl:template> <!-- refine_figure_key_style -->
7497
7159
 
7498
7160
  <xsl:template name="refine_multicomponent_style">
7499
7161
  <xsl:variable name="parent" select="local-name(..)"/>
7500
-
7501
- <xsl:if test="$parent = 'figure' or $parent = 'formula'">
7502
- <xsl:attribute name="margin-left">7.4mm</xsl:attribute>
7503
- </xsl:if>
7504
-
7162
+ <xsl:if test="$parent = 'figure' or $parent = 'formula'">
7163
+ <xsl:attribute name="margin-left">7.4mm</xsl:attribute>
7164
+ </xsl:if>
7505
7165
  </xsl:template> <!-- refine_multicomponent_style -->
7506
7166
 
7507
7167
  <xsl:template name="refine_multicomponent_block_style">
7508
7168
  <xsl:variable name="parent" select="local-name(..)"/>
7509
-
7510
7169
  </xsl:template> <!-- refine_multicomponent_block_style -->
7511
7170
 
7512
7171
  <!-- ignore 'p' with 'where' in formula, before 'dl' -->
@@ -7693,14 +7352,11 @@
7693
7352
  <xsl:attribute name="id">
7694
7353
  <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
7695
7354
  </xsl:attribute>
7696
-
7697
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
7698
- <xsl:with-param name="process">true</xsl:with-param>
7699
- </xsl:apply-templates>
7700
-
7355
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
7356
+ <xsl:with-param name="process">true</xsl:with-param>
7357
+ </xsl:apply-templates>
7701
7358
  </td>
7702
7359
  </tr>
7703
-
7704
7360
  </xsl:template>
7705
7361
 
7706
7362
  <!-- Definition's term -->
@@ -7709,7 +7365,6 @@
7709
7365
  <xsl:param name="split_keep-within-line"/>
7710
7366
 
7711
7367
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
7712
-
7713
7368
  <xsl:call-template name="insert_dt_cell">
7714
7369
  <xsl:with-param name="key_iso" select="$key_iso"/>
7715
7370
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -7731,7 +7386,6 @@
7731
7386
  <!-- border is mandatory, to calculate real width -->
7732
7387
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
7733
7388
  <xsl:attribute name="text-align">left</xsl:attribute>
7734
-
7735
7389
  </xsl:if>
7736
7390
 
7737
7391
  <xsl:call-template name="refine_dt-cell-style"/>
@@ -7741,9 +7395,7 @@
7741
7395
 
7742
7396
  <xsl:choose>
7743
7397
  <xsl:when test="$isGenerateTableIF = 'true'">
7744
-
7745
- <xsl:copy-of select="@id"/>
7746
-
7398
+ <xsl:copy-of select="@id"/>
7747
7399
  </xsl:when>
7748
7400
  <xsl:otherwise>
7749
7401
  <xsl:copy-of select="@id"/>
@@ -7780,12 +7432,9 @@
7780
7432
  <fo:block role="SKIP">
7781
7433
 
7782
7434
  <xsl:if test="$isGenerateTableIF = 'true'">
7783
-
7784
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
7785
-
7435
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
7786
7436
  </xsl:if>
7787
-
7788
- <xsl:attribute name="text-align">justify</xsl:attribute>
7437
+ <xsl:attribute name="text-align">justify</xsl:attribute>
7789
7438
 
7790
7439
  <xsl:choose>
7791
7440
  <xsl:when test="$isGenerateTableIF = 'true'">
@@ -7932,11 +7581,9 @@
7932
7581
  </xsl:template>
7933
7582
 
7934
7583
  <xsl:template name="refine_italic_style">
7935
-
7936
- <xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
7937
- <xsl:attribute name="font-style">normal</xsl:attribute>
7938
- </xsl:if>
7939
-
7584
+ <xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
7585
+ <xsl:attribute name="font-style">normal</xsl:attribute>
7586
+ </xsl:if>
7940
7587
  </xsl:template>
7941
7588
 
7942
7589
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
@@ -7952,7 +7599,6 @@
7952
7599
  </xsl:template>
7953
7600
 
7954
7601
  <xsl:template name="refine_strong_style">
7955
-
7956
7602
  <xsl:if test="ancestor::*['preferred']">
7957
7603
  <xsl:attribute name="role">SKIP</xsl:attribute>
7958
7604
  </xsl:if>
@@ -7977,10 +7623,7 @@
7977
7623
  <xsl:template match="*[local-name()='tt']">
7978
7624
  <fo:inline xsl:use-attribute-sets="tt-style">
7979
7625
 
7980
- <xsl:variable name="_font-size">
7981
-
7982
- <!-- inherit -->
7983
-
7626
+ <xsl:variable name="_font-size"> <!-- inherit -->
7984
7627
  </xsl:variable>
7985
7628
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
7986
7629
  <xsl:if test="$font-size != ''">
@@ -8196,8 +7839,7 @@
8196
7839
  </xsl:otherwise>
8197
7840
  </xsl:choose>
8198
7841
  </xsl:variable>
8199
- <xsl:variable name="ratio_">
8200
- 0.75
7842
+ <xsl:variable name="ratio_">0.75
8201
7843
  </xsl:variable>
8202
7844
  <xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
8203
7845
  <fo:inline font-size="{$ratio * 100}%" role="SKIP">
@@ -8287,7 +7929,7 @@
8287
7929
 
8288
7930
  <xsl:variable name="quot">"</xsl:variable>
8289
7931
  <xsl:variable name="styles_">
8290
- <xsl:for-each select="xalan:nodeset($styles__)/item">
7932
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
8291
7933
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
8292
7934
  <xsl:variable name="value_" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
8293
7935
  <xsl:variable name="value">
@@ -8299,7 +7941,7 @@
8299
7941
  </xsl:otherwise>
8300
7942
  </xsl:choose>
8301
7943
  </xsl:variable>
8302
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
7944
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
8303
7945
  <style name="{$key}"><xsl:value-of select="$value"/></style>
8304
7946
  </xsl:if>
8305
7947
  <xsl:if test="$key = 'text-indent'">
@@ -8313,7 +7955,6 @@
8313
7955
  <fo:inline>
8314
7956
  <xsl:for-each select="$styles/style">
8315
7957
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
8316
-
8317
7958
  </xsl:for-each>
8318
7959
  <xsl:apply-templates/>
8319
7960
  </fo:inline>
@@ -9300,10 +8941,9 @@
9300
8941
  <xsl:variable name="mathml_content">
9301
8942
  <xsl:apply-templates select="." mode="mathml_actual_text"/>
9302
8943
  </xsl:variable>
9303
-
9304
- <xsl:call-template name="mathml_instream_object">
9305
- <xsl:with-param name="mathml_content" select="$mathml_content"/>
9306
- </xsl:call-template>
8944
+ <xsl:call-template name="mathml_instream_object">
8945
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
8946
+ </xsl:call-template>
9307
8947
 
9308
8948
  </fo:inline>
9309
8949
  </xsl:template>
@@ -9337,7 +8977,6 @@
9337
8977
  <xsl:template name="getMathml_asciimath_text">
9338
8978
  <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
9339
8979
  <xsl:variable name="latexmath">
9340
-
9341
8980
  </xsl:variable>
9342
8981
  <xsl:variable name="asciimath_text_following">
9343
8982
  <xsl:choose>
@@ -9410,7 +9049,6 @@
9410
9049
  </xsl:template>
9411
9050
 
9412
9051
  <xsl:template name="refine_mathml_insteam_object_style">
9413
-
9414
9052
  </xsl:template> <!-- refine_mathml_insteam_object_style -->
9415
9053
 
9416
9054
  <xsl:template match="mathml:*" mode="mathml_actual_text">
@@ -9808,7 +9446,6 @@
9808
9446
  <xsl:variable name="annotation-id" select="@id"/>
9809
9447
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
9810
9448
  <fo:block id="{$annotation-id}" white-space="nowrap">
9811
-
9812
9449
  <fo:inline>
9813
9450
  <xsl:apply-templates>
9814
9451
  <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
@@ -9837,7 +9474,6 @@
9837
9474
  <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'])">
9838
9475
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
9839
9476
  </xsl:if>
9840
-
9841
9477
  <xsl:if test="parent::*[local-name() = 'add']">
9842
9478
  <xsl:call-template name="append_add-style"/>
9843
9479
  </xsl:if>
@@ -9848,8 +9484,7 @@
9848
9484
  </xsl:template>
9849
9485
 
9850
9486
  <!-- command between two xref points to non-standard bibitem -->
9851
- <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']]]">
9852
- <xsl:value-of select="."/>
9487
+ <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="."/>
9853
9488
  </xsl:template>
9854
9489
 
9855
9490
  <!-- ====== -->
@@ -9864,7 +9499,6 @@
9864
9499
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
9865
9500
  </xsl:choose>
9866
9501
  </xsl:attribute>
9867
-
9868
9502
  </xsl:if>
9869
9503
  <fo:block-container margin-left="0mm" role="SKIP">
9870
9504
  <xsl:call-template name="setNamedDestination"/>
@@ -9954,57 +9588,52 @@
9954
9588
 
9955
9589
  <xsl:template match="*[local-name() = 'note']" name="note">
9956
9590
 
9957
- <xsl:call-template name="setNamedDestination"/>
9958
-
9959
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
9960
-
9961
- <xsl:call-template name="setBlockSpanAll"/>
9962
-
9963
- <xsl:call-template name="refine_note-style"/>
9591
+ <xsl:call-template name="setNamedDestination"/>
9964
9592
 
9965
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9593
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
9966
9594
 
9967
- <fo:block>
9595
+ <xsl:call-template name="setBlockSpanAll"/>
9968
9596
 
9969
- <xsl:call-template name="refine_note_block_style"/>
9597
+ <xsl:call-template name="refine_note-style"/>
9970
9598
 
9971
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
9599
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9600
+ <fo:block>
9972
9601
 
9973
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
9602
+ <xsl:call-template name="refine_note_block_style"/>
9974
9603
 
9975
- <xsl:call-template name="refine_note-name-style"/>
9604
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
9976
9605
 
9977
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9978
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9979
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
9980
- <xsl:call-template name="append_add-style"/>
9981
- </xsl:if>
9606
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
9982
9607
 
9983
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
9984
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9985
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9986
- <xsl:with-param name="skip">false</xsl:with-param>
9987
- </xsl:apply-templates>
9988
- </xsl:if>
9608
+ <xsl:call-template name="refine_note-name-style"/>
9989
9609
 
9990
- <xsl:apply-templates select="*[local-name() = 'name']"/>
9610
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9611
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9612
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
9613
+ <xsl:call-template name="append_add-style"/>
9614
+ </xsl:if>
9991
9615
 
9992
- </fo:inline>
9616
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
9617
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9618
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9619
+ <xsl:with-param name="skip">false</xsl:with-param>
9620
+ </xsl:apply-templates>
9621
+ </xsl:if>
9993
9622
 
9994
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9995
- </fo:block>
9623
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
9996
9624
 
9997
- </fo:block-container>
9998
- </fo:block-container>
9625
+ </fo:inline>
9999
9626
 
9627
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9628
+ </fo:block>
9629
+ </fo:block-container>
9630
+ </fo:block-container>
10000
9631
  </xsl:template>
10001
9632
 
10002
9633
  <xsl:template name="refine_note_block_style">
10003
-
10004
- <xsl:if test="ancestor::itu:figure">
10005
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
10006
- </xsl:if>
10007
-
9634
+ <xsl:if test="ancestor::itu:figure">
9635
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
9636
+ </xsl:if>
10008
9637
  </xsl:template> <!-- refine_note_block_style -->
10009
9638
 
10010
9639
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
@@ -10057,7 +9686,6 @@
10057
9686
  <xsl:value-of select="$sfx"/>
10058
9687
  </xsl:when>
10059
9688
  <xsl:otherwise>
10060
-
10061
9689
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
10062
9690
  <!-- <xsl:if test="$namespace = 'ieee'">
10063
9691
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -10065,7 +9693,6 @@
10065
9693
  <!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
10066
9694
  <xsl:text>:</xsl:text>
10067
9695
  </xsl:if> -->
10068
-
10069
9696
  <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
10070
9697
  <xsl:text> – </xsl:text> en dash &#x2013;
10071
9698
  </xsl:if> -->
@@ -10086,7 +9713,6 @@
10086
9713
  <xsl:value-of select="$sfx"/>
10087
9714
  </xsl:when>
10088
9715
  <xsl:otherwise>
10089
-
10090
9716
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
10091
9717
  <!-- <xsl:if test="$namespace = 'ieee'">
10092
9718
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -10142,7 +9768,6 @@
10142
9768
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
10143
9769
 
10144
9770
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
10145
-
10146
9771
  </xsl:if>
10147
9772
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
10148
9773
  </fo:block>
@@ -10182,8 +9807,7 @@
10182
9807
  <!-- Example: Dimensions in millimeters -->
10183
9808
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
10184
9809
 
10185
- <xsl:variable name="show_figure_key_in_block_container">
10186
- true
9810
+ <xsl:variable name="show_figure_key_in_block_container">true
10187
9811
  </xsl:variable>
10188
9812
 
10189
9813
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
@@ -10198,11 +9822,9 @@
10198
9822
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
10199
9823
  <xsl:call-template name="showFigureKey"/>
10200
9824
  </xsl:if>
10201
-
10202
- <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
9825
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
10203
9826
 
10204
9827
  </fo:block-container>
10205
-
10206
9828
  </xsl:template>
10207
9829
 
10208
9830
  <xsl:template name="showFigureKey">
@@ -10240,13 +9862,12 @@
10240
9862
  <!-- SOURCE: ... -->
10241
9863
  <!-- figure/source -->
10242
9864
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
10243
-
10244
- <xsl:call-template name="termsource"/>
10245
-
9865
+ <xsl:call-template name="termsource"/>
10246
9866
  </xsl:template>
10247
9867
 
10248
9868
  <xsl:template match="*[local-name() = 'image']">
10249
9869
  <xsl:param name="indent">0</xsl:param>
9870
+ <xsl:param name="logo_width"/>
10250
9871
  <xsl:variable name="isAdded" select="../@added"/>
10251
9872
  <xsl:variable name="isDeleted" select="../@deleted"/>
10252
9873
  <xsl:choose>
@@ -10268,9 +9889,18 @@
10268
9889
 
10269
9890
  <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
10270
9891
 
10271
- <!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
10272
9892
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
10273
9893
 
9894
+ <xsl:if test="parent::*[local-name() = 'logo']"> <!-- publisher's logo -->
9895
+ <xsl:attribute name="width">100%</xsl:attribute>
9896
+ <xsl:if test="normalize-space($logo_width) != ''">
9897
+ <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
9898
+ </xsl:if>
9899
+ <xsl:attribute name="content-height">100%</xsl:attribute>
9900
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
9901
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
9902
+ </xsl:if>
9903
+
10274
9904
  <xsl:variable name="width">
10275
9905
  <xsl:call-template name="setImageWidth"/>
10276
9906
  </xsl:variable>
@@ -10348,8 +9978,7 @@
10348
9978
  </xsl:call-template>
10349
9979
  </xsl:variable>
10350
9980
 
10351
- <xsl:variable name="scaleRatio">
10352
- 1
9981
+ <xsl:variable name="scaleRatio">1
10353
9982
  </xsl:variable>
10354
9983
 
10355
9984
  <xsl:if test="number($scale) &lt; 100">
@@ -10460,18 +10089,14 @@
10460
10089
  </xsl:variable>
10461
10090
 
10462
10091
  <xsl:variable name="image_width_effective">
10463
-
10464
- <xsl:value-of select="$width_effective - number($indent_left)"/>
10465
-
10092
+ <xsl:value-of select="$width_effective - number($indent_left)"/>
10466
10093
  </xsl:variable>
10467
10094
  <xsl:variable name="image_height_effective" select="$height_effective - number($indent_left)"/>
10468
10095
  <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
10469
10096
  <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
10470
10097
  <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
10471
10098
  <xsl:variable name="scale">
10472
-
10473
- <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
10474
-
10099
+ <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
10475
10100
  </xsl:variable>
10476
10101
  <xsl:value-of select="$scale"/>
10477
10102
  </xsl:template>
@@ -10492,7 +10117,8 @@
10492
10117
  </xsl:when>
10493
10118
  <xsl:when test="not(starts-with(@src, 'data:'))">
10494
10119
  <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
10495
- <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
10120
+ <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>
10121
+ <xsl:value-of select="concat('url(', $file_protocol, $src_external, ')')"/>
10496
10122
  </xsl:when>
10497
10123
  <xsl:otherwise>
10498
10124
  <xsl:value-of select="@src"/>
@@ -10788,8 +10414,8 @@
10788
10414
  </xsl:call-template>
10789
10415
  </xsl:variable>
10790
10416
  <xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
10791
- <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
10792
- <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
10417
+ <xsl:variable name="width" select="normalize-space($viewbox//mn:item[3])"/>
10418
+ <xsl:variable name="height" select="normalize-space($viewbox//mn:item[4])"/>
10793
10419
 
10794
10420
  <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
10795
10421
  <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
@@ -10861,8 +10487,8 @@
10861
10487
  </xsl:variable>
10862
10488
  <xsl:variable name="components" select="xalan:nodeset($components_)"/>
10863
10489
  <xsl:variable name="att_name" select="local-name()"/>
10864
- <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
10865
- <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
10490
+ <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>
10491
+ <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/mn:item[4]"/></xsl:attribute>
10866
10492
  </xsl:template>
10867
10493
 
10868
10494
  <!-- ============== -->
@@ -10935,13 +10561,13 @@
10935
10561
  </xsl:call-template>
10936
10562
  </xsl:variable>
10937
10563
  <xsl:variable name="x_coords">
10938
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
10564
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 1]">
10939
10565
  <xsl:sort select="." data-type="number"/>
10940
10566
  <x><xsl:value-of select="."/></x>
10941
10567
  </xsl:for-each>
10942
10568
  </xsl:variable>
10943
10569
  <xsl:variable name="y_coords">
10944
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
10570
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 0]">
10945
10571
  <xsl:sort select="." data-type="number"/>
10946
10572
  <y><xsl:value-of select="."/></y>
10947
10573
  </xsl:for-each>
@@ -11146,11 +10772,11 @@
11146
10772
  <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
11147
10773
  </xsl:variable>
11148
10774
 
11149
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
11150
- <title>
10775
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
10776
+ <mn:title>
11151
10777
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
11152
- </title>
11153
- </item>
10778
+ </mn:title>
10779
+ </mn:item>
11154
10780
  </xsl:if>
11155
10781
  </xsl:template>
11156
10782
 
@@ -11221,12 +10847,12 @@
11221
10847
  <xsl:param name="contents"/>
11222
10848
  <xsl:param name="contents_addon"/>
11223
10849
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
11224
- <xsl:if test="$contents_nodes//item">
10850
+ <xsl:if test="$contents_nodes//mn:item">
11225
10851
  <fo:bookmark-tree>
11226
10852
  <xsl:choose>
11227
- <xsl:when test="$contents_nodes/doc">
10853
+ <xsl:when test="$contents_nodes/mn:doc">
11228
10854
  <xsl:choose>
11229
- <xsl:when test="count($contents_nodes/doc) &gt; 1">
10855
+ <xsl:when test="count($contents_nodes/mn:doc) &gt; 1">
11230
10856
 
11231
10857
  <xsl:if test="$contents_nodes/collection">
11232
10858
  <fo:bookmark internal-destination="{$contents/collection/@firstpage_id}">
@@ -11234,8 +10860,8 @@
11234
10860
  </fo:bookmark>
11235
10861
  </xsl:if>
11236
10862
 
11237
- <xsl:for-each select="$contents_nodes/doc">
11238
- <fo:bookmark internal-destination="{contents/item[@display = 'true'][1]/@id}" starting-state="hide">
10863
+ <xsl:for-each select="$contents_nodes/mn:doc">
10864
+ <fo:bookmark internal-destination="{contents/mn:item[@display = 'true'][1]/@id}" starting-state="hide">
11239
10865
  <xsl:if test="@bundle = 'true'">
11240
10866
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
11241
10867
  </xsl:if>
@@ -11269,14 +10895,14 @@
11269
10895
  </xsl:choose>
11270
10896
  </fo:bookmark-title>
11271
10897
 
11272
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
10898
+ <xsl:apply-templates select="contents/mn:item" mode="bookmark"/>
11273
10899
 
11274
10900
  <xsl:call-template name="insertFigureBookmarks">
11275
- <xsl:with-param name="contents" select="contents"/>
10901
+ <xsl:with-param name="contents" select="mn:contents"/>
11276
10902
  </xsl:call-template>
11277
10903
 
11278
10904
  <xsl:call-template name="insertTableBookmarks">
11279
- <xsl:with-param name="contents" select="contents"/>
10905
+ <xsl:with-param name="contents" select="mn:contents"/>
11280
10906
  <xsl:with-param name="lang" select="@lang"/>
11281
10907
  </xsl:call-template>
11282
10908
 
@@ -11285,16 +10911,16 @@
11285
10911
  </xsl:for-each>
11286
10912
  </xsl:when>
11287
10913
  <xsl:otherwise>
11288
- <xsl:for-each select="$contents_nodes/doc">
10914
+ <xsl:for-each select="$contents_nodes/mn:doc">
11289
10915
 
11290
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
10916
+ <xsl:apply-templates select="mn:contents/mn:item" mode="bookmark"/>
11291
10917
 
11292
10918
  <xsl:call-template name="insertFigureBookmarks">
11293
- <xsl:with-param name="contents" select="contents"/>
10919
+ <xsl:with-param name="contents" select="mn:contents"/>
11294
10920
  </xsl:call-template>
11295
10921
 
11296
10922
  <xsl:call-template name="insertTableBookmarks">
11297
- <xsl:with-param name="contents" select="contents"/>
10923
+ <xsl:with-param name="contents" select="mn:contents"/>
11298
10924
  <xsl:with-param name="lang" select="@lang"/>
11299
10925
  </xsl:call-template>
11300
10926
 
@@ -11303,14 +10929,14 @@
11303
10929
  </xsl:choose>
11304
10930
  </xsl:when>
11305
10931
  <xsl:otherwise>
11306
- <xsl:apply-templates select="$contents_nodes/contents/item" mode="bookmark"/>
10932
+ <xsl:apply-templates select="$contents_nodes/mn:contents/mn:item" mode="bookmark"/>
11307
10933
 
11308
10934
  <xsl:call-template name="insertFigureBookmarks">
11309
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
10935
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
11310
10936
  </xsl:call-template>
11311
10937
 
11312
10938
  <xsl:call-template name="insertTableBookmarks">
11313
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
10939
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
11314
10940
  <xsl:with-param name="lang" select="@lang"/>
11315
10941
  </xsl:call-template>
11316
10942
 
@@ -11327,80 +10953,72 @@
11327
10953
  <xsl:template name="insertFigureBookmarks">
11328
10954
  <xsl:param name="contents"/>
11329
10955
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
11330
- <xsl:if test="$contents_nodes/figure">
11331
- <fo:bookmark internal-destination="{$contents_nodes/figure[1]/@id}" starting-state="hide">
10956
+ <xsl:if test="$contents_nodes/mn:figure">
10957
+ <fo:bookmark internal-destination="{$contents_nodes/mn:figure[1]/@id}" starting-state="hide">
11332
10958
  <fo:bookmark-title>Figures</fo:bookmark-title>
11333
- <xsl:for-each select="$contents_nodes/figure">
10959
+ <xsl:for-each select="$contents_nodes/mn:figure">
11334
10960
  <fo:bookmark internal-destination="{@id}">
11335
10961
  <fo:bookmark-title>
11336
- <xsl:value-of select="normalize-space(title)"/>
10962
+ <xsl:value-of select="normalize-space(mn:title)"/>
11337
10963
  </fo:bookmark-title>
11338
10964
  </fo:bookmark>
11339
10965
  </xsl:for-each>
11340
10966
  </fo:bookmark>
11341
10967
  </xsl:if>
10968
+ <xsl:if test="$contents_nodes//mn:figures/mn:figure">
10969
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
11342
10970
 
11343
- <xsl:if test="$contents_nodes//figures/figure">
11344
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
11345
-
11346
- <xsl:variable name="bookmark-title">
11347
-
11348
- <xsl:value-of select="$title-list-figures"/>
11349
-
11350
- </xsl:variable>
11351
- <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
11352
- <xsl:for-each select="$contents_nodes//figures/figure">
11353
- <fo:bookmark internal-destination="{@id}">
11354
- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
11355
- </fo:bookmark>
11356
- </xsl:for-each>
10971
+ <xsl:variable name="bookmark-title">
10972
+ <xsl:value-of select="$title-list-figures"/>
10973
+ </xsl:variable>
10974
+ <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
10975
+ <xsl:for-each select="$contents_nodes//mn:figures/mn:figure">
10976
+ <fo:bookmark internal-destination="{@id}">
10977
+ <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
11357
10978
  </fo:bookmark>
11358
- </xsl:if>
11359
-
10979
+ </xsl:for-each>
10980
+ </fo:bookmark>
10981
+ </xsl:if>
11360
10982
  </xsl:template> <!-- insertFigureBookmarks -->
11361
10983
 
11362
10984
  <xsl:template name="insertTableBookmarks">
11363
10985
  <xsl:param name="contents"/>
11364
10986
  <xsl:param name="lang"/>
11365
10987
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
11366
- <xsl:if test="$contents_nodes/table">
11367
- <fo:bookmark internal-destination="{$contents_nodes/table[1]/@id}" starting-state="hide">
10988
+ <xsl:if test="$contents_nodes/mn:table">
10989
+ <fo:bookmark internal-destination="{$contents_nodes/mn:table[1]/@id}" starting-state="hide">
11368
10990
  <fo:bookmark-title>
11369
10991
  <xsl:choose>
11370
10992
  <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
11371
10993
  <xsl:otherwise>Tables</xsl:otherwise>
11372
10994
  </xsl:choose>
11373
10995
  </fo:bookmark-title>
11374
- <xsl:for-each select="$contents_nodes/table">
10996
+ <xsl:for-each select="$contents_nodes/mn:table">
11375
10997
  <fo:bookmark internal-destination="{@id}">
11376
10998
  <fo:bookmark-title>
11377
- <xsl:value-of select="normalize-space(title)"/>
10999
+ <xsl:value-of select="normalize-space(mn:title)"/>
11378
11000
  </fo:bookmark-title>
11379
11001
  </fo:bookmark>
11380
11002
  </xsl:for-each>
11381
11003
  </fo:bookmark>
11382
11004
  </xsl:if>
11005
+ <xsl:if test="$contents_nodes//mn:tables/mn:table">
11006
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
11383
11007
 
11384
- <xsl:if test="$contents_nodes//tables/table">
11385
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
11386
-
11387
- <xsl:variable name="bookmark-title">
11388
-
11389
- <xsl:value-of select="$title-list-tables"/>
11390
-
11391
- </xsl:variable>
11008
+ <xsl:variable name="bookmark-title">
11009
+ <xsl:value-of select="$title-list-tables"/>
11010
+ </xsl:variable>
11392
11011
 
11393
- <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
11012
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
11394
11013
 
11395
- <xsl:for-each select="$contents_nodes//tables/table">
11396
- <fo:bookmark internal-destination="{@id}">
11397
- <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
11398
- <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
11399
- </fo:bookmark>
11400
- </xsl:for-each>
11014
+ <xsl:for-each select="$contents_nodes//mn:tables/mn:table">
11015
+ <fo:bookmark internal-destination="{@id}">
11016
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
11017
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
11401
11018
  </fo:bookmark>
11402
- </xsl:if>
11403
-
11019
+ </xsl:for-each>
11020
+ </fo:bookmark>
11021
+ </xsl:if>
11404
11022
  </xsl:template> <!-- insertTableBookmarks -->
11405
11023
  <!-- End Bookmarks -->
11406
11024
 
@@ -11430,17 +11048,15 @@
11430
11048
  <xsl:param name="title" select="''"/>
11431
11049
  <xsl:choose>
11432
11050
  <xsl:when test="$lang = 'en'">
11433
-
11434
11051
  </xsl:when>
11435
11052
  <xsl:when test="$lang = 'fr'">
11436
-
11437
11053
  </xsl:when>
11438
11054
  <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
11439
11055
  <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
11440
11056
  </xsl:choose>
11441
11057
  </xsl:template>
11442
11058
 
11443
- <xsl:template match="item" mode="bookmark">
11059
+ <xsl:template match="mn:item" mode="bookmark">
11444
11060
  <xsl:choose>
11445
11061
  <xsl:when test="@id != ''">
11446
11062
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
@@ -11450,7 +11066,7 @@
11450
11066
  <xsl:text> </xsl:text>
11451
11067
  </xsl:if>
11452
11068
  <xsl:variable name="title">
11453
- <xsl:for-each select="title/node()">
11069
+ <xsl:for-each select="mn:title/node()">
11454
11070
  <xsl:choose>
11455
11071
  <xsl:when test="local-name() = 'add' and starts-with(., $ace_tag)"><!-- skip --></xsl:when>
11456
11072
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
@@ -11468,7 +11084,7 @@
11468
11084
  </xsl:choose>
11469
11085
  </xsl:template>
11470
11086
 
11471
- <xsl:template match="title" mode="bookmark"/>
11087
+ <xsl:template match="mn:title" mode="bookmark"/>
11472
11088
  <xsl:template match="text()" mode="bookmark"/>
11473
11089
 
11474
11090
  <!-- figure/name -->
@@ -11697,9 +11313,9 @@
11697
11313
  <xsl:template match="text()" mode="contents_item">
11698
11314
  <xsl:variable name="text">
11699
11315
  <!-- to split by '_' and other chars -->
11700
- <text><xsl:call-template name="add-zero-spaces-java"/></text>
11316
+ <mn:text><xsl:call-template name="add-zero-spaces-java"/></mn:text>
11701
11317
  </xsl:variable>
11702
- <xsl:for-each select="xalan:nodeset($text)/text/text()">
11318
+ <xsl:for-each select="xalan:nodeset($text)/mn:text/text()">
11703
11319
  <xsl:call-template name="keep_together_standard_number"/>
11704
11320
  </xsl:for-each>
11705
11321
  </xsl:template>
@@ -11732,16 +11348,7 @@
11732
11348
 
11733
11349
  <xsl:template name="get_sourcecode_attributes">
11734
11350
  <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
11735
- <xsl:variable name="_font-size">
11736
-
11737
- <!-- inherit -->
11738
-
11739
- <!-- <xsl:if test="$namespace = 'ieee'">
11740
- <xsl:if test="$current_template = 'standard'">8</xsl:if>
11741
- </xsl:if> -->
11742
- 10
11743
-
11744
-
11351
+ <xsl:variable name="_font-size"><!-- inherit -->10
11745
11352
  </xsl:variable>
11746
11353
 
11747
11354
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -11797,7 +11404,6 @@
11797
11404
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
11798
11405
  </xsl:choose>
11799
11406
  </xsl:attribute>
11800
-
11801
11407
  </xsl:if>
11802
11408
  <fo:block-container margin-left="0mm" role="SKIP">
11803
11409
 
@@ -11821,8 +11427,7 @@
11821
11427
  </fo:block>
11822
11428
 
11823
11429
  <xsl:apply-templates select="*[local-name() = 'dl']"/> <!-- Key table -->
11824
-
11825
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
11430
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
11826
11431
 
11827
11432
  </fo:block-container>
11828
11433
  </fo:block-container>
@@ -11999,25 +11604,6 @@
11999
11604
  </xsl:choose>
12000
11605
  </xsl:template>
12001
11606
 
12002
- <!-- insert 'char' between each character in the string -->
12003
- <xsl:template name="interspers">
12004
- <xsl:param name="str"/>
12005
- <xsl:param name="char" select="$zero_width_space"/>
12006
- <xsl:if test="$str != ''">
12007
- <xsl:value-of select="substring($str, 1, 1)"/>
12008
-
12009
- <xsl:variable name="next_char" select="substring($str, 2, 1)"/>
12010
- <xsl:if test="not(contains(concat(' -.:=_— ', $char), $next_char))">
12011
- <xsl:value-of select="$char"/>
12012
- </xsl:if>
12013
-
12014
- <xsl:call-template name="interspers">
12015
- <xsl:with-param name="str" select="substring($str, 2)"/>
12016
- <xsl:with-param name="char" select="$char"/>
12017
- </xsl:call-template>
12018
- </xsl:if>
12019
- </xsl:template>
12020
-
12021
11607
  <xsl:template name="interspers-java">
12022
11608
  <xsl:param name="str"/>
12023
11609
  <xsl:param name="char" select="$zero_width_space"/>
@@ -12114,7 +11700,7 @@
12114
11700
  </xsl:variable>
12115
11701
  <xsl:variable name="classes" select="xalan:nodeset($classes_)"/>
12116
11702
 
12117
- <xsl:for-each select="$classes/item">
11703
+ <xsl:for-each select="$classes/*[local-name() = 'item']">
12118
11704
  <xsl:variable name="class_name" select="."/>
12119
11705
  <xsl:for-each select="$syntax_highlight_styles/style[@class = $class_name]/@*[not(local-name() = 'class')]">
12120
11706
  <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
@@ -12197,12 +11783,9 @@
12197
11783
 
12198
11784
  <xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
12199
11785
  <xsl:if test="normalize-space() != ''">
12200
-
12201
- <fo:block xsl:use-attribute-sets="permission-name-style">
12202
- <xsl:apply-templates/>
12203
-
12204
- </fo:block>
12205
-
11786
+ <fo:block xsl:use-attribute-sets="permission-name-style">
11787
+ <xsl:apply-templates/>
11788
+ </fo:block>
12206
11789
  </xsl:if>
12207
11790
  </xsl:template>
12208
11791
 
@@ -12231,12 +11814,9 @@
12231
11814
  <xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
12232
11815
  <xsl:if test="normalize-space() != ''">
12233
11816
 
12234
- <fo:block xsl:use-attribute-sets="requirement-name-style">
12235
-
12236
- <xsl:apply-templates/>
12237
-
12238
- </fo:block>
12239
-
11817
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
11818
+ <xsl:apply-templates/>
11819
+ </fo:block>
12240
11820
  </xsl:if>
12241
11821
  </xsl:template>
12242
11822
 
@@ -12275,11 +11855,9 @@
12275
11855
  <xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
12276
11856
  <xsl:if test="normalize-space() != ''">
12277
11857
 
12278
- <fo:block xsl:use-attribute-sets="recommendation-name-style">
12279
- <xsl:apply-templates/>
12280
-
12281
- </fo:block>
12282
-
11858
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
11859
+ <xsl:apply-templates/>
11860
+ </fo:block>
12283
11861
  </xsl:if>
12284
11862
  </xsl:template>
12285
11863
 
@@ -12405,7 +11983,6 @@
12405
11983
 
12406
11984
  <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 ')">
12407
11985
  <xsl:attribute name="font-weight">bold</xsl:attribute>
12408
-
12409
11986
  </xsl:if>
12410
11987
 
12411
11988
  <xsl:apply-templates mode="requirement"/>
@@ -12450,7 +12027,6 @@
12450
12027
 
12451
12028
  <xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
12452
12029
  <fo:block font-size="11pt">
12453
-
12454
12030
  <xsl:apply-templates/>
12455
12031
  </fo:block>
12456
12032
  </xsl:template>
@@ -12490,7 +12066,6 @@
12490
12066
  <xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
12491
12067
  <xsl:variable name="element">inline
12492
12068
 
12493
-
12494
12069
  </xsl:variable>
12495
12070
  <xsl:choose>
12496
12071
  <xsl:when test="contains($element, 'block')">
@@ -12522,110 +12097,105 @@
12522
12097
  text line 2
12523
12098
  -->
12524
12099
  <xsl:template match="*[local-name() = 'example']" name="example">
12100
+ <xsl:call-template name="setNamedDestination"/>
12101
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
12525
12102
 
12526
- <xsl:call-template name="setNamedDestination"/>
12527
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
12528
-
12529
- <xsl:call-template name="setBlockSpanAll"/>
12530
-
12531
- <xsl:call-template name="refine_example-style"/>
12532
-
12533
- <xsl:variable name="fo_element">
12534
- <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
12535
- block
12536
- </xsl:variable>
12537
-
12538
- <fo:block-container margin-left="0mm" role="SKIP">
12539
-
12540
- <xsl:choose>
12103
+ <xsl:call-template name="setBlockSpanAll"/>
12541
12104
 
12542
- <xsl:when test="contains(normalize-space($fo_element), 'block')">
12105
+ <xsl:call-template name="refine_example-style"/>
12543
12106
 
12544
- <!-- display name 'EXAMPLE' in a separate block -->
12545
- <fo:block>
12546
- <xsl:apply-templates select="*[local-name()='name']">
12547
- <xsl:with-param name="fo_element" select="$fo_element"/>
12548
- </xsl:apply-templates>
12549
- </fo:block>
12107
+ <xsl:variable name="fo_element">
12108
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>block
12109
+ </xsl:variable>
12550
12110
 
12551
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
12552
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
12553
- <xsl:variable name="example_body">
12554
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
12555
- <xsl:with-param name="fo_element" select="$fo_element"/>
12556
- </xsl:apply-templates>
12557
- </xsl:variable>
12558
- <xsl:choose>
12559
- <xsl:when test="xalan:nodeset($example_body)/*">
12560
- <xsl:copy-of select="$example_body"/>
12561
- </xsl:when>
12562
- <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
12563
- </xsl:choose>
12564
- </fo:block-container>
12565
- </fo:block-container>
12566
- </xsl:when> <!-- end block -->
12111
+ <fo:block-container margin-left="0mm" role="SKIP">
12567
12112
 
12568
- <xsl:when test="contains(normalize-space($fo_element), 'list')">
12113
+ <xsl:choose>
12569
12114
 
12570
- <xsl:variable name="provisional_distance_between_starts_">
12571
- 7
12572
- </xsl:variable>
12573
- <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
12574
- <xsl:variable name="indent_">
12575
- 0
12576
- </xsl:variable>
12577
- <xsl:variable name="indent" select="normalize-space($indent_)"/>
12578
-
12579
- <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
12580
- <fo:list-item>
12581
- <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
12582
- <fo:block>
12583
- <xsl:apply-templates select="*[local-name()='name']">
12584
- <xsl:with-param name="fo_element">block</xsl:with-param>
12585
- </xsl:apply-templates>
12586
- </fo:block>
12587
- </fo:list-item-label>
12588
- <fo:list-item-body start-indent="body-start()">
12589
- <fo:block>
12590
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
12591
- <xsl:with-param name="fo_element" select="$fo_element"/>
12592
- </xsl:apply-templates>
12593
- </fo:block>
12594
- </fo:list-item-body>
12595
- </fo:list-item>
12596
- </fo:list-block>
12597
- </xsl:when> <!-- end list -->
12115
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
12598
12116
 
12599
- <xsl:otherwise> <!-- inline -->
12117
+ <!-- display name 'EXAMPLE' in a separate block -->
12118
+ <fo:block>
12119
+ <xsl:apply-templates select="*[local-name()='name']">
12120
+ <xsl:with-param name="fo_element" select="$fo_element"/>
12121
+ </xsl:apply-templates>
12122
+ </fo:block>
12600
12123
 
12601
- <!-- display 'EXAMPLE' and first element in the same line -->
12602
- <fo:block>
12603
- <xsl:apply-templates select="*[local-name()='name']">
12124
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
12125
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
12126
+ <xsl:variable name="example_body">
12127
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
12604
12128
  <xsl:with-param name="fo_element" select="$fo_element"/>
12605
12129
  </xsl:apply-templates>
12606
- <fo:inline>
12607
- <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
12130
+ </xsl:variable>
12131
+ <xsl:choose>
12132
+ <xsl:when test="xalan:nodeset($example_body)/*">
12133
+ <xsl:copy-of select="$example_body"/>
12134
+ </xsl:when>
12135
+ <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
12136
+ </xsl:choose>
12137
+ </fo:block-container>
12138
+ </fo:block-container>
12139
+ </xsl:when> <!-- end block -->
12140
+
12141
+ <xsl:when test="contains(normalize-space($fo_element), 'list')">
12142
+
12143
+ <xsl:variable name="provisional_distance_between_starts_">7
12144
+ </xsl:variable>
12145
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
12146
+ <xsl:variable name="indent_">0
12147
+ </xsl:variable>
12148
+ <xsl:variable name="indent" select="normalize-space($indent_)"/>
12149
+
12150
+ <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
12151
+ <fo:list-item>
12152
+ <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
12153
+ <fo:block>
12154
+ <xsl:apply-templates select="*[local-name()='name']">
12155
+ <xsl:with-param name="fo_element">block</xsl:with-param>
12156
+ </xsl:apply-templates>
12157
+ </fo:block>
12158
+ </fo:list-item-label>
12159
+ <fo:list-item-body start-indent="body-start()">
12160
+ <fo:block>
12161
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
12608
12162
  <xsl:with-param name="fo_element" select="$fo_element"/>
12609
12163
  </xsl:apply-templates>
12610
- </fo:inline>
12611
- </fo:block>
12164
+ </fo:block>
12165
+ </fo:list-item-body>
12166
+ </fo:list-item>
12167
+ </fo:list-block>
12168
+ </xsl:when> <!-- end list -->
12612
12169
 
12613
- <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
12614
- <!-- display further elements in blocks -->
12615
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
12616
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
12617
- <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
12618
- <xsl:with-param name="fo_element" select="'block'"/>
12619
- </xsl:apply-templates>
12620
- </fo:block-container>
12621
- </fo:block-container>
12622
- </xsl:if>
12623
- </xsl:otherwise> <!-- end inline -->
12170
+ <xsl:otherwise> <!-- inline -->
12624
12171
 
12625
- </xsl:choose>
12626
- </fo:block-container>
12627
- </fo:block-container>
12172
+ <!-- display 'EXAMPLE' and first element in the same line -->
12173
+ <fo:block>
12174
+ <xsl:apply-templates select="*[local-name()='name']">
12175
+ <xsl:with-param name="fo_element" select="$fo_element"/>
12176
+ </xsl:apply-templates>
12177
+ <fo:inline>
12178
+ <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
12179
+ <xsl:with-param name="fo_element" select="$fo_element"/>
12180
+ </xsl:apply-templates>
12181
+ </fo:inline>
12182
+ </fo:block>
12628
12183
 
12184
+ <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
12185
+ <!-- display further elements in blocks -->
12186
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
12187
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
12188
+ <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
12189
+ <xsl:with-param name="fo_element" select="'block'"/>
12190
+ </xsl:apply-templates>
12191
+ </fo:block-container>
12192
+ </fo:block-container>
12193
+ </xsl:if>
12194
+ </xsl:otherwise> <!-- end inline -->
12195
+
12196
+ </xsl:choose>
12197
+ </fo:block-container>
12198
+ </fo:block-container>
12629
12199
  </xsl:template>
12630
12200
 
12631
12201
  <!-- example/name -->
@@ -12640,7 +12210,6 @@
12640
12210
  </xsl:when>
12641
12211
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
12642
12212
  <fo:block xsl:use-attribute-sets="example-name-style">
12643
-
12644
12213
  <xsl:apply-templates/>
12645
12214
  </fo:block>
12646
12215
  </xsl:when>
@@ -12657,7 +12226,6 @@
12657
12226
  <!-- table/example/name, table/tfoot//example/name -->
12658
12227
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'example']/*[local-name() = 'name']">
12659
12228
  <fo:inline xsl:use-attribute-sets="example-name-style">
12660
-
12661
12229
  <xsl:apply-templates/>
12662
12230
  </fo:inline>
12663
12231
  </xsl:template>
@@ -12667,7 +12235,6 @@
12667
12235
 
12668
12236
  <xsl:variable name="num"><xsl:number/></xsl:variable>
12669
12237
  <xsl:variable name="element">
12670
-
12671
12238
  <xsl:value-of select="$fo_element"/>
12672
12239
  </xsl:variable>
12673
12240
  <xsl:choose>
@@ -12785,7 +12352,7 @@
12785
12352
  </xsl:call-template>
12786
12353
  </xsl:variable>
12787
12354
 
12788
- <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
12355
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
12789
12356
  <xsl:choose>
12790
12357
  <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>
12791
12358
  <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>
@@ -12822,7 +12389,6 @@
12822
12389
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
12823
12390
  </xsl:if>
12824
12391
  </xsl:if>
12825
-
12826
12392
  <fo:block-container margin-left="0mm" role="SKIP">
12827
12393
  <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
12828
12394
 
@@ -12905,7 +12471,6 @@
12905
12471
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
12906
12472
  <xsl:attribute name="vertical-align">super</xsl:attribute>
12907
12473
  <xsl:attribute name="font-size">80%</xsl:attribute>
12908
-
12909
12474
  </xsl:if>
12910
12475
 
12911
12476
  <xsl:call-template name="refine_eref-style"/>
@@ -12954,7 +12519,6 @@
12954
12519
  </xsl:template>
12955
12520
 
12956
12521
  <xsl:template name="refine_basic_link_style">
12957
-
12958
12522
  </xsl:template> <!-- refine_basic_link_style -->
12959
12523
 
12960
12524
  <!-- ====== -->
@@ -12971,15 +12535,13 @@
12971
12535
  </xsl:variable>
12972
12536
 
12973
12537
  <xsl:variable name="padding">
12974
-
12975
- <xsl:choose>
12976
- <xsl:when test="$depth = 5">7</xsl:when>
12977
- <xsl:when test="$depth = 4">10</xsl:when>
12978
- <xsl:when test="$depth = 3">6</xsl:when>
12979
- <xsl:when test="$depth = 2">9</xsl:when>
12980
- <xsl:otherwise>12</xsl:otherwise>
12981
- </xsl:choose>
12982
-
12538
+ <xsl:choose>
12539
+ <xsl:when test="$depth = 5">7</xsl:when>
12540
+ <xsl:when test="$depth = 4">10</xsl:when>
12541
+ <xsl:when test="$depth = 3">6</xsl:when>
12542
+ <xsl:when test="$depth = 2">9</xsl:when>
12543
+ <xsl:otherwise>12</xsl:otherwise>
12544
+ </xsl:choose>
12983
12545
  </xsl:variable>
12984
12546
 
12985
12547
  <xsl:variable name="padding-right">
@@ -12990,7 +12552,6 @@
12990
12552
  </xsl:otherwise>
12991
12553
  </xsl:choose>
12992
12554
  </xsl:variable>
12993
-
12994
12555
  <xsl:choose>
12995
12556
  <xsl:when test="$lang = 'zh'">
12996
12557
  <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -13014,7 +12575,6 @@
13014
12575
  <xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']/*[local-name() = 'tab']" priority="2"/>
13015
12576
 
13016
12577
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab">
13017
-
13018
12578
  </xsl:template>
13019
12579
 
13020
12580
  <xsl:template name="insertNonBreakSpaces">
@@ -13032,8 +12592,7 @@
13032
12592
  <xsl:variable name="level">
13033
12593
  <xsl:call-template name="getLevel"/>
13034
12594
  </xsl:variable>
13035
- <xsl:variable name="font-size">
13036
- inherit
12595
+ <xsl:variable name="font-size">inherit
13037
12596
  </xsl:variable>
13038
12597
  <xsl:variable name="levelTerm">
13039
12598
  <xsl:call-template name="getLevelTermName"/>
@@ -13085,11 +12644,9 @@
13085
12644
  </xsl:template>
13086
12645
 
13087
12646
  <xsl:template name="setStyle_preferred">
13088
-
13089
- <xsl:if test="*[local-name() = 'strong']">
13090
- <xsl:attribute name="font-weight">normal</xsl:attribute>
13091
- </xsl:if>
13092
-
12647
+ <xsl:if test="*[local-name() = 'strong']">
12648
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
12649
+ </xsl:if>
13093
12650
  </xsl:template>
13094
12651
 
13095
12652
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
@@ -13166,7 +12723,6 @@
13166
12723
 
13167
12724
  <!-- main sections -->
13168
12725
  <xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
13169
-
13170
12726
  <xsl:call-template name="setNamedDestination"/>
13171
12727
  <fo:block>
13172
12728
  <xsl:call-template name="setId"/>
@@ -13201,20 +12757,16 @@
13201
12757
  </xsl:template>
13202
12758
 
13203
12759
  <xsl:template name="sections_element_style">
13204
-
13205
- <xsl:if test="*[1][@class='supertitle']">
13206
- <xsl:attribute name="space-before">36pt</xsl:attribute>
13207
- </xsl:if>
13208
- <xsl:if test="@inline-header='true'">
13209
- <xsl:attribute name="text-align">justify</xsl:attribute>
13210
- </xsl:if>
13211
-
12760
+ <xsl:if test="*[1][@class='supertitle']">
12761
+ <xsl:attribute name="space-before">36pt</xsl:attribute>
12762
+ </xsl:if>
12763
+ <xsl:if test="@inline-header='true'">
12764
+ <xsl:attribute name="text-align">justify</xsl:attribute>
12765
+ </xsl:if>
13212
12766
  </xsl:template> <!-- sections_element_style -->
13213
12767
 
13214
12768
  <xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
13215
-
13216
- <fo:block break-after="page"/>
13217
-
12769
+ <fo:block break-after="page"/>
13218
12770
  <xsl:call-template name="setNamedDestination"/>
13219
12771
  <fo:block>
13220
12772
  <xsl:call-template name="setId"/>
@@ -13263,11 +12815,9 @@
13263
12815
  </xsl:template>
13264
12816
 
13265
12817
  <xsl:template name="refine_clause_style">
13266
-
13267
- <xsl:if test="@inline-header='true'">
13268
- <xsl:attribute name="text-align">justify</xsl:attribute>
13269
- </xsl:if>
13270
-
12818
+ <xsl:if test="@inline-header='true'">
12819
+ <xsl:attribute name="text-align">justify</xsl:attribute>
12820
+ </xsl:if>
13271
12821
  </xsl:template> <!-- refine_clause_style -->
13272
12822
 
13273
12823
  <xsl:template match="*[local-name() = 'definitions']">
@@ -13307,7 +12857,6 @@
13307
12857
  </xsl:template>
13308
12858
 
13309
12859
  <xsl:template name="refine_annex_style">
13310
-
13311
12860
  </xsl:template>
13312
12861
 
13313
12862
  <!-- document text (not figures, or tables) footnotes -->
@@ -13411,17 +12960,14 @@
13411
12960
  <!-- Lists processing -->
13412
12961
  <!-- ===================================== -->
13413
12962
  <xsl:variable name="ul_labels_">
13414
-
13415
- <label level="1">–</label>
13416
- <label level="2">•</label>
13417
- <label level="3" font-size="75%">o</label> <!-- white circle -->
13418
-
12963
+ <label level="1">–</label>
12964
+ <label level="2">•</label>
12965
+ <label level="3" font-size="75%">o</label> <!-- white circle -->
13419
12966
  </xsl:variable>
13420
12967
  <xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
13421
12968
 
13422
12969
  <xsl:template name="setULLabel">
13423
- <xsl:variable name="list_level__">
13424
- <xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
12970
+ <xsl:variable name="list_level__"><xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
13425
12971
  </xsl:variable>
13426
12972
  <xsl:variable name="list_level_" select="number($list_level__)"/>
13427
12973
  <xsl:variable name="list_level">
@@ -13478,28 +13024,22 @@
13478
13024
  <xsl:variable name="label">
13479
13025
 
13480
13026
  <xsl:variable name="style_prefix_">
13481
- <xsl:if test="$type = 'roman'">
13482
- <!-- Example: (i) -->
13027
+ <xsl:if test="$type = 'roman'"> <!-- Example: (i) -->
13483
13028
  </xsl:if>
13484
13029
  <xsl:if test="$type = 'alphabet'">
13485
-
13486
13030
  </xsl:if>
13487
13031
  </xsl:variable>
13488
13032
  <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
13489
13033
 
13490
13034
  <xsl:variable name="style_suffix_">
13491
13035
  <xsl:choose>
13492
- <xsl:when test="$type = 'arabic'">
13493
- )
13036
+ <xsl:when test="$type = 'arabic'">)
13494
13037
  </xsl:when>
13495
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
13496
- )
13038
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">)
13497
13039
  </xsl:when>
13498
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
13499
- .
13040
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">.
13500
13041
  </xsl:when>
13501
- <xsl:when test="$type = 'roman'">
13502
- )
13042
+ <xsl:when test="$type = 'roman'">)
13503
13043
  </xsl:when>
13504
13044
  <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
13505
13045
  </xsl:choose>
@@ -13516,8 +13056,7 @@
13516
13056
  <xsl:value-of select="$style_suffix"/>
13517
13057
  </xsl:if>
13518
13058
  </xsl:variable>
13519
-
13520
- <xsl:value-of select="normalize-space($label)"/>
13059
+ <xsl:value-of select="normalize-space($label)"/>
13521
13060
 
13522
13061
  </xsl:when>
13523
13062
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
@@ -13574,17 +13113,13 @@
13574
13113
 
13575
13114
  <xsl:variable name="format">
13576
13115
  <xsl:choose>
13577
- <xsl:when test="$type = 'arabic'">
13578
- 1)
13116
+ <xsl:when test="$type = 'arabic'">1)
13579
13117
  </xsl:when>
13580
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
13581
- a)
13118
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">a)
13582
13119
  </xsl:when>
13583
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
13584
- A.
13120
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">A.
13585
13121
  </xsl:when>
13586
- <xsl:when test="$type = 'roman'">
13587
- i)
13122
+ <xsl:when test="$type = 'roman'">i)
13588
13123
  </xsl:when>
13589
13124
  <xsl:when test="$type = 'roman_upper'">I.</xsl:when>
13590
13125
  <xsl:otherwise>1.</xsl:otherwise> <!-- for any case, if $type has non-determined value, not using -->
@@ -13621,19 +13156,16 @@
13621
13156
  </fo:block-container>
13622
13157
  </xsl:when>
13623
13158
  <xsl:otherwise>
13624
-
13625
- <fo:block role="SKIP">
13626
- <xsl:apply-templates select="." mode="list">
13627
- <xsl:with-param name="indent" select="$indent"/>
13628
- </xsl:apply-templates>
13629
- </fo:block>
13630
-
13159
+ <fo:block role="SKIP">
13160
+ <xsl:apply-templates select="." mode="list">
13161
+ <xsl:with-param name="indent" select="$indent"/>
13162
+ </xsl:apply-templates>
13163
+ </fo:block>
13631
13164
  </xsl:otherwise>
13632
13165
  </xsl:choose>
13633
13166
  </xsl:template>
13634
13167
 
13635
13168
  <xsl:template name="refine_list_container_style">
13636
-
13637
13169
  </xsl:template> <!-- refine_list_container_style -->
13638
13170
 
13639
13171
  <xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
@@ -13697,7 +13229,6 @@
13697
13229
  </xsl:template>
13698
13230
 
13699
13231
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
13700
-
13701
13232
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
13702
13233
 
13703
13234
  <xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
@@ -13982,7 +13513,6 @@
13982
13513
  <xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
13983
13514
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
13984
13515
  <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
13985
-
13986
13516
  <xsl:apply-templates/>
13987
13517
  </fo:block>
13988
13518
  </xsl:template>
@@ -14034,7 +13564,6 @@
14034
13564
  <fo:table-column column-width="15mm"/>
14035
13565
  <fo:table-body>
14036
13566
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
14037
-
14038
13567
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
14039
13568
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
14040
13569
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
@@ -14070,7 +13599,6 @@
14070
13599
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
14071
13600
  <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
14072
13601
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
14073
-
14074
13602
  </xsl:template>
14075
13603
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
14076
13604
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
@@ -14081,16 +13609,13 @@
14081
13609
  <xsl:call-template name="setNamedDestination"/>
14082
13610
  <fo:block id="{@id}">
14083
13611
  <xsl:apply-templates/>
14084
-
14085
13612
  </fo:block>
14086
13613
  </xsl:template>
14087
13614
 
14088
13615
  <!-- Bibliography (non-normative references) -->
14089
13616
  <xsl:template match="*[local-name() = 'references']">
14090
13617
  <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
14091
-
14092
- <fo:block break-after="page"/>
14093
-
13618
+ <fo:block break-after="page"/>
14094
13619
  </xsl:if>
14095
13620
 
14096
13621
  <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
@@ -14106,9 +13631,7 @@
14106
13631
 
14107
13632
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
14108
13633
  <xsl:apply-templates select="node()[not(local-name() = 'title' and @columns = 1)]"/>
14109
-
14110
13634
  </fo:block>
14111
-
14112
13635
  </xsl:template> <!-- references -->
14113
13636
 
14114
13637
  <xsl:template match="*[local-name() = 'bibitem']">
@@ -14118,32 +13641,30 @@
14118
13641
  <!-- Normative references -->
14119
13642
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
14120
13643
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
14121
-
14122
- <xsl:choose>
14123
- <xsl:when test="$skip = 'true'"><!-- skip bibitem --></xsl:when>
14124
- <xsl:otherwise>
14125
- <xsl:call-template name="setNamedDestination"/>
14126
- <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
14127
- <xsl:call-template name="processBibitem"/>
14128
- </fo:block>
14129
- </xsl:otherwise>
14130
- </xsl:choose>
13644
+ <xsl:choose>
13645
+ <xsl:when test="$skip = 'true'"><!-- skip bibitem --></xsl:when>
13646
+ <xsl:otherwise>
13647
+ <xsl:call-template name="setNamedDestination"/>
13648
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
13649
+ <xsl:call-template name="processBibitem"/>
13650
+ </fo:block>
13651
+ </xsl:otherwise>
13652
+ </xsl:choose>
14131
13653
 
14132
13654
  </xsl:template> <!-- bibitem -->
14133
13655
 
14134
13656
  <!-- Bibliography (non-normative references) -->
14135
13657
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
14136
13658
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
14137
-
14138
- <xsl:choose>
14139
- <xsl:when test="$skip = 'true'"><!-- skip bibitem --></xsl:when>
14140
- <xsl:otherwise>
14141
- <xsl:call-template name="setNamedDestination"/>
14142
- <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
14143
- <xsl:call-template name="processBibitem"/>
14144
- </fo:block>
14145
- </xsl:otherwise>
14146
- </xsl:choose>
13659
+ <xsl:choose>
13660
+ <xsl:when test="$skip = 'true'"><!-- skip bibitem --></xsl:when>
13661
+ <xsl:otherwise>
13662
+ <xsl:call-template name="setNamedDestination"/>
13663
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
13664
+ <xsl:call-template name="processBibitem"/>
13665
+ </fo:block>
13666
+ </xsl:otherwise>
13667
+ </xsl:choose>
14147
13668
 
14148
13669
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
14149
13670
 
@@ -14153,7 +13674,6 @@
14153
13674
  <xsl:otherwise>
14154
13675
  <xsl:call-template name="setNamedDestination"/>
14155
13676
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
14156
-
14157
13677
  <fo:list-item-label end-indent="label-end()">
14158
13678
  <fo:block role="SKIP">
14159
13679
  <fo:inline role="SKIP">
@@ -14180,67 +13700,66 @@
14180
13700
 
14181
13701
  <xsl:template name="processBibitem">
14182
13702
  <xsl:param name="biblio_tag_part">both</xsl:param>
13703
+ <!-- start ITU bibitem processing -->
13704
+ <!-- Example: [ITU-T A.23] ITU-T A.23, Recommendation ITU-T A.23, Annex A (2014), Guide for ITU-T and ISO/IEC JTC 1 cooperation. -->
13705
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
13706
+ <xsl:if test="$doctype = 'implementers-guide'">
13707
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
13708
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
13709
+ </xsl:if>
14183
13710
 
14184
- <!-- start ITU bibitem processing -->
14185
- <!-- Example: [ITU-T A.23] ITU-T A.23, Recommendation ITU-T A.23, Annex A (2014), Guide for ITU-T and ISO/IEC JTC 1 cooperation. -->
14186
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
14187
- <xsl:if test="$doctype = 'implementers-guide'">
14188
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
14189
- <xsl:attribute name="text-indent">0mm</xsl:attribute>
14190
- </xsl:if>
14191
-
14192
- <xsl:variable name="docidentifier_metanorma_ordinal" select="normalize-space(itu:docidentifier[@type = 'metanorma-ordinal'])"/>
13711
+ <xsl:variable name="docidentifier_metanorma_ordinal" select="normalize-space(itu:docidentifier[@type = 'metanorma-ordinal'])"/>
14193
13712
 
14194
- <xsl:variable name="bibitem_label">
14195
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
14196
- <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
14197
- </xsl:apply-templates>
14198
- </xsl:variable>
13713
+ <xsl:variable name="bibitem_label">
13714
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
13715
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
13716
+ </xsl:apply-templates>
13717
+ </xsl:variable>
14199
13718
 
14200
- <xsl:variable name="bibitem_body">
14201
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
14202
- <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
14203
- </xsl:apply-templates>
14204
- <xsl:apply-templates select="itu:formattedref"/>
14205
- </xsl:variable>
13719
+ <xsl:variable name="bibitem_body">
13720
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
13721
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
13722
+ </xsl:apply-templates>
13723
+ <xsl:apply-templates select="itu:formattedref"/>
13724
+ </xsl:variable>
14206
13725
 
14207
- <xsl:choose>
14208
- <xsl:when test="$doctype = 'implementers-guide'">
14209
- <fo:table width="100%" table-layout="fixed">
14210
- <fo:table-column column-width="20%"/>
14211
- <fo:table-column column-width="80%"/>
14212
- <fo:table-body>
14213
- <fo:table-row>
14214
- <fo:table-cell><fo:block role="SKIP"><xsl:value-of select="$bibitem_label"/></fo:block></fo:table-cell>
14215
- <fo:table-cell><fo:block role="SKIP"><xsl:copy-of select="$bibitem_body"/></fo:block></fo:table-cell>
14216
- </fo:table-row>
14217
- </fo:table-body>
14218
- </fo:table>
14219
- </xsl:when> <!-- $doctype = 'implementers-guide' -->
14220
- <xsl:when test="$bibitem_label != $docidentifier_metanorma_ordinal">
14221
- <xsl:attribute name="margin-left">14mm</xsl:attribute>
14222
- <xsl:attribute name="text-indent">-14mm</xsl:attribute>
14223
- <xsl:copy-of select="$bibitem_label"/>
14224
- <xsl:copy-of select="$bibitem_body"/>
14225
- </xsl:when>
14226
- <xsl:otherwise>
14227
- <fo:list-block provisional-distance-between-starts="14mm">
14228
- <fo:list-item>
14229
- <fo:list-item-label end-indent="label-end()">
14230
- <fo:block>
14231
- <xsl:value-of select="$bibitem_label"/>
14232
- </fo:block>
14233
- </fo:list-item-label>
14234
- <fo:list-item-body start-indent="body-start()">
14235
- <fo:block>
14236
- <xsl:copy-of select="$bibitem_body"/>
14237
- </fo:block>
14238
- </fo:list-item-body>
14239
- </fo:list-item>
14240
- </fo:list-block>
14241
- </xsl:otherwise>
14242
- </xsl:choose>
14243
- <!-- end ITU bibitem processing -->
13726
+ <xsl:choose>
13727
+ <xsl:when test="$doctype = 'implementers-guide'">
13728
+ <fo:table width="100%" table-layout="fixed">
13729
+ <fo:table-column column-width="20%"/>
13730
+ <fo:table-column column-width="80%"/>
13731
+ <fo:table-body>
13732
+ <fo:table-row>
13733
+ <fo:table-cell><fo:block role="SKIP"><xsl:value-of select="$bibitem_label"/></fo:block></fo:table-cell>
13734
+ <fo:table-cell><fo:block role="SKIP"><xsl:copy-of select="$bibitem_body"/></fo:block></fo:table-cell>
13735
+ </fo:table-row>
13736
+ </fo:table-body>
13737
+ </fo:table>
13738
+ </xsl:when> <!-- $doctype = 'implementers-guide' -->
13739
+ <xsl:when test="$bibitem_label != $docidentifier_metanorma_ordinal">
13740
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
13741
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
13742
+ <xsl:copy-of select="$bibitem_label"/>
13743
+ <xsl:copy-of select="$bibitem_body"/>
13744
+ </xsl:when>
13745
+ <xsl:otherwise>
13746
+ <fo:list-block provisional-distance-between-starts="14mm">
13747
+ <fo:list-item>
13748
+ <fo:list-item-label end-indent="label-end()">
13749
+ <fo:block>
13750
+ <xsl:value-of select="$bibitem_label"/>
13751
+ </fo:block>
13752
+ </fo:list-item-label>
13753
+ <fo:list-item-body start-indent="body-start()">
13754
+ <fo:block>
13755
+ <xsl:copy-of select="$bibitem_body"/>
13756
+ </fo:block>
13757
+ </fo:list-item-body>
13758
+ </fo:list-item>
13759
+ </fo:list-block>
13760
+ </xsl:otherwise>
13761
+ </xsl:choose>
13762
+ <!-- end ITU bibitem processing -->
14244
13763
 
14245
13764
  </xsl:template> <!-- processBibitem (bibitem) -->
14246
13765
 
@@ -14384,8 +13903,7 @@
14384
13903
  <xsl:choose>
14385
13904
  <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
14386
13905
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
14387
- <xsl:otherwise><!-- default value -->
14388
- 2
13906
+ <xsl:otherwise><!-- default value -->2
14389
13907
  </xsl:otherwise>
14390
13908
  </xsl:choose>
14391
13909
  </xsl:variable>
@@ -14593,27 +14111,21 @@
14593
14111
  <!-- ================ -->
14594
14112
  <!-- Admonition -->
14595
14113
  <!-- ================ -->
14596
- <xsl:template match="*[local-name() = 'admonition']">
14597
-
14598
- <!-- text in the box -->
14599
- <xsl:call-template name="setNamedDestination"/>
14600
- <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
14601
-
14602
- <xsl:call-template name="setBlockSpanAll"/>
14603
-
14604
- <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
14605
-
14606
- <fo:block xsl:use-attribute-sets="admonition-name-style">
14607
- <xsl:call-template name="displayAdmonitionName"/>
14608
- </fo:block>
14609
- <fo:block xsl:use-attribute-sets="admonition-p-style">
14610
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
14611
- </fo:block>
14612
-
14613
- </fo:block-container>
14114
+ <xsl:template match="*[local-name() = 'admonition']"> <!-- text in the box -->
14115
+ <xsl:call-template name="setNamedDestination"/>
14116
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
14614
14117
 
14615
- </fo:block-container>
14118
+ <xsl:call-template name="setBlockSpanAll"/>
14119
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
14120
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
14121
+ <xsl:call-template name="displayAdmonitionName"/>
14122
+ </fo:block>
14123
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
14124
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
14125
+ </fo:block>
14616
14126
 
14127
+ </fo:block-container>
14128
+ </fo:block-container>
14617
14129
  </xsl:template>
14618
14130
 
14619
14131
  <xsl:template name="displayAdmonitionName">
@@ -14661,12 +14173,10 @@
14661
14173
  </xsl:template> -->
14662
14174
 
14663
14175
  <xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
14176
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
14664
14177
 
14665
- <fo:block xsl:use-attribute-sets="admonition-p-style">
14666
-
14667
- <xsl:apply-templates/>
14668
- </fo:block>
14669
-
14178
+ <xsl:apply-templates/>
14179
+ </fo:block>
14670
14180
  </xsl:template>
14671
14181
 
14672
14182
  <!-- ================ -->
@@ -14702,11 +14212,9 @@
14702
14212
 
14703
14213
  <!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
14704
14214
  <xsl:variable name="updated_xml_step2">
14705
-
14706
- <xsl:if test="$table_if = 'false'">
14707
- <xsl:copy-of select="$updated_xml_step1"/>
14708
- </xsl:if>
14709
-
14215
+ <xsl:if test="$table_if = 'false'">
14216
+ <xsl:copy-of select="$updated_xml_step1"/>
14217
+ </xsl:if>
14710
14218
  </xsl:variable>
14711
14219
 
14712
14220
  <xsl:variable name="endTime2" select="java:getTime(java:java.util.Date.new())"/>
@@ -15181,7 +14689,6 @@
15181
14689
  </xsl:template>
15182
14690
 
15183
14691
  <xsl:template name="addNamedDestinationAttribute">
15184
-
15185
14692
  </xsl:template>
15186
14693
 
15187
14694
  <xsl:template match="*[local-name() = 'fmt-name']"/>
@@ -15676,7 +15183,6 @@
15676
15183
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
15677
15184
  <xsl:if test="not(ancestor::*[local-name() = 'table'])"><regex><xsl:value-of select="$regex_standard_reference"/></regex></xsl:if>
15678
15185
  <!-- if EXPRESS reference -->
15679
-
15680
15186
  <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
15681
15187
  <regex><xsl:value-of select="$regex_solidus_units"/></regex>
15682
15188
  <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
@@ -15730,8 +15236,7 @@
15730
15236
 
15731
15237
  <xsl:variable name="text2">
15732
15238
  <xsl:element name="text" namespace="{$namespace_full}">
15733
- <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()">
15734
- <xsl:copy-of select="."/>
15239
+ <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()"><xsl:copy-of select="."/>
15735
15240
  </xsl:for-each>
15736
15241
  </xsl:element>
15737
15242
  </xsl:variable>
@@ -16023,9 +15528,7 @@
16023
15528
  </xsl:attribute>
16024
15529
  <xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
16025
15530
  <xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
16026
-
16027
- <xsl:value-of select="$skip_footnote_body_"/>
16028
-
15531
+ <xsl:value-of select="$skip_footnote_body_"/>
16029
15532
  </xsl:attribute>
16030
15533
  <xsl:attribute name="ref_id">
16031
15534
  <xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
@@ -16114,7 +15617,6 @@
16114
15617
 
16115
15618
  <xsl:template name="printEdition">
16116
15619
  <xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
16117
-
16118
15620
  <xsl:choose>
16119
15621
  <xsl:when test="$edition_i18n != ''">
16120
15622
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -16343,8 +15845,7 @@
16343
15845
  <dc:title>
16344
15846
  <xsl:variable name="title">
16345
15847
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
16346
-
16347
- <xsl:value-of select="*[local-name() = 'title'][@type='main']"/>
15848
+ <xsl:value-of select="*[local-name() = 'title'][@type='main']"/>
16348
15849
 
16349
15850
  </xsl:for-each>
16350
15851
  </xsl:variable>
@@ -16363,16 +15864,14 @@
16363
15864
  </dc:title>
16364
15865
  <xsl:variable name="dc_creator">
16365
15866
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
16366
-
16367
- <rdf:Seq>
16368
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
16369
- <rdf:li>
16370
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
16371
- </rdf:li>
16372
- <!-- <xsl:if test="position() != last()">; </xsl:if> -->
16373
- </xsl:for-each>
16374
- </rdf:Seq>
16375
-
15867
+ <rdf:Seq>
15868
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role'][not(*[local-name() = 'description'])]/@type='author']">
15869
+ <rdf:li>
15870
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
15871
+ </rdf:li>
15872
+ <!-- <xsl:if test="position() != last()">; </xsl:if> -->
15873
+ </xsl:for-each>
15874
+ </rdf:Seq>
16376
15875
  </xsl:for-each>
16377
15876
  </xsl:variable>
16378
15877
  <xsl:if test="normalize-space($dc_creator) != ''">
@@ -16383,9 +15882,7 @@
16383
15882
 
16384
15883
  <xsl:variable name="dc_description">
16385
15884
  <xsl:variable name="abstract">
16386
-
16387
- <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'])]"/>
16388
-
15885
+ <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'])]"/>
16389
15886
  </xsl:variable>
16390
15887
  <rdf:Alt>
16391
15888
  <rdf:li xml:lang="x-default">
@@ -16450,7 +15947,9 @@
16450
15947
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
16451
15948
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
16452
15949
  <xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
16453
- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
15950
+ <!-- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/> -->
15951
+ <!-- See https://github.com/metanorma/metanorma-iso/issues/1369 -->
15952
+ <xsl:variable name="url" select="concat('url(file:///',$outputpdf_basepath, $attachment_path, ')')"/>
16454
15953
  <xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
16455
15954
  <!-- Todo: need update -->
16456
15955
  <xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
@@ -16615,7 +16114,7 @@
16615
16114
  <xsl:param name="normalize-space" select="'true'"/>
16616
16115
  <xsl:param name="keep_sep" select="'false'"/>
16617
16116
  <xsl:if test="string-length($pText) &gt;0">
16618
- <item>
16117
+ <xsl:element name="item" namespace="{$namespace_mn_xsl}">
16619
16118
  <xsl:choose>
16620
16119
  <xsl:when test="$normalize-space = 'true'">
16621
16120
  <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
@@ -16624,8 +16123,8 @@
16624
16123
  <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
16625
16124
  </xsl:otherwise>
16626
16125
  </xsl:choose>
16627
- </item>
16628
- <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><item><xsl:value-of select="$sep"/></item></xsl:if>
16126
+ </xsl:element>
16127
+ <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>
16629
16128
  <xsl:call-template name="split">
16630
16129
  <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
16631
16130
  <xsl:with-param name="sep" select="$sep"/>
@@ -16643,30 +16142,6 @@
16643
16142
  <xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
16644
16143
  </xsl:template>
16645
16144
 
16646
- <xsl:template name="namespaceCheck">
16647
- <xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
16648
- <xsl:variable name="XSLNS">
16649
-
16650
- <xsl:value-of select="document('')//*/namespace::itu"/>
16651
-
16652
- </xsl:variable>
16653
- <!-- <xsl:if test="$documentNS != $XSLNS">
16654
- <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
16655
- </xsl:if> -->
16656
- </xsl:template> <!-- namespaceCheck -->
16657
-
16658
- <xsl:template name="getLanguage">
16659
- <xsl:param name="lang"/>
16660
- <xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
16661
- <xsl:choose>
16662
- <xsl:when test="$language = 'en'">English</xsl:when>
16663
- <xsl:when test="$language = 'fr'">French</xsl:when>
16664
- <xsl:when test="$language = 'de'">Deutsch</xsl:when>
16665
- <xsl:when test="$language = 'cn'">Chinese</xsl:when>
16666
- <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
16667
- </xsl:choose>
16668
- </xsl:template>
16669
-
16670
16145
  <xsl:template name="setId">
16671
16146
  <xsl:param name="prefix"/>
16672
16147
  <xsl:attribute name="id">