metanorma-cc 2.2.11 → 2.2.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 872a1d9965f6a5312d7375e49ea03f5cf480aa337392eaf12626c495c146f01b
4
- data.tar.gz: 67663ad1c97c863409a14e56dbee9c526c852d18be6e2af3d363c9d2b4d1c096
3
+ metadata.gz: 63bb488a52b4284eb51a916987018db4c9269604d866f60b5cd94ab51b9ae71f
4
+ data.tar.gz: d43eb8bfdd5ab07c1e1d461ecddfb09d4f3bf2b4d3bf97b47fdd23812aad9948
5
5
  SHA512:
6
- metadata.gz: 5ce18902310592223ad4aa64d339150346519006195f012a72768b945d2720d1aa5cc7c279a3c96544b8bcb6990f0ee2bef913837a6d5af5f296d1a097132fad
7
- data.tar.gz: 19572e0687509a712ddaea13eea747c54f00923c0a333a6f76c994770bee2efff495d1ee6aa3aceb8ab5f9a4608f9add892a94eb24f4943ab148e250b1c667a3
6
+ metadata.gz: 91ede49e29a574b32e39b1666bacc4b8135b5d465572f49e43c48f9f86d714c90d5b76ad568d182bae63c48490eb453d48e4a33059b57ed0e90a69062a709dae
7
+ data.tar.gz: b12b1abcd5bd61a562733f0f716172d21053ed3e4a6075900aa418e18ee2cc29116e58f0e7c105e5ca6113e9ab0f14ac3a9238092af8e80e17797c330635c4da
@@ -1507,6 +1507,7 @@
1507
1507
  </xsl:attribute-set>
1508
1508
 
1509
1509
  <xsl:attribute-set name="figure-block-style">
1510
+ <xsl:attribute name="role">SKIP</xsl:attribute>
1510
1511
 
1511
1512
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1512
1513
 
@@ -1517,6 +1518,7 @@
1517
1518
  </xsl:attribute-set>
1518
1519
 
1519
1520
  <xsl:attribute-set name="figure-name-style">
1521
+ <xsl:attribute name="role">Caption</xsl:attribute>
1520
1522
 
1521
1523
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1522
1524
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -1564,6 +1566,7 @@
1564
1566
  </xsl:template>
1565
1567
 
1566
1568
  <xsl:attribute-set name="image-style">
1569
+ <xsl:attribute name="role">SKIP</xsl:attribute>
1567
1570
  <xsl:attribute name="text-align">center</xsl:attribute>
1568
1571
 
1569
1572
  </xsl:attribute-set>
@@ -1821,6 +1824,11 @@
1821
1824
 
1822
1825
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
1823
1826
 
1827
+ <xsl:attribute-set name="bibitem-non-normative-list-item-style">
1828
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1829
+
1830
+ </xsl:attribute-set>
1831
+
1824
1832
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
1825
1833
  <xsl:attribute-set name="bibitem-normative-list-body-style">
1826
1834
 
@@ -2212,14 +2220,14 @@
2212
2220
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
2213
2221
  </xsl:when>
2214
2222
  <xsl:otherwise>
2215
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
2223
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
2216
2224
  </xsl:otherwise>
2217
2225
  </xsl:choose>
2218
2226
  </xsl:for-each>
2219
2227
  </xsl:when>
2220
2228
 
2221
2229
  <xsl:otherwise>
2222
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
2230
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
2223
2231
  </xsl:otherwise>
2224
2232
 
2225
2233
  </xsl:choose>
@@ -2229,7 +2237,7 @@
2229
2237
  <!-- Preface boilerplate sections processing -->
2230
2238
  <!-- ================================= -->
2231
2239
  <xsl:template match="*[local-name()='copyright-statement']">
2232
- <fo:block xsl:use-attribute-sets="copyright-statement-style">
2240
+ <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
2233
2241
  <xsl:apply-templates/>
2234
2242
  </fo:block>
2235
2243
  </xsl:template> <!-- copyright-statement -->
@@ -2399,7 +2407,7 @@
2399
2407
  </xsl:choose>
2400
2408
  </xsl:variable>
2401
2409
 
2402
- <fo:block-container xsl:use-attribute-sets="table-container-style">
2410
+ <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
2403
2411
 
2404
2412
  <xsl:call-template name="refine_table-container-style">
2405
2413
  <xsl:with-param name="margin-side" select="$margin-side"/>
@@ -3432,7 +3440,7 @@
3432
3440
  </xsl:choose>
3433
3441
  </xsl:variable>
3434
3442
  <xsl:variable name="footnote_inline">
3435
- <fo:inline>
3443
+ <fo:inline role="Reference">
3436
3444
 
3437
3445
  <xsl:variable name="fn_styles">
3438
3446
  <xsl:choose>
@@ -3455,7 +3463,7 @@
3455
3463
 
3456
3464
  <xsl:call-template name="insert_basic_link">
3457
3465
  <xsl:with-param name="element">
3458
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
3466
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
3459
3467
  <xsl:copy-of select="$current_fn_number_text"/>
3460
3468
  </fo:basic-link>
3461
3469
  </xsl:with-param>
@@ -3468,17 +3476,17 @@
3468
3476
  <xsl:copy-of select="$footnote_inline"/>
3469
3477
  </xsl:when>
3470
3478
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
3471
- <fo:footnote xsl:use-attribute-sets="fn-style">
3479
+ <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
3472
3480
  <xsl:copy-of select="$footnote_inline"/>
3473
- <fo:footnote-body>
3481
+ <fo:footnote-body role="Note">
3474
3482
 
3475
- <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
3483
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
3476
3484
 
3477
- <fo:block xsl:use-attribute-sets="fn-body-style">
3485
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
3478
3486
 
3479
3487
  <xsl:call-template name="refine_fn-body-style"/>
3480
3488
 
3481
- <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
3489
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
3482
3490
 
3483
3491
  <xsl:call-template name="refine_fn-body-num-style"/>
3484
3492
 
@@ -3740,11 +3748,11 @@
3740
3748
  </xsl:template>
3741
3749
 
3742
3750
  <xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
3743
- <fo:inline><xsl:value-of select="."/></fo:inline>
3751
+ <fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
3744
3752
  </xsl:template>
3745
3753
 
3746
3754
  <xsl:template match="*[local-name()='fn']//*[local-name()='p']">
3747
- <fo:inline>
3755
+ <fo:inline role="P">
3748
3756
  <xsl:apply-templates/>
3749
3757
  </fo:inline>
3750
3758
  </xsl:template>
@@ -3759,7 +3767,7 @@
3759
3767
  <xsl:variable name="isAdded" select="@added"/>
3760
3768
  <xsl:variable name="isDeleted" select="@deleted"/>
3761
3769
  <!-- <dl><xsl:copy-of select="."/></dl> -->
3762
- <fo:block-container xsl:use-attribute-sets="dl-block-style">
3770
+ <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
3763
3771
 
3764
3772
  <xsl:call-template name="setBlockSpanAll"/>
3765
3773
 
@@ -3794,7 +3802,7 @@
3794
3802
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3795
3803
  </xsl:call-template>
3796
3804
 
3797
- <fo:block-container margin-left="0mm">
3805
+ <fo:block-container margin-left="0mm" role="SKIP">
3798
3806
 
3799
3807
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
3800
3808
 
@@ -3859,7 +3867,7 @@
3859
3867
 
3860
3868
  <!-- a few components -->
3861
3869
  <xsl:if test="$onlyOneComponent = 'false'">
3862
- <fo:block>
3870
+ <fo:block role="SKIP">
3863
3871
 
3864
3872
  <xsl:call-template name="refine_multicomponent_style"/>
3865
3873
 
@@ -3867,7 +3875,7 @@
3867
3875
  <xsl:attribute name="margin-top">0</xsl:attribute>
3868
3876
  </xsl:if>
3869
3877
 
3870
- <fo:block>
3878
+ <fo:block role="SKIP">
3871
3879
 
3872
3880
  <xsl:call-template name="refine_multicomponent_block_style"/>
3873
3881
 
@@ -4462,6 +4470,9 @@
4462
4470
 
4463
4471
  <xsl:template name="refine_strong_style">
4464
4472
 
4473
+ <xsl:if test="ancestor::*['preferred']">
4474
+ <xsl:attribute name="role">SKIP</xsl:attribute>
4475
+ </xsl:if>
4465
4476
  </xsl:template>
4466
4477
 
4467
4478
  <xsl:template match="*[local-name()='padding']">
@@ -5396,6 +5407,18 @@
5396
5407
  </xsl:copy>
5397
5408
  </xsl:template>
5398
5409
 
5410
+ <xsl:variable name="font_main_root_style">
5411
+ <root-style xsl:use-attribute-sets="root-style">
5412
+ </root-style>
5413
+ </xsl:variable>
5414
+ <xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
5415
+ <xsl:variable name="font_main">
5416
+ <xsl:choose>
5417
+ <xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
5418
+ <xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
5419
+ </xsl:choose>
5420
+ </xsl:variable>
5421
+
5399
5422
  <xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
5400
5423
  <xsl:param name="id"/>
5401
5424
  <xsl:copy>
@@ -5434,6 +5457,33 @@
5434
5457
 
5435
5458
  <!-- td_text='<xsl:copy-of select="$td_text"/>' -->
5436
5459
 
5460
+ <xsl:variable name="words_with_width">
5461
+ <!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
5462
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
5463
+ <xsl:copy>
5464
+ <xsl:copy-of select="@*"/>
5465
+ <xsl:attribute name="width">
5466
+ <xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
5467
+ </xsl:attribute>
5468
+ <xsl:copy-of select="node()"/>
5469
+ </xsl:copy>
5470
+ </xsl:for-each>
5471
+ </xsl:variable>
5472
+
5473
+ <xsl:variable name="words_with_width_sorted">
5474
+ <xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
5475
+ <xsl:sort select="@width" data-type="number" order="descending"/>
5476
+ <!-- select word maximal width only -->
5477
+ <xsl:if test="position() = 1">
5478
+ <xsl:copy-of select="."/>
5479
+ </xsl:if>
5480
+ </xsl:for-each>
5481
+ <!-- add 'word' with formatting tags inside -->
5482
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
5483
+ <xsl:copy-of select="."/>
5484
+ </xsl:for-each>
5485
+ </xsl:variable>
5486
+
5437
5487
  <xsl:variable name="words">
5438
5488
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
5439
5489
  <word>
@@ -5441,9 +5491,12 @@
5441
5491
  </word>
5442
5492
  </xsl:for-each>
5443
5493
 
5444
- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
5494
+ <xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
5445
5495
  <xsl:copy-of select="."/>
5446
5496
  </xsl:for-each>
5497
+ <!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
5498
+ <xsl:copy-of select="."/>
5499
+ </xsl:for-each> -->
5447
5500
 
5448
5501
  </xsl:variable>
5449
5502
 
@@ -5904,10 +5957,10 @@
5904
5957
  <xsl:copy>
5905
5958
  <xsl:apply-templates select="@*" mode="mathml"/>
5906
5959
  <xsl:if test="not(@lspace)">
5907
- <xsl:attribute name="lspace">0.4em</xsl:attribute>
5960
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
5908
5961
  </xsl:if>
5909
- <xsl:if test="not(@rspace)">
5910
- <xsl:attribute name="rspace">0.4em</xsl:attribute>
5962
+ <xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
5963
+ <xsl:attribute name="rspace">0.2em</xsl:attribute>
5911
5964
  </xsl:if>
5912
5965
  <xsl:apply-templates mode="mathml"/>
5913
5966
  </xsl:copy>
@@ -5924,6 +5977,27 @@
5924
5977
  </xsl:copy>
5925
5978
  </xsl:template>
5926
5979
 
5980
+ <!-- increase space before '(' -->
5981
+ <xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
5982
+ <xsl:copy>
5983
+ <xsl:apply-templates select="@*" mode="mathml"/>
5984
+ <xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
5985
+ <xsl:if test="not(@lspace)">
5986
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
5987
+ <xsl:choose>
5988
+ <xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
5989
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
5990
+ </xsl:when>
5991
+ <xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
5992
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
5993
+ </xsl:when>
5994
+ </xsl:choose>
5995
+ </xsl:if>
5996
+ </xsl:if>
5997
+ <xsl:apply-templates mode="mathml"/>
5998
+ </xsl:copy>
5999
+ </xsl:template>
6000
+
5927
6001
  <!-- Examples:
5928
6002
  <stem type="AsciiMath">x = 1</stem>
5929
6003
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -6083,7 +6157,7 @@
6083
6157
  <!-- formula -->
6084
6158
  <!-- ====== -->
6085
6159
  <xsl:template match="*[local-name() = 'formula']" name="formula">
6086
- <fo:block-container margin-left="0mm">
6160
+ <fo:block-container margin-left="0mm" role="SKIP">
6087
6161
  <xsl:if test="parent::*[local-name() = 'note']">
6088
6162
  <xsl:attribute name="margin-left">
6089
6163
  <xsl:choose>
@@ -6093,7 +6167,7 @@
6093
6167
  </xsl:attribute>
6094
6168
 
6095
6169
  </xsl:if>
6096
- <fo:block-container margin-left="0mm">
6170
+ <fo:block-container margin-left="0mm" role="SKIP">
6097
6171
  <fo:block id="{@id}">
6098
6172
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
6099
6173
  </fo:block>
@@ -6173,13 +6247,13 @@
6173
6247
 
6174
6248
  <xsl:template match="*[local-name() = 'note']" name="note">
6175
6249
 
6176
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
6250
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
6177
6251
 
6178
6252
  <xsl:call-template name="setBlockSpanAll"/>
6179
6253
 
6180
6254
  <xsl:call-template name="refine_note-style"/>
6181
6255
 
6182
- <fo:block-container margin-left="0mm" margin-right="0mm">
6256
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
6183
6257
 
6184
6258
  <fo:block>
6185
6259
 
@@ -6341,12 +6415,13 @@
6341
6415
 
6342
6416
  <xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
6343
6417
  <xsl:if test="normalize-space() != ''">
6344
- <xsl:variable name="level">
6418
+ <!-- <xsl:variable name="level">
6345
6419
  <xsl:call-template name="getLevelTermName"/>
6346
6420
  </xsl:variable>
6347
6421
  <fo:inline role="H{$level}">
6348
- <xsl:apply-templates/>
6349
- </fo:inline>
6422
+ <xsl:apply-templates />
6423
+ </fo:inline> -->
6424
+ <xsl:apply-templates/>
6350
6425
  </xsl:if>
6351
6426
  </xsl:template>
6352
6427
  <!-- ====== -->
@@ -6370,7 +6445,7 @@
6370
6445
  <!-- Example: Dimensions in millimeters -->
6371
6446
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
6372
6447
 
6373
- <fo:block xsl:use-attribute-sets="figure-style">
6448
+ <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
6374
6449
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
6375
6450
  </fo:block>
6376
6451
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
@@ -7506,7 +7581,7 @@
7506
7581
  </xsl:when>
7507
7582
 
7508
7583
  <xsl:otherwise>
7509
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
7584
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
7510
7585
 
7511
7586
  <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
7512
7587
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -7527,7 +7602,7 @@
7527
7602
  </xsl:attribute>
7528
7603
 
7529
7604
  </xsl:if>
7530
- <fo:block-container margin-left="0mm">
7605
+ <fo:block-container margin-left="0mm" role="SKIP">
7531
7606
 
7532
7607
  <fo:block xsl:use-attribute-sets="sourcecode-style">
7533
7608
 
@@ -8073,11 +8148,11 @@
8073
8148
  <!-- requirement, recommendation, permission table -->
8074
8149
  <!-- ========== -->
8075
8150
  <xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8076
- <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
8151
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
8077
8152
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8078
8153
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
8079
8154
  </xsl:if>
8080
- <fo:block-container margin-left="0mm" margin-right="0mm">
8155
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8081
8156
  <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
8082
8157
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8083
8158
  <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
@@ -8239,7 +8314,7 @@
8239
8314
  -->
8240
8315
  <xsl:template match="*[local-name() = 'example']">
8241
8316
 
8242
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
8317
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
8243
8318
 
8244
8319
  <xsl:call-template name="setBlockSpanAll"/>
8245
8320
 
@@ -8250,7 +8325,7 @@
8250
8325
  block
8251
8326
  </xsl:variable>
8252
8327
 
8253
- <fo:block-container margin-left="0mm">
8328
+ <fo:block-container margin-left="0mm" role="SKIP">
8254
8329
 
8255
8330
  <xsl:choose>
8256
8331
 
@@ -8263,8 +8338,8 @@
8263
8338
  </xsl:apply-templates>
8264
8339
  </fo:block>
8265
8340
 
8266
- <fo:block-container xsl:use-attribute-sets="example-body-style">
8267
- <fo:block-container margin-left="0mm" margin-right="0mm">
8341
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
8342
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8268
8343
  <xsl:apply-templates select="node()[not(local-name() = 'name')]">
8269
8344
  <xsl:with-param name="fo_element" select="$fo_element"/>
8270
8345
  </xsl:apply-templates>
@@ -8317,8 +8392,8 @@
8317
8392
 
8318
8393
  <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
8319
8394
  <!-- display further elements in blocks -->
8320
- <fo:block-container xsl:use-attribute-sets="example-body-style">
8321
- <fo:block-container margin-left="0mm" margin-right="0mm">
8395
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
8396
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8322
8397
  <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
8323
8398
  <xsl:with-param name="fo_element" select="'block'"/>
8324
8399
  </xsl:apply-templates>
@@ -8371,7 +8446,7 @@
8371
8446
  </xsl:variable>
8372
8447
  <xsl:choose>
8373
8448
  <xsl:when test="starts-with(normalize-space($element), 'block')">
8374
- <fo:block-container>
8449
+ <fo:block-container role="SKIP">
8375
8450
  <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
8376
8451
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
8377
8452
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -8512,7 +8587,7 @@
8512
8587
  <!-- author -->
8513
8588
  <!-- ====== -->
8514
8589
  <xsl:template match="*[local-name() = 'quote']">
8515
- <fo:block-container margin-left="0mm">
8590
+ <fo:block-container margin-left="0mm" role="SKIP">
8516
8591
 
8517
8592
  <xsl:call-template name="setBlockSpanAll"/>
8518
8593
 
@@ -8522,12 +8597,12 @@
8522
8597
  </xsl:if>
8523
8598
  </xsl:if>
8524
8599
 
8525
- <fo:block-container margin-left="0mm">
8526
- <fo:block-container xsl:use-attribute-sets="quote-style">
8600
+ <fo:block-container margin-left="0mm" role="SKIP">
8601
+ <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
8527
8602
 
8528
8603
  <xsl:call-template name="refine_quote-style"/>
8529
8604
 
8530
- <fo:block-container margin-left="0mm" margin-right="0mm">
8605
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8531
8606
  <fo:block role="BlockQuote">
8532
8607
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
8533
8608
  </fo:block>
@@ -8687,10 +8762,10 @@
8687
8762
 
8688
8763
  <xsl:choose>
8689
8764
  <xsl:when test="$lang = 'zh'">
8690
- <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
8765
+ <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
8691
8766
  </xsl:when>
8692
8767
  <xsl:when test="../../@inline-header = 'true'">
8693
- <fo:inline font-size="90%">
8768
+ <fo:inline font-size="90%" role="SKIP">
8694
8769
  <xsl:call-template name="insertNonBreakSpaces">
8695
8770
  <xsl:with-param name="count" select="$padding-right"/>
8696
8771
  </xsl:call-template>
@@ -8698,7 +8773,7 @@
8698
8773
  </xsl:when>
8699
8774
  <xsl:otherwise>
8700
8775
  <xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
8701
- <fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/>​</fo:inline>
8776
+ <fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/>​</fo:inline>
8702
8777
  </xsl:otherwise>
8703
8778
  </xsl:choose>
8704
8779
 
@@ -8733,12 +8808,12 @@
8733
8808
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
8734
8809
 
8735
8810
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
8736
- <fo:block xsl:use-attribute-sets="term-name-style">
8811
+ <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
8737
8812
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
8738
8813
  </fo:block>
8739
8814
  </xsl:if>
8740
8815
 
8741
- <fo:block xsl:use-attribute-sets="preferred-term-style">
8816
+ <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
8742
8817
  <xsl:call-template name="setStyle_preferred"/>
8743
8818
  <xsl:apply-templates/>
8744
8819
  </fo:block>
@@ -8779,7 +8854,7 @@
8779
8854
  <!-- definition -->
8780
8855
  <!-- ========== -->
8781
8856
  <xsl:template match="*[local-name() = 'definition']">
8782
- <fo:block xsl:use-attribute-sets="definition-style">
8857
+ <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
8783
8858
  <xsl:apply-templates/>
8784
8859
  </fo:block>
8785
8860
  </xsl:template>
@@ -8827,6 +8902,10 @@
8827
8902
 
8828
8903
  <xsl:template match="*[local-name() = 'clause']">
8829
8904
  <fo:block>
8905
+ <xsl:if test="parent::*[local-name() = 'copyright-statement']">
8906
+ <xsl:attribute name="role">SKIP</xsl:attribute>
8907
+ </xsl:if>
8908
+
8830
8909
  <xsl:call-template name="setId"/>
8831
8910
 
8832
8911
  <xsl:call-template name="setBlockSpanAll"/>
@@ -9063,7 +9142,7 @@
9063
9142
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
9064
9143
  <xsl:choose>
9065
9144
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
9066
- <fo:block-container>
9145
+ <fo:block-container role="SKIP">
9067
9146
  <xsl:attribute name="margin-left">
9068
9147
  <xsl:choose>
9069
9148
  <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
@@ -9073,7 +9152,7 @@
9073
9152
 
9074
9153
  <xsl:call-template name="refine_list_container_style"/>
9075
9154
 
9076
- <fo:block-container margin-left="0mm">
9155
+ <fo:block-container margin-left="0mm" role="SKIP">
9077
9156
  <fo:block>
9078
9157
  <xsl:apply-templates select="." mode="list"/>
9079
9158
  </fo:block>
@@ -9082,7 +9161,7 @@
9082
9161
  </xsl:when>
9083
9162
  <xsl:otherwise>
9084
9163
 
9085
- <fo:block>
9164
+ <fo:block role="SKIP">
9086
9165
  <xsl:apply-templates select="." mode="list"/>
9087
9166
  </fo:block>
9088
9167
 
@@ -9500,7 +9579,10 @@
9500
9579
  <!-- Reference sections (Normative References and Bibliography) -->
9501
9580
  <!-- ========================================================== -->
9502
9581
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
9503
- <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/>
9582
+ <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
9583
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
9584
+
9585
+ </xsl:template>
9504
9586
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
9505
9587
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
9506
9588
 
@@ -9549,7 +9631,7 @@
9549
9631
 
9550
9632
  <!-- Bibliography (non-normative references) -->
9551
9633
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
9552
-
9634
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
9553
9635
  <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
9554
9636
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
9555
9637
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
@@ -9577,6 +9659,35 @@
9577
9659
 
9578
9660
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
9579
9661
 
9662
+ <xsl:template name="insertListItem_Bibitem">
9663
+ <xsl:choose>
9664
+ <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
9665
+ <xsl:otherwise>
9666
+ <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
9667
+ <fo:list-item-label end-indent="label-end()">
9668
+ <fo:block role="SKIP">
9669
+ <fo:inline role="SKIP">
9670
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
9671
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
9672
+ </xsl:apply-templates>
9673
+ </fo:inline>
9674
+ </fo:block>
9675
+ </fo:list-item-label>
9676
+ <fo:list-item-body start-indent="body-start()">
9677
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
9678
+ <xsl:call-template name="processBibitem">
9679
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
9680
+ </xsl:call-template>
9681
+ </fo:block>
9682
+ </fo:list-item-body>
9683
+ </fo:list-item>
9684
+ </xsl:otherwise>
9685
+ </xsl:choose>
9686
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
9687
+ <xsl:with-param name="skip">false</xsl:with-param>
9688
+ </xsl:apply-templates>
9689
+ </xsl:template>
9690
+
9580
9691
  <xsl:template name="processBibitem">
9581
9692
  <xsl:param name="biblio_tag_part">both</xsl:param>
9582
9693
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module CC
3
- VERSION = "2.2.11".freeze
3
+ VERSION = "2.2.12".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-cc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.11
4
+ version: 2.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-19 00:00:00.000000000 Z
11
+ date: 2023-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic