metanorma-un 0.10.11 → 0.10.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: 44b206001d6db1ddd4899f7c2f9554855c0f0888d4aa6d6379b63e2b6872a515
4
- data.tar.gz: 70a0d21ad1ec44c8cb897e97219ab627c14fa22b0880f3ae04265fe38acaf549
3
+ metadata.gz: 586884ec696f72e729ba9a9502bde8b410bc029842332ab1e6895a41af645c43
4
+ data.tar.gz: 7c9cc667331ae0f51c96b6550aed79bcf4d5b8e4ac3dce11f770bb4f50b70e2f
5
5
  SHA512:
6
- metadata.gz: bd8e8c78fde157cc7740f56c6499e65a0c328edd8a64db4d2852891a5ebf3f98d92d8f19d641a70f77ee8849ec1210d476469d899abffcb78a14aa4c03822a75
7
- data.tar.gz: 641505f4668757c5c3e27e3eee4ee3cc747cc6d15505f637da1b0a706fa20e7ec9bb1dd6036595c7f2f7d41b917b1704c01b422764e88cdbc55592fb160d1c41
6
+ metadata.gz: 29e01f51a7ad2a42be4f8eca3b025b6d951653ce989630ffbd34bc95de3b0884cfac3fb2f9145171f7551b0213a4f40e90249de465bd71731553eaffe937e615
7
+ data.tar.gz: 076af55bea40298a002c290c29966242483aa235b5885b729dd68604bebaa5f7688160e630a04384e12570606f7bdfad84600392432d9b3fcaac9676ca76ca10
@@ -1672,6 +1672,7 @@
1672
1672
  </xsl:attribute-set>
1673
1673
 
1674
1674
  <xsl:attribute-set name="figure-block-style">
1675
+ <xsl:attribute name="role">SKIP</xsl:attribute>
1675
1676
 
1676
1677
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1677
1678
 
@@ -1682,6 +1683,7 @@
1682
1683
  </xsl:attribute-set>
1683
1684
 
1684
1685
  <xsl:attribute-set name="figure-name-style">
1686
+ <xsl:attribute name="role">Caption</xsl:attribute>
1685
1687
 
1686
1688
  <xsl:attribute name="text-align">center</xsl:attribute>
1687
1689
  <xsl:attribute name="space-after">6pt</xsl:attribute>
@@ -1729,6 +1731,7 @@
1729
1731
  </xsl:template>
1730
1732
 
1731
1733
  <xsl:attribute-set name="image-style">
1734
+ <xsl:attribute name="role">SKIP</xsl:attribute>
1732
1735
  <xsl:attribute name="text-align">center</xsl:attribute>
1733
1736
 
1734
1737
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -2001,6 +2004,11 @@
2001
2004
 
2002
2005
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
2003
2006
 
2007
+ <xsl:attribute-set name="bibitem-non-normative-list-item-style">
2008
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2009
+
2010
+ </xsl:attribute-set>
2011
+
2004
2012
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
2005
2013
  <xsl:attribute-set name="bibitem-normative-list-body-style">
2006
2014
 
@@ -2392,14 +2400,14 @@
2392
2400
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
2393
2401
  </xsl:when>
2394
2402
  <xsl:otherwise>
2395
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
2403
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
2396
2404
  </xsl:otherwise>
2397
2405
  </xsl:choose>
2398
2406
  </xsl:for-each>
2399
2407
  </xsl:when>
2400
2408
 
2401
2409
  <xsl:otherwise>
2402
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
2410
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
2403
2411
  </xsl:otherwise>
2404
2412
 
2405
2413
  </xsl:choose>
@@ -2409,7 +2417,7 @@
2409
2417
  <!-- Preface boilerplate sections processing -->
2410
2418
  <!-- ================================= -->
2411
2419
  <xsl:template match="*[local-name()='copyright-statement']">
2412
- <fo:block xsl:use-attribute-sets="copyright-statement-style">
2420
+ <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
2413
2421
  <xsl:apply-templates/>
2414
2422
  </fo:block>
2415
2423
  </xsl:template> <!-- copyright-statement -->
@@ -2579,7 +2587,7 @@
2579
2587
  </xsl:choose>
2580
2588
  </xsl:variable>
2581
2589
 
2582
- <fo:block-container xsl:use-attribute-sets="table-container-style">
2590
+ <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
2583
2591
 
2584
2592
  <xsl:call-template name="refine_table-container-style">
2585
2593
  <xsl:with-param name="margin-side" select="$margin-side"/>
@@ -3619,7 +3627,7 @@
3619
3627
  </xsl:choose>
3620
3628
  </xsl:variable>
3621
3629
  <xsl:variable name="footnote_inline">
3622
- <fo:inline>
3630
+ <fo:inline role="Reference">
3623
3631
 
3624
3632
  <xsl:variable name="fn_styles">
3625
3633
  <xsl:choose>
@@ -3642,7 +3650,7 @@
3642
3650
 
3643
3651
  <xsl:call-template name="insert_basic_link">
3644
3652
  <xsl:with-param name="element">
3645
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
3653
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
3646
3654
  <xsl:copy-of select="$current_fn_number_text"/>
3647
3655
  </fo:basic-link>
3648
3656
  </xsl:with-param>
@@ -3655,17 +3663,17 @@
3655
3663
  <xsl:copy-of select="$footnote_inline"/>
3656
3664
  </xsl:when>
3657
3665
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
3658
- <fo:footnote xsl:use-attribute-sets="fn-style">
3666
+ <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
3659
3667
  <xsl:copy-of select="$footnote_inline"/>
3660
- <fo:footnote-body>
3668
+ <fo:footnote-body role="Note">
3661
3669
 
3662
- <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
3670
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
3663
3671
 
3664
- <fo:block xsl:use-attribute-sets="fn-body-style">
3672
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
3665
3673
 
3666
3674
  <xsl:call-template name="refine_fn-body-style"/>
3667
3675
 
3668
- <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
3676
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
3669
3677
 
3670
3678
  <xsl:call-template name="refine_fn-body-num-style"/>
3671
3679
 
@@ -3927,11 +3935,11 @@
3927
3935
  </xsl:template>
3928
3936
 
3929
3937
  <xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
3930
- <fo:inline><xsl:value-of select="."/></fo:inline>
3938
+ <fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
3931
3939
  </xsl:template>
3932
3940
 
3933
3941
  <xsl:template match="*[local-name()='fn']//*[local-name()='p']">
3934
- <fo:inline>
3942
+ <fo:inline role="P">
3935
3943
  <xsl:apply-templates/>
3936
3944
  </fo:inline>
3937
3945
  </xsl:template>
@@ -3946,7 +3954,7 @@
3946
3954
  <xsl:variable name="isAdded" select="@added"/>
3947
3955
  <xsl:variable name="isDeleted" select="@deleted"/>
3948
3956
  <!-- <dl><xsl:copy-of select="."/></dl> -->
3949
- <fo:block-container xsl:use-attribute-sets="dl-block-style">
3957
+ <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
3950
3958
 
3951
3959
  <xsl:call-template name="setBlockSpanAll"/>
3952
3960
 
@@ -3981,7 +3989,7 @@
3981
3989
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3982
3990
  </xsl:call-template>
3983
3991
 
3984
- <fo:block-container margin-left="0mm">
3992
+ <fo:block-container margin-left="0mm" role="SKIP">
3985
3993
 
3986
3994
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
3987
3995
 
@@ -4046,7 +4054,7 @@
4046
4054
 
4047
4055
  <!-- a few components -->
4048
4056
  <xsl:if test="$onlyOneComponent = 'false'">
4049
- <fo:block>
4057
+ <fo:block role="SKIP">
4050
4058
 
4051
4059
  <xsl:call-template name="refine_multicomponent_style"/>
4052
4060
 
@@ -4054,7 +4062,7 @@
4054
4062
  <xsl:attribute name="margin-top">0</xsl:attribute>
4055
4063
  </xsl:if>
4056
4064
 
4057
- <fo:block>
4065
+ <fo:block role="SKIP">
4058
4066
 
4059
4067
  <xsl:call-template name="refine_multicomponent_block_style"/>
4060
4068
 
@@ -4649,6 +4657,9 @@
4649
4657
 
4650
4658
  <xsl:template name="refine_strong_style">
4651
4659
 
4660
+ <xsl:if test="ancestor::*['preferred']">
4661
+ <xsl:attribute name="role">SKIP</xsl:attribute>
4662
+ </xsl:if>
4652
4663
  </xsl:template>
4653
4664
 
4654
4665
  <xsl:template match="*[local-name()='padding']">
@@ -5580,6 +5591,18 @@
5580
5591
  </xsl:copy>
5581
5592
  </xsl:template>
5582
5593
 
5594
+ <xsl:variable name="font_main_root_style">
5595
+ <root-style xsl:use-attribute-sets="root-style">
5596
+ </root-style>
5597
+ </xsl:variable>
5598
+ <xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
5599
+ <xsl:variable name="font_main">
5600
+ <xsl:choose>
5601
+ <xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
5602
+ <xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
5603
+ </xsl:choose>
5604
+ </xsl:variable>
5605
+
5583
5606
  <xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
5584
5607
  <xsl:param name="id"/>
5585
5608
  <xsl:copy>
@@ -5618,6 +5641,33 @@
5618
5641
 
5619
5642
  <!-- td_text='<xsl:copy-of select="$td_text"/>' -->
5620
5643
 
5644
+ <xsl:variable name="words_with_width">
5645
+ <!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
5646
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
5647
+ <xsl:copy>
5648
+ <xsl:copy-of select="@*"/>
5649
+ <xsl:attribute name="width">
5650
+ <xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
5651
+ </xsl:attribute>
5652
+ <xsl:copy-of select="node()"/>
5653
+ </xsl:copy>
5654
+ </xsl:for-each>
5655
+ </xsl:variable>
5656
+
5657
+ <xsl:variable name="words_with_width_sorted">
5658
+ <xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
5659
+ <xsl:sort select="@width" data-type="number" order="descending"/>
5660
+ <!-- select word maximal width only -->
5661
+ <xsl:if test="position() = 1">
5662
+ <xsl:copy-of select="."/>
5663
+ </xsl:if>
5664
+ </xsl:for-each>
5665
+ <!-- add 'word' with formatting tags inside -->
5666
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
5667
+ <xsl:copy-of select="."/>
5668
+ </xsl:for-each>
5669
+ </xsl:variable>
5670
+
5621
5671
  <xsl:variable name="words">
5622
5672
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
5623
5673
  <word>
@@ -5625,9 +5675,12 @@
5625
5675
  </word>
5626
5676
  </xsl:for-each>
5627
5677
 
5628
- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
5678
+ <xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
5629
5679
  <xsl:copy-of select="."/>
5630
5680
  </xsl:for-each>
5681
+ <!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
5682
+ <xsl:copy-of select="."/>
5683
+ </xsl:for-each> -->
5631
5684
 
5632
5685
  </xsl:variable>
5633
5686
 
@@ -6088,10 +6141,10 @@
6088
6141
  <xsl:copy>
6089
6142
  <xsl:apply-templates select="@*" mode="mathml"/>
6090
6143
  <xsl:if test="not(@lspace)">
6091
- <xsl:attribute name="lspace">0.4em</xsl:attribute>
6144
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
6092
6145
  </xsl:if>
6093
- <xsl:if test="not(@rspace)">
6094
- <xsl:attribute name="rspace">0.4em</xsl:attribute>
6146
+ <xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
6147
+ <xsl:attribute name="rspace">0.2em</xsl:attribute>
6095
6148
  </xsl:if>
6096
6149
  <xsl:apply-templates mode="mathml"/>
6097
6150
  </xsl:copy>
@@ -6108,6 +6161,27 @@
6108
6161
  </xsl:copy>
6109
6162
  </xsl:template>
6110
6163
 
6164
+ <!-- increase space before '(' -->
6165
+ <xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
6166
+ <xsl:copy>
6167
+ <xsl:apply-templates select="@*" mode="mathml"/>
6168
+ <xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
6169
+ <xsl:if test="not(@lspace)">
6170
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
6171
+ <xsl:choose>
6172
+ <xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
6173
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
6174
+ </xsl:when>
6175
+ <xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
6176
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
6177
+ </xsl:when>
6178
+ </xsl:choose>
6179
+ </xsl:if>
6180
+ </xsl:if>
6181
+ <xsl:apply-templates mode="mathml"/>
6182
+ </xsl:copy>
6183
+ </xsl:template>
6184
+
6111
6185
  <!-- Examples:
6112
6186
  <stem type="AsciiMath">x = 1</stem>
6113
6187
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -6267,7 +6341,7 @@
6267
6341
  <!-- formula -->
6268
6342
  <!-- ====== -->
6269
6343
  <xsl:template match="*[local-name() = 'formula']" name="formula">
6270
- <fo:block-container margin-left="0mm">
6344
+ <fo:block-container margin-left="0mm" role="SKIP">
6271
6345
  <xsl:if test="parent::*[local-name() = 'note']">
6272
6346
  <xsl:attribute name="margin-left">
6273
6347
  <xsl:choose>
@@ -6277,7 +6351,7 @@
6277
6351
  </xsl:attribute>
6278
6352
 
6279
6353
  </xsl:if>
6280
- <fo:block-container margin-left="0mm">
6354
+ <fo:block-container margin-left="0mm" role="SKIP">
6281
6355
  <fo:block id="{@id}">
6282
6356
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
6283
6357
  </fo:block>
@@ -6357,13 +6431,13 @@
6357
6431
 
6358
6432
  <xsl:template match="*[local-name() = 'note']" name="note">
6359
6433
 
6360
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
6434
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
6361
6435
 
6362
6436
  <xsl:call-template name="setBlockSpanAll"/>
6363
6437
 
6364
6438
  <xsl:call-template name="refine_note-style"/>
6365
6439
 
6366
- <fo:block-container margin-left="0mm" margin-right="0mm">
6440
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
6367
6441
 
6368
6442
  <fo:block>
6369
6443
 
@@ -6538,12 +6612,13 @@
6538
6612
 
6539
6613
  <xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
6540
6614
  <xsl:if test="normalize-space() != ''">
6541
- <xsl:variable name="level">
6615
+ <!-- <xsl:variable name="level">
6542
6616
  <xsl:call-template name="getLevelTermName"/>
6543
6617
  </xsl:variable>
6544
6618
  <fo:inline role="H{$level}">
6545
- <xsl:apply-templates/>
6546
- </fo:inline>
6619
+ <xsl:apply-templates />
6620
+ </fo:inline> -->
6621
+ <xsl:apply-templates/>
6547
6622
  </xsl:if>
6548
6623
  </xsl:template>
6549
6624
  <!-- ====== -->
@@ -6567,7 +6642,7 @@
6567
6642
  <!-- Example: Dimensions in millimeters -->
6568
6643
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
6569
6644
 
6570
- <fo:block xsl:use-attribute-sets="figure-style">
6645
+ <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
6571
6646
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
6572
6647
  </fo:block>
6573
6648
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
@@ -7701,7 +7776,7 @@
7701
7776
  </xsl:when>
7702
7777
 
7703
7778
  <xsl:otherwise>
7704
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
7779
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
7705
7780
 
7706
7781
  <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
7707
7782
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -7722,7 +7797,7 @@
7722
7797
  </xsl:attribute>
7723
7798
 
7724
7799
  </xsl:if>
7725
- <fo:block-container margin-left="0mm">
7800
+ <fo:block-container margin-left="0mm" role="SKIP">
7726
7801
 
7727
7802
  <fo:block xsl:use-attribute-sets="sourcecode-style">
7728
7803
 
@@ -8268,11 +8343,11 @@
8268
8343
  <!-- requirement, recommendation, permission table -->
8269
8344
  <!-- ========== -->
8270
8345
  <xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8271
- <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
8346
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
8272
8347
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8273
8348
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
8274
8349
  </xsl:if>
8275
- <fo:block-container margin-left="0mm" margin-right="0mm">
8350
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8276
8351
  <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
8277
8352
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8278
8353
  <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
@@ -8434,7 +8509,7 @@
8434
8509
  -->
8435
8510
  <xsl:template match="*[local-name() = 'example']">
8436
8511
 
8437
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
8512
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
8438
8513
 
8439
8514
  <xsl:call-template name="setBlockSpanAll"/>
8440
8515
 
@@ -8445,7 +8520,7 @@
8445
8520
  block
8446
8521
  </xsl:variable>
8447
8522
 
8448
- <fo:block-container margin-left="0mm">
8523
+ <fo:block-container margin-left="0mm" role="SKIP">
8449
8524
 
8450
8525
  <xsl:choose>
8451
8526
 
@@ -8458,8 +8533,8 @@
8458
8533
  </xsl:apply-templates>
8459
8534
  </fo:block>
8460
8535
 
8461
- <fo:block-container xsl:use-attribute-sets="example-body-style">
8462
- <fo:block-container margin-left="0mm" margin-right="0mm">
8536
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
8537
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8463
8538
  <xsl:apply-templates select="node()[not(local-name() = 'name')]">
8464
8539
  <xsl:with-param name="fo_element" select="$fo_element"/>
8465
8540
  </xsl:apply-templates>
@@ -8512,8 +8587,8 @@
8512
8587
 
8513
8588
  <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
8514
8589
  <!-- display further elements in blocks -->
8515
- <fo:block-container xsl:use-attribute-sets="example-body-style">
8516
- <fo:block-container margin-left="0mm" margin-right="0mm">
8590
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
8591
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8517
8592
  <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
8518
8593
  <xsl:with-param name="fo_element" select="'block'"/>
8519
8594
  </xsl:apply-templates>
@@ -8566,7 +8641,7 @@
8566
8641
  </xsl:variable>
8567
8642
  <xsl:choose>
8568
8643
  <xsl:when test="starts-with(normalize-space($element), 'block')">
8569
- <fo:block-container>
8644
+ <fo:block-container role="SKIP">
8570
8645
  <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
8571
8646
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
8572
8647
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -8707,7 +8782,7 @@
8707
8782
  <!-- author -->
8708
8783
  <!-- ====== -->
8709
8784
  <xsl:template match="*[local-name() = 'quote']">
8710
- <fo:block-container margin-left="0mm">
8785
+ <fo:block-container margin-left="0mm" role="SKIP">
8711
8786
 
8712
8787
  <xsl:call-template name="setBlockSpanAll"/>
8713
8788
 
@@ -8717,12 +8792,12 @@
8717
8792
  </xsl:if>
8718
8793
  </xsl:if>
8719
8794
 
8720
- <fo:block-container margin-left="0mm">
8721
- <fo:block-container xsl:use-attribute-sets="quote-style">
8795
+ <fo:block-container margin-left="0mm" role="SKIP">
8796
+ <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
8722
8797
 
8723
8798
  <xsl:call-template name="refine_quote-style"/>
8724
8799
 
8725
- <fo:block-container margin-left="0mm" margin-right="0mm">
8800
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8726
8801
  <fo:block role="BlockQuote">
8727
8802
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
8728
8803
  </fo:block>
@@ -8880,10 +8955,10 @@
8880
8955
 
8881
8956
  <xsl:choose>
8882
8957
  <xsl:when test="$lang = 'zh'">
8883
- <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
8958
+ <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
8884
8959
  </xsl:when>
8885
8960
  <xsl:when test="../../@inline-header = 'true'">
8886
- <fo:inline font-size="90%">
8961
+ <fo:inline font-size="90%" role="SKIP">
8887
8962
  <xsl:call-template name="insertNonBreakSpaces">
8888
8963
  <xsl:with-param name="count" select="$padding-right"/>
8889
8964
  </xsl:call-template>
@@ -8891,7 +8966,7 @@
8891
8966
  </xsl:when>
8892
8967
  <xsl:otherwise>
8893
8968
  <xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
8894
- <fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/>​</fo:inline>
8969
+ <fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/>​</fo:inline>
8895
8970
  </xsl:otherwise>
8896
8971
  </xsl:choose>
8897
8972
 
@@ -8921,12 +8996,12 @@
8921
8996
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
8922
8997
 
8923
8998
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
8924
- <fo:block xsl:use-attribute-sets="term-name-style">
8999
+ <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
8925
9000
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
8926
9001
  </fo:block>
8927
9002
  </xsl:if>
8928
9003
 
8929
- <fo:block xsl:use-attribute-sets="preferred-term-style">
9004
+ <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
8930
9005
  <xsl:call-template name="setStyle_preferred"/>
8931
9006
  <xsl:apply-templates/>
8932
9007
  </fo:block>
@@ -8967,7 +9042,7 @@
8967
9042
  <!-- definition -->
8968
9043
  <!-- ========== -->
8969
9044
  <xsl:template match="*[local-name() = 'definition']">
8970
- <fo:block xsl:use-attribute-sets="definition-style">
9045
+ <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
8971
9046
  <xsl:apply-templates/>
8972
9047
  </fo:block>
8973
9048
  </xsl:template>
@@ -9015,6 +9090,10 @@
9015
9090
 
9016
9091
  <xsl:template match="*[local-name() = 'clause']">
9017
9092
  <fo:block>
9093
+ <xsl:if test="parent::*[local-name() = 'copyright-statement']">
9094
+ <xsl:attribute name="role">SKIP</xsl:attribute>
9095
+ </xsl:if>
9096
+
9018
9097
  <xsl:call-template name="setId"/>
9019
9098
 
9020
9099
  <xsl:call-template name="setBlockSpanAll"/>
@@ -9256,7 +9335,7 @@
9256
9335
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
9257
9336
  <xsl:choose>
9258
9337
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
9259
- <fo:block-container>
9338
+ <fo:block-container role="SKIP">
9260
9339
  <xsl:attribute name="margin-left">
9261
9340
  <xsl:choose>
9262
9341
  <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
@@ -9266,7 +9345,7 @@
9266
9345
 
9267
9346
  <xsl:call-template name="refine_list_container_style"/>
9268
9347
 
9269
- <fo:block-container margin-left="0mm">
9348
+ <fo:block-container margin-left="0mm" role="SKIP">
9270
9349
  <fo:block>
9271
9350
  <xsl:apply-templates select="." mode="list"/>
9272
9351
  </fo:block>
@@ -9275,7 +9354,7 @@
9275
9354
  </xsl:when>
9276
9355
  <xsl:otherwise>
9277
9356
 
9278
- <fo:block>
9357
+ <fo:block role="SKIP">
9279
9358
  <xsl:apply-templates select="." mode="list"/>
9280
9359
  </fo:block>
9281
9360
 
@@ -9697,7 +9776,10 @@
9697
9776
  <!-- Reference sections (Normative References and Bibliography) -->
9698
9777
  <!-- ========================================================== -->
9699
9778
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
9700
- <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/>
9779
+ <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
9780
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
9781
+
9782
+ </xsl:template>
9701
9783
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
9702
9784
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
9703
9785
 
@@ -9744,6 +9826,7 @@
9744
9826
 
9745
9827
  <!-- Bibliography (non-normative references) -->
9746
9828
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
9829
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
9747
9830
 
9748
9831
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
9749
9832
  <xsl:call-template name="processBibitem"/>
@@ -9751,6 +9834,35 @@
9751
9834
 
9752
9835
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
9753
9836
 
9837
+ <xsl:template name="insertListItem_Bibitem">
9838
+ <xsl:choose>
9839
+ <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
9840
+ <xsl:otherwise>
9841
+ <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
9842
+ <fo:list-item-label end-indent="label-end()">
9843
+ <fo:block role="SKIP">
9844
+ <fo:inline role="SKIP">
9845
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
9846
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
9847
+ </xsl:apply-templates>
9848
+ </fo:inline>
9849
+ </fo:block>
9850
+ </fo:list-item-label>
9851
+ <fo:list-item-body start-indent="body-start()">
9852
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
9853
+ <xsl:call-template name="processBibitem">
9854
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
9855
+ </xsl:call-template>
9856
+ </fo:block>
9857
+ </fo:list-item-body>
9858
+ </fo:list-item>
9859
+ </xsl:otherwise>
9860
+ </xsl:choose>
9861
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
9862
+ <xsl:with-param name="skip">false</xsl:with-param>
9863
+ </xsl:apply-templates>
9864
+ </xsl:template>
9865
+
9754
9866
  <xsl:template name="processBibitem">
9755
9867
  <xsl:param name="biblio_tag_part">both</xsl:param>
9756
9868
 
@@ -10091,9 +10203,9 @@
10091
10203
 
10092
10204
  <xsl:call-template name="setBlockSpanAll"/>
10093
10205
 
10094
- <fo:block-container xsl:use-attribute-sets="admonition-container-style">
10206
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
10095
10207
 
10096
- <fo:block-container margin-left="0mm" margin-right="0mm">
10208
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10097
10209
  <fo:block>
10098
10210
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
10099
10211
  </fo:block>