metanorma-bipm 2.2.11 → 2.2.13

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.
@@ -2684,6 +2684,7 @@
2684
2684
  </xsl:attribute-set>
2685
2685
 
2686
2686
  <xsl:attribute-set name="figure-block-style">
2687
+ <xsl:attribute name="role">SKIP</xsl:attribute>
2687
2688
 
2688
2689
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2689
2690
 
@@ -2694,6 +2695,7 @@
2694
2695
  </xsl:attribute-set>
2695
2696
 
2696
2697
  <xsl:attribute-set name="figure-name-style">
2698
+ <xsl:attribute name="role">Caption</xsl:attribute>
2697
2699
 
2698
2700
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2699
2701
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -2736,7 +2738,12 @@
2736
2738
  </xsl:attribute-set> <!-- formula-stem-number-style -->
2737
2739
  <!-- End Formula's styles -->
2738
2740
 
2741
+ <xsl:template name="refine_formula-stem-number-style">
2742
+
2743
+ </xsl:template>
2744
+
2739
2745
  <xsl:attribute-set name="image-style">
2746
+ <xsl:attribute name="role">SKIP</xsl:attribute>
2740
2747
  <xsl:attribute name="text-align">center</xsl:attribute>
2741
2748
 
2742
2749
  </xsl:attribute-set>
@@ -3007,6 +3014,13 @@
3007
3014
 
3008
3015
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
3009
3016
 
3017
+ <xsl:attribute-set name="bibitem-non-normative-list-item-style">
3018
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3019
+
3020
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3021
+
3022
+ </xsl:attribute-set>
3023
+
3010
3024
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
3011
3025
  <xsl:attribute-set name="bibitem-normative-list-body-style">
3012
3026
 
@@ -3232,13 +3246,13 @@
3232
3246
 
3233
3247
  <xsl:template name="processPrefaceSectionsDefault_Contents">
3234
3248
  <xsl:variable name="nodes_preface_">
3235
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
3249
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
3236
3250
  <node id="{@id}"/>
3237
3251
  </xsl:for-each>
3238
3252
  </xsl:variable>
3239
3253
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
3240
3254
 
3241
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
3255
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
3242
3256
  <xsl:sort select="@displayorder" data-type="number"/>
3243
3257
 
3244
3258
  <!-- process Section's title -->
@@ -3272,12 +3286,12 @@
3272
3286
  <xsl:apply-templates select="." mode="contents"/>
3273
3287
  </xsl:for-each>
3274
3288
 
3275
- <xsl:for-each select="/*/*[local-name()='annex']">
3289
+ <!-- <xsl:for-each select="/*/*[local-name()='annex']">
3276
3290
  <xsl:sort select="@displayorder" data-type="number"/>
3277
3291
  <xsl:apply-templates select="." mode="contents"/>
3278
- </xsl:for-each>
3292
+ </xsl:for-each> -->
3279
3293
 
3280
- <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) &gt; 0] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) &gt; 0]">
3294
+ <xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) &gt; 0] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) &gt; 0]">
3281
3295
  <xsl:sort select="@displayorder" data-type="number"/>
3282
3296
  <xsl:apply-templates select="." mode="contents"/>
3283
3297
  </xsl:for-each>
@@ -3407,14 +3421,14 @@
3407
3421
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
3408
3422
  </xsl:when>
3409
3423
  <xsl:otherwise>
3410
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
3424
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
3411
3425
  </xsl:otherwise>
3412
3426
  </xsl:choose>
3413
3427
  </xsl:for-each>
3414
3428
  </xsl:when>
3415
3429
 
3416
3430
  <xsl:otherwise>
3417
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
3431
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
3418
3432
  </xsl:otherwise>
3419
3433
 
3420
3434
  </xsl:choose>
@@ -3424,7 +3438,7 @@
3424
3438
  <!-- Preface boilerplate sections processing -->
3425
3439
  <!-- ================================= -->
3426
3440
  <xsl:template match="*[local-name()='copyright-statement']">
3427
- <fo:block xsl:use-attribute-sets="copyright-statement-style">
3441
+ <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
3428
3442
  <xsl:apply-templates/>
3429
3443
  </fo:block>
3430
3444
  </xsl:template> <!-- copyright-statement -->
@@ -3590,7 +3604,7 @@
3590
3604
  </xsl:choose>
3591
3605
  </xsl:variable>
3592
3606
 
3593
- <fo:block-container xsl:use-attribute-sets="table-container-style">
3607
+ <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
3594
3608
 
3595
3609
  <xsl:call-template name="refine_table-container-style">
3596
3610
  <xsl:with-param name="margin-side" select="$margin-side"/>
@@ -3728,7 +3742,7 @@
3728
3742
  <fo:table-row>
3729
3743
  <fo:table-cell column-number="2">
3730
3744
  <xsl:copy-of select="$table-preamble"/>
3731
- <fo:block>
3745
+ <fo:block role="SKIP">
3732
3746
  <xsl:call-template name="setTrackChangesStyles">
3733
3747
  <xsl:with-param name="isAdded" select="$isAdded"/>
3734
3748
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
@@ -3771,7 +3785,7 @@
3771
3785
  <xsl:param name="continued"/>
3772
3786
  <xsl:if test="normalize-space() != ''">
3773
3787
 
3774
- <fo:block xsl:use-attribute-sets="table-name-style">
3788
+ <fo:block xsl:use-attribute-sets="table-name-style" role="SKIP">
3775
3789
 
3776
3790
  <xsl:call-template name="refine_table-name-style">
3777
3791
  <xsl:with-param name="continued" select="$continued"/>
@@ -4162,8 +4176,8 @@
4162
4176
  <xsl:template name="table-header-title">
4163
4177
  <xsl:param name="cols-count"/>
4164
4178
  <!-- row for title -->
4165
- <fo:table-row>
4166
- <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
4179
+ <fo:table-row role="SKIP">
4180
+ <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black" role="SKIP">
4167
4181
 
4168
4182
  <xsl:call-template name="refine_table-header-title-style"/>
4169
4183
 
@@ -4172,14 +4186,14 @@
4172
4186
  </xsl:apply-templates>
4173
4187
 
4174
4188
  <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
4175
- <fo:block/>
4189
+ <fo:block role="SKIP"/>
4176
4190
  </xsl:if>
4177
4191
 
4178
4192
  <xsl:for-each select="ancestor::*[local-name()='table'][1]">
4179
4193
  <xsl:call-template name="table_name_fn_display"/>
4180
4194
  </xsl:for-each>
4181
4195
 
4182
- <fo:block text-align="right" font-style="italic">
4196
+ <fo:block text-align="right" font-style="italic" role="SKIP">
4183
4197
  <xsl:text> </xsl:text>
4184
4198
  <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
4185
4199
  </fo:block>
@@ -4378,21 +4392,21 @@
4378
4392
  <xsl:variable name="title_start" select="ancestor::*[local-name()='table'][1]/*[local-name()='name']/node()[1][self::text()]"/>
4379
4393
  <xsl:variable name="table_number" select="substring-before($title_start, '—')"/>
4380
4394
 
4381
- <fo:table-row height="0" keep-with-next.within-page="always">
4382
- <fo:table-cell>
4395
+ <fo:table-row height="0" keep-with-next.within-page="always" role="SKIP">
4396
+ <fo:table-cell role="SKIP">
4383
4397
 
4384
4398
  <fo:marker marker-class-name="table_continued"/>
4385
4399
 
4386
- <fo:block/>
4400
+ <fo:block role="SKIP"/>
4387
4401
  </fo:table-cell>
4388
4402
  </fo:table-row>
4389
- <fo:table-row height="0" keep-with-next.within-page="always">
4390
- <fo:table-cell>
4403
+ <fo:table-row height="0" keep-with-next.within-page="always" role="SKIP">
4404
+ <fo:table-cell role="SKIP">
4391
4405
 
4392
4406
  <fo:marker marker-class-name="table_continued">
4393
4407
  <xsl:value-of select="$title_continued"/>
4394
4408
  </fo:marker>
4395
- <fo:block/>
4409
+ <fo:block role="SKIP"/>
4396
4410
  </fo:table-cell>
4397
4411
  </fo:table-row>
4398
4412
 
@@ -4533,7 +4547,7 @@
4533
4547
 
4534
4548
  <xsl:call-template name="refine_table-header-cell-style"/>
4535
4549
 
4536
- <fo:block>
4550
+ <fo:block role="SKIP">
4537
4551
  <xsl:apply-templates/>
4538
4552
  </fo:block>
4539
4553
  </fo:table-cell>
@@ -4586,7 +4600,7 @@
4586
4600
  <xsl:attribute name="text-align">left</xsl:attribute>
4587
4601
  </xsl:if>
4588
4602
 
4589
- <fo:block>
4603
+ <fo:block role="SKIP">
4590
4604
 
4591
4605
  <xsl:if test="$isGenerateTableIF = 'true'">
4592
4606
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -4679,7 +4693,7 @@
4679
4693
  </xsl:choose>
4680
4694
  </xsl:variable>
4681
4695
  <xsl:variable name="footnote_inline">
4682
- <fo:inline>
4696
+ <fo:inline role="Reference">
4683
4697
 
4684
4698
  <xsl:variable name="fn_styles">
4685
4699
  <xsl:choose>
@@ -4702,7 +4716,7 @@
4702
4716
 
4703
4717
  <xsl:call-template name="insert_basic_link">
4704
4718
  <xsl:with-param name="element">
4705
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
4719
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
4706
4720
  <xsl:copy-of select="$current_fn_number_text"/>
4707
4721
  </fo:basic-link>
4708
4722
  </xsl:with-param>
@@ -4715,17 +4729,17 @@
4715
4729
  <xsl:copy-of select="$footnote_inline"/>
4716
4730
  </xsl:when>
4717
4731
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
4718
- <fo:footnote xsl:use-attribute-sets="fn-style">
4732
+ <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
4719
4733
  <xsl:copy-of select="$footnote_inline"/>
4720
- <fo:footnote-body>
4734
+ <fo:footnote-body role="Note">
4721
4735
 
4722
- <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
4736
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
4723
4737
 
4724
- <fo:block xsl:use-attribute-sets="fn-body-style">
4738
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
4725
4739
 
4726
4740
  <xsl:call-template name="refine_fn-body-style"/>
4727
4741
 
4728
- <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
4742
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
4729
4743
 
4730
4744
  <xsl:call-template name="refine_fn-body-num-style"/>
4731
4745
 
@@ -4987,11 +5001,11 @@
4987
5001
  </xsl:template>
4988
5002
 
4989
5003
  <xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
4990
- <fo:inline><xsl:value-of select="."/></fo:inline>
5004
+ <fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
4991
5005
  </xsl:template>
4992
5006
 
4993
5007
  <xsl:template match="*[local-name()='fn']//*[local-name()='p']">
4994
- <fo:inline>
5008
+ <fo:inline role="P">
4995
5009
  <xsl:apply-templates/>
4996
5010
  </fo:inline>
4997
5011
  </xsl:template>
@@ -5006,7 +5020,7 @@
5006
5020
  <xsl:variable name="isAdded" select="@added"/>
5007
5021
  <xsl:variable name="isDeleted" select="@deleted"/>
5008
5022
  <!-- <dl><xsl:copy-of select="."/></dl> -->
5009
- <fo:block-container xsl:use-attribute-sets="dl-block-style">
5023
+ <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
5010
5024
 
5011
5025
  <xsl:call-template name="setBlockSpanAll"/>
5012
5026
 
@@ -5041,7 +5055,7 @@
5041
5055
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
5042
5056
  </xsl:call-template>
5043
5057
 
5044
- <fo:block-container margin-left="0mm">
5058
+ <fo:block-container margin-left="0mm" role="SKIP">
5045
5059
 
5046
5060
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
5047
5061
 
@@ -5110,7 +5124,7 @@
5110
5124
 
5111
5125
  <!-- a few components -->
5112
5126
  <xsl:if test="$onlyOneComponent = 'false'">
5113
- <fo:block>
5127
+ <fo:block role="SKIP">
5114
5128
 
5115
5129
  <xsl:call-template name="refine_multicomponent_style"/>
5116
5130
 
@@ -5118,7 +5132,7 @@
5118
5132
  <xsl:attribute name="margin-top">0</xsl:attribute>
5119
5133
  </xsl:if>
5120
5134
 
5121
- <fo:block>
5135
+ <fo:block role="SKIP">
5122
5136
 
5123
5137
  <xsl:call-template name="refine_multicomponent_block_style"/>
5124
5138
 
@@ -5463,7 +5477,7 @@
5463
5477
  -->
5464
5478
  <fo:table-row>
5465
5479
  <fo:table-cell number-columns-spanned="2">
5466
- <fo:block>
5480
+ <fo:block role="SKIP">
5467
5481
  <xsl:call-template name="note"/>
5468
5482
  </fo:block>
5469
5483
  </fo:table-cell>
@@ -5528,7 +5542,7 @@
5528
5542
 
5529
5543
  <xsl:call-template name="refine_dt-cell-style"/>
5530
5544
 
5531
- <fo:block xsl:use-attribute-sets="dt-block-style">
5545
+ <fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
5532
5546
  <xsl:copy-of select="@id"/>
5533
5547
 
5534
5548
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -5558,7 +5572,7 @@
5558
5572
 
5559
5573
  <xsl:call-template name="refine_dd-cell-style"/>
5560
5574
 
5561
- <fo:block>
5575
+ <fo:block role="SKIP">
5562
5576
 
5563
5577
  <xsl:if test="$isGenerateTableIF = 'true'">
5564
5578
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -5723,6 +5737,9 @@
5723
5737
 
5724
5738
  <xsl:template name="refine_strong_style">
5725
5739
 
5740
+ <xsl:if test="ancestor::*['preferred']">
5741
+ <xsl:attribute name="role">SKIP</xsl:attribute>
5742
+ </xsl:if>
5726
5743
  </xsl:template>
5727
5744
 
5728
5745
  <xsl:template match="*[local-name()='padding']">
@@ -5934,11 +5951,41 @@
5934
5951
 
5935
5952
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
5936
5953
  <xsl:variable name="text" select="normalize-space(.)"/>
5937
- <fo:inline font-size="75%">
5954
+ <fo:inline font-size="75%" role="SKIP">
5938
5955
  <xsl:if test="string-length($text) &gt; 0">
5939
- <xsl:call-template name="recursiveSmallCaps">
5940
- <xsl:with-param name="text" select="$text"/>
5941
- </xsl:call-template>
5956
+ <xsl:variable name="smallCapsText">
5957
+ <xsl:call-template name="recursiveSmallCaps">
5958
+ <xsl:with-param name="text" select="$text"/>
5959
+ </xsl:call-template>
5960
+ </xsl:variable>
5961
+ <!-- merge neighboring fo:inline -->
5962
+ <xsl:for-each select="xalan:nodeset($smallCapsText)/node()">
5963
+ <xsl:choose>
5964
+ <xsl:when test="self::fo:inline and preceding-sibling::node()[1][self::fo:inline]"><!-- <xsl:copy-of select="."/> --></xsl:when>
5965
+ <xsl:when test="self::fo:inline and @font-size">
5966
+ <xsl:variable name="curr_pos" select="count(preceding-sibling::node()) + 1"/>
5967
+ <!-- <curr_pos><xsl:value-of select="$curr_pos"/></curr_pos> -->
5968
+ <xsl:variable name="next_text_" select="count(following-sibling::node()[not(local-name() = 'inline')][1]/preceding-sibling::node())"/>
5969
+ <xsl:variable name="next_text">
5970
+ <xsl:choose>
5971
+ <xsl:when test="$next_text_ = 0">99999999</xsl:when>
5972
+ <xsl:otherwise><xsl:value-of select="$next_text_ + 1"/></xsl:otherwise>
5973
+ </xsl:choose>
5974
+ </xsl:variable>
5975
+ <!-- <next_text><xsl:value-of select="$next_text"/></next_text> -->
5976
+ <fo:inline>
5977
+ <xsl:copy-of select="@*"/>
5978
+ <xsl:copy-of select="./node()"/>
5979
+ <xsl:for-each select="following-sibling::node()[position() &lt; $next_text - $curr_pos]"> <!-- [self::fo:inline] -->
5980
+ <xsl:copy-of select="./node()"/>
5981
+ </xsl:for-each>
5982
+ </fo:inline>
5983
+ </xsl:when>
5984
+ <xsl:otherwise>
5985
+ <xsl:copy-of select="."/>
5986
+ </xsl:otherwise>
5987
+ </xsl:choose>
5988
+ </xsl:for-each>
5942
5989
  </xsl:if>
5943
5990
  </fo:inline>
5944
5991
  </xsl:template>
@@ -5950,7 +5997,7 @@
5950
5997
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
5951
5998
  <xsl:choose>
5952
5999
  <xsl:when test="$char=$upperCase">
5953
- <fo:inline font-size="{100 div 0.75}%">
6000
+ <fo:inline font-size="{100 div 0.75}%" role="SKIP">
5954
6001
  <xsl:value-of select="$upperCase"/>
5955
6002
  </fo:inline>
5956
6003
  </xsl:when>
@@ -6112,6 +6159,10 @@
6112
6159
 
6113
6160
  <xsl:when test="not(contains($text, $separator))">
6114
6161
  <word>
6162
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
6163
+ <xsl:text>
6164
+  </xsl:text> <!-- to add distance between dt and dd -->
6165
+ </xsl:if>
6115
6166
  <xsl:call-template name="enclose_text_in_tags">
6116
6167
  <xsl:with-param name="text" select="normalize-space($text)"/>
6117
6168
  <xsl:with-param name="tags" select="$tags"/>
@@ -6120,6 +6171,10 @@
6120
6171
  </xsl:when>
6121
6172
  <xsl:otherwise>
6122
6173
  <word>
6174
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
6175
+ <xsl:text>
6176
+  </xsl:text> <!-- to add distance between dt and dd -->
6177
+ </xsl:if>
6123
6178
  <xsl:call-template name="enclose_text_in_tags">
6124
6179
  <xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
6125
6180
  <xsl:with-param name="tags" select="$tags"/>
@@ -6303,6 +6358,10 @@
6303
6358
  <xsl:template name="getSimpleTable">
6304
6359
  <xsl:param name="id"/>
6305
6360
 
6361
+ <!-- <test0>
6362
+ <xsl:copy-of select="."/>
6363
+ </test0> -->
6364
+
6306
6365
  <xsl:variable name="simple-table">
6307
6366
 
6308
6367
  <!-- Step 0. replace <br/> to <p>...</p> -->
@@ -6615,6 +6674,18 @@
6615
6674
  </xsl:copy>
6616
6675
  </xsl:template>
6617
6676
 
6677
+ <xsl:variable name="font_main_root_style">
6678
+ <root-style xsl:use-attribute-sets="root-style">
6679
+ </root-style>
6680
+ </xsl:variable>
6681
+ <xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
6682
+ <xsl:variable name="font_main">
6683
+ <xsl:choose>
6684
+ <xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
6685
+ <xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
6686
+ </xsl:choose>
6687
+ </xsl:variable>
6688
+
6618
6689
  <xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
6619
6690
  <xsl:param name="id"/>
6620
6691
  <xsl:copy>
@@ -6653,6 +6724,33 @@
6653
6724
 
6654
6725
  <!-- td_text='<xsl:copy-of select="$td_text"/>' -->
6655
6726
 
6727
+ <xsl:variable name="words_with_width">
6728
+ <!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
6729
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
6730
+ <xsl:copy>
6731
+ <xsl:copy-of select="@*"/>
6732
+ <xsl:attribute name="width">
6733
+ <xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
6734
+ </xsl:attribute>
6735
+ <xsl:copy-of select="node()"/>
6736
+ </xsl:copy>
6737
+ </xsl:for-each>
6738
+ </xsl:variable>
6739
+
6740
+ <xsl:variable name="words_with_width_sorted">
6741
+ <xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
6742
+ <xsl:sort select="@width" data-type="number" order="descending"/>
6743
+ <!-- select word maximal width only -->
6744
+ <xsl:if test="position() = 1">
6745
+ <xsl:copy-of select="."/>
6746
+ </xsl:if>
6747
+ </xsl:for-each>
6748
+ <!-- add 'word' with formatting tags inside -->
6749
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
6750
+ <xsl:copy-of select="."/>
6751
+ </xsl:for-each>
6752
+ </xsl:variable>
6753
+
6656
6754
  <xsl:variable name="words">
6657
6755
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
6658
6756
  <word>
@@ -6660,9 +6758,12 @@
6660
6758
  </word>
6661
6759
  </xsl:for-each>
6662
6760
 
6663
- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
6761
+ <xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
6664
6762
  <xsl:copy-of select="."/>
6665
6763
  </xsl:for-each>
6764
+ <!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
6765
+ <xsl:copy-of select="."/>
6766
+ </xsl:for-each> -->
6666
6767
 
6667
6768
  </xsl:variable>
6668
6769
 
@@ -7130,10 +7231,10 @@
7130
7231
  <xsl:copy>
7131
7232
  <xsl:apply-templates select="@*" mode="mathml"/>
7132
7233
  <xsl:if test="not(@lspace)">
7133
- <xsl:attribute name="lspace">0.4em</xsl:attribute>
7234
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7134
7235
  </xsl:if>
7135
- <xsl:if test="not(@rspace)">
7136
- <xsl:attribute name="rspace">0.4em</xsl:attribute>
7236
+ <xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
7237
+ <xsl:attribute name="rspace">0.2em</xsl:attribute>
7137
7238
  </xsl:if>
7138
7239
  <xsl:apply-templates mode="mathml"/>
7139
7240
  </xsl:copy>
@@ -7150,6 +7251,27 @@
7150
7251
  </xsl:copy>
7151
7252
  </xsl:template>
7152
7253
 
7254
+ <!-- increase space before '(' -->
7255
+ <xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
7256
+ <xsl:copy>
7257
+ <xsl:apply-templates select="@*" mode="mathml"/>
7258
+ <xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
7259
+ <xsl:if test="not(@lspace)">
7260
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
7261
+ <xsl:choose>
7262
+ <xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
7263
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7264
+ </xsl:when>
7265
+ <xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
7266
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7267
+ </xsl:when>
7268
+ </xsl:choose>
7269
+ </xsl:if>
7270
+ </xsl:if>
7271
+ <xsl:apply-templates mode="mathml"/>
7272
+ </xsl:copy>
7273
+ </xsl:template>
7274
+
7153
7275
  <!-- Examples:
7154
7276
  <stem type="AsciiMath">x = 1</stem>
7155
7277
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -7309,7 +7431,7 @@
7309
7431
  <!-- formula -->
7310
7432
  <!-- ====== -->
7311
7433
  <xsl:template match="*[local-name() = 'formula']" name="formula">
7312
- <fo:block-container margin-left="0mm">
7434
+ <fo:block-container margin-left="0mm" role="SKIP">
7313
7435
  <xsl:if test="parent::*[local-name() = 'note']">
7314
7436
  <xsl:attribute name="margin-left">
7315
7437
  <xsl:choose>
@@ -7319,7 +7441,7 @@
7319
7441
  </xsl:attribute>
7320
7442
 
7321
7443
  </xsl:if>
7322
- <fo:block-container margin-left="0mm">
7444
+ <fo:block-container margin-left="0mm" role="SKIP">
7323
7445
  <fo:block id="{@id}">
7324
7446
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
7325
7447
  </fo:block>
@@ -7355,7 +7477,7 @@
7355
7477
  <fo:table-body>
7356
7478
  <fo:table-row>
7357
7479
  <fo:table-cell display-align="center">
7358
- <fo:block xsl:use-attribute-sets="formula-stem-block-style">
7480
+ <fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
7359
7481
 
7360
7482
  <xsl:call-template name="refine_formula-stem-block-style"/>
7361
7483
 
@@ -7363,7 +7485,10 @@
7363
7485
  </fo:block>
7364
7486
  </fo:table-cell>
7365
7487
  <fo:table-cell display-align="center">
7366
- <fo:block xsl:use-attribute-sets="formula-stem-number-style">
7488
+ <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
7489
+
7490
+ <xsl:call-template name="refine_formula-stem-number-style"/>
7491
+
7367
7492
  <xsl:apply-templates select="../*[local-name() = 'name']"/>
7368
7493
  </fo:block>
7369
7494
  </fo:table-cell>
@@ -7396,13 +7521,13 @@
7396
7521
 
7397
7522
  <xsl:template match="*[local-name() = 'note']" name="note">
7398
7523
 
7399
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
7524
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7400
7525
 
7401
7526
  <xsl:call-template name="setBlockSpanAll"/>
7402
7527
 
7403
7528
  <xsl:call-template name="refine_note-style"/>
7404
7529
 
7405
- <fo:block-container margin-left="0mm" margin-right="0mm">
7530
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7406
7531
 
7407
7532
  <fo:block>
7408
7533
 
@@ -7566,12 +7691,13 @@
7566
7691
 
7567
7692
  <xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
7568
7693
  <xsl:if test="normalize-space() != ''">
7569
- <xsl:variable name="level">
7694
+ <!-- <xsl:variable name="level">
7570
7695
  <xsl:call-template name="getLevelTermName"/>
7571
7696
  </xsl:variable>
7572
7697
  <fo:inline role="H{$level}">
7573
- <xsl:apply-templates/>
7574
- </fo:inline>
7698
+ <xsl:apply-templates />
7699
+ </fo:inline> -->
7700
+ <xsl:apply-templates/>
7575
7701
  </xsl:if>
7576
7702
  </xsl:template>
7577
7703
  <!-- ====== -->
@@ -7595,7 +7721,7 @@
7595
7721
  <!-- Example: Dimensions in millimeters -->
7596
7722
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
7597
7723
 
7598
- <fo:block xsl:use-attribute-sets="figure-style">
7724
+ <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
7599
7725
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
7600
7726
  </fo:block>
7601
7727
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
@@ -8729,7 +8855,7 @@
8729
8855
  </xsl:when>
8730
8856
 
8731
8857
  <xsl:otherwise>
8732
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
8858
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
8733
8859
 
8734
8860
  <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
8735
8861
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -8750,7 +8876,7 @@
8750
8876
  </xsl:attribute>
8751
8877
 
8752
8878
  </xsl:if>
8753
- <fo:block-container margin-left="0mm">
8879
+ <fo:block-container margin-left="0mm" role="SKIP">
8754
8880
 
8755
8881
  <fo:block xsl:use-attribute-sets="sourcecode-style">
8756
8882
 
@@ -8874,7 +9000,7 @@
8874
9000
  <!-- second td with sourcecode -->
8875
9001
  <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
8876
9002
  <fo:table-cell>
8877
- <fo:block>
9003
+ <fo:block role="SKIP">
8878
9004
  <xsl:apply-templates/>
8879
9005
  </fo:block>
8880
9006
  </fo:table-cell>
@@ -9296,11 +9422,11 @@
9296
9422
  <!-- requirement, recommendation, permission table -->
9297
9423
  <!-- ========== -->
9298
9424
  <xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9299
- <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
9425
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
9300
9426
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9301
9427
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
9302
9428
  </xsl:if>
9303
- <fo:block-container margin-left="0mm" margin-right="0mm">
9429
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9304
9430
  <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
9305
9431
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9306
9432
  <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
@@ -9361,7 +9487,7 @@
9361
9487
 
9362
9488
  <xsl:call-template name="setTableCellAttributes"/>
9363
9489
 
9364
- <fo:block>
9490
+ <fo:block role="SKIP">
9365
9491
  <xsl:apply-templates/>
9366
9492
  </fo:block>
9367
9493
  </fo:table-cell>
@@ -9383,7 +9509,7 @@
9383
9509
 
9384
9510
  <xsl:call-template name="setTableCellAttributes"/>
9385
9511
 
9386
- <fo:block>
9512
+ <fo:block role="SKIP">
9387
9513
  <xsl:apply-templates/>
9388
9514
  </fo:block>
9389
9515
  </fo:table-cell>
@@ -9462,7 +9588,7 @@
9462
9588
  -->
9463
9589
  <xsl:template match="*[local-name() = 'example']">
9464
9590
 
9465
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
9591
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
9466
9592
 
9467
9593
  <xsl:call-template name="setBlockSpanAll"/>
9468
9594
 
@@ -9473,7 +9599,7 @@
9473
9599
  inline
9474
9600
  </xsl:variable>
9475
9601
 
9476
- <fo:block-container margin-left="0mm">
9602
+ <fo:block-container margin-left="0mm" role="SKIP">
9477
9603
 
9478
9604
  <xsl:choose>
9479
9605
 
@@ -9486,8 +9612,8 @@
9486
9612
  </xsl:apply-templates>
9487
9613
  </fo:block>
9488
9614
 
9489
- <fo:block-container xsl:use-attribute-sets="example-body-style">
9490
- <fo:block-container margin-left="0mm" margin-right="0mm">
9615
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9616
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9491
9617
  <xsl:apply-templates select="node()[not(local-name() = 'name')]">
9492
9618
  <xsl:with-param name="fo_element" select="$fo_element"/>
9493
9619
  </xsl:apply-templates>
@@ -9540,8 +9666,8 @@
9540
9666
 
9541
9667
  <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
9542
9668
  <!-- display further elements in blocks -->
9543
- <fo:block-container xsl:use-attribute-sets="example-body-style">
9544
- <fo:block-container margin-left="0mm" margin-right="0mm">
9669
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9670
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9545
9671
  <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
9546
9672
  <xsl:with-param name="fo_element" select="'block'"/>
9547
9673
  </xsl:apply-templates>
@@ -9599,7 +9725,7 @@
9599
9725
  </xsl:variable>
9600
9726
  <xsl:choose>
9601
9727
  <xsl:when test="starts-with(normalize-space($element), 'block')">
9602
- <fo:block-container>
9728
+ <fo:block-container role="SKIP">
9603
9729
  <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
9604
9730
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
9605
9731
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -9740,7 +9866,7 @@
9740
9866
  <!-- author -->
9741
9867
  <!-- ====== -->
9742
9868
  <xsl:template match="*[local-name() = 'quote']">
9743
- <fo:block-container margin-left="0mm">
9869
+ <fo:block-container margin-left="0mm" role="SKIP">
9744
9870
 
9745
9871
  <xsl:call-template name="setBlockSpanAll"/>
9746
9872
 
@@ -9754,12 +9880,12 @@
9754
9880
  <xsl:attribute name="space-after">12pt</xsl:attribute>
9755
9881
  </xsl:if>
9756
9882
 
9757
- <fo:block-container margin-left="0mm">
9758
- <fo:block-container xsl:use-attribute-sets="quote-style">
9883
+ <fo:block-container margin-left="0mm" role="SKIP">
9884
+ <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
9759
9885
 
9760
9886
  <xsl:call-template name="refine_quote-style"/>
9761
9887
 
9762
- <fo:block-container margin-left="0mm" margin-right="0mm">
9888
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9763
9889
  <fo:block role="BlockQuote">
9764
9890
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
9765
9891
  </fo:block>
@@ -9915,10 +10041,10 @@
9915
10041
 
9916
10042
  <xsl:choose>
9917
10043
  <xsl:when test="$lang = 'zh'">
9918
- <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
10044
+ <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
9919
10045
  </xsl:when>
9920
10046
  <xsl:when test="../../@inline-header = 'true'">
9921
- <fo:inline font-size="90%">
10047
+ <fo:inline font-size="90%" role="SKIP">
9922
10048
  <xsl:call-template name="insertNonBreakSpaces">
9923
10049
  <xsl:with-param name="count" select="$padding-right"/>
9924
10050
  </xsl:call-template>
@@ -9926,7 +10052,7 @@
9926
10052
  </xsl:when>
9927
10053
  <xsl:otherwise>
9928
10054
  <xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
9929
- <fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/>​</fo:inline>
10055
+ <fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/>​</fo:inline>
9930
10056
  </xsl:otherwise>
9931
10057
  </xsl:choose>
9932
10058
 
@@ -9956,12 +10082,12 @@
9956
10082
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
9957
10083
 
9958
10084
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
9959
- <fo:block xsl:use-attribute-sets="term-name-style">
10085
+ <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
9960
10086
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
9961
10087
  </fo:block>
9962
10088
  </xsl:if>
9963
10089
 
9964
- <fo:block xsl:use-attribute-sets="preferred-term-style">
10090
+ <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
9965
10091
  <xsl:call-template name="setStyle_preferred"/>
9966
10092
  <xsl:apply-templates/>
9967
10093
  </fo:block>
@@ -10002,7 +10128,7 @@
10002
10128
  <!-- definition -->
10003
10129
  <!-- ========== -->
10004
10130
  <xsl:template match="*[local-name() = 'definition']">
10005
- <fo:block xsl:use-attribute-sets="definition-style">
10131
+ <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
10006
10132
  <xsl:apply-templates/>
10007
10133
  </fo:block>
10008
10134
  </xsl:template>
@@ -10050,6 +10176,10 @@
10050
10176
 
10051
10177
  <xsl:template match="*[local-name() = 'clause']">
10052
10178
  <fo:block>
10179
+ <xsl:if test="parent::*[local-name() = 'copyright-statement']">
10180
+ <xsl:attribute name="role">SKIP</xsl:attribute>
10181
+ </xsl:if>
10182
+
10053
10183
  <xsl:call-template name="setId"/>
10054
10184
 
10055
10185
  <xsl:call-template name="setBlockSpanAll"/>
@@ -10169,7 +10299,48 @@
10169
10299
  </xsl:choose>
10170
10300
  </xsl:when>
10171
10301
  <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
10172
- <xsl:value-of select="@label"/>
10302
+
10303
+ <xsl:variable name="label">
10304
+
10305
+ <xsl:variable name="type" select="../@type"/>
10306
+
10307
+ <xsl:variable name="style_prefix_">
10308
+ <xsl:if test="$type = 'roman'">
10309
+ <!-- Example: (i) -->
10310
+ </xsl:if>
10311
+ </xsl:variable>
10312
+ <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
10313
+
10314
+ <xsl:variable name="style_suffix_">
10315
+ <xsl:choose>
10316
+ <xsl:when test="$type = 'arabic'">
10317
+ .
10318
+ </xsl:when>
10319
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
10320
+ )
10321
+ </xsl:when>
10322
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
10323
+ .
10324
+ </xsl:when>
10325
+ <xsl:when test="$type = 'roman'">
10326
+ )
10327
+ </xsl:when>
10328
+ <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
10329
+ </xsl:choose>
10330
+ </xsl:variable>
10331
+ <xsl:variable name="style_suffix" select="normalize-space($style_suffix_)"/>
10332
+
10333
+ <xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
10334
+ <xsl:value-of select="$style_prefix"/>
10335
+ </xsl:if>
10336
+ <xsl:value-of select="@label"/>
10337
+ <xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
10338
+ <xsl:value-of select="$style_suffix"/>
10339
+ </xsl:if>
10340
+ </xsl:variable>
10341
+
10342
+ <xsl:value-of select="normalize-space($label)"/>
10343
+
10173
10344
  </xsl:when>
10174
10345
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
10175
10346
 
@@ -10251,7 +10422,7 @@
10251
10422
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
10252
10423
  <xsl:choose>
10253
10424
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
10254
- <fo:block-container>
10425
+ <fo:block-container role="SKIP">
10255
10426
  <xsl:attribute name="margin-left">
10256
10427
  <xsl:choose>
10257
10428
  <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
@@ -10261,7 +10432,7 @@
10261
10432
 
10262
10433
  <xsl:call-template name="refine_list_container_style"/>
10263
10434
 
10264
- <fo:block-container margin-left="0mm">
10435
+ <fo:block-container margin-left="0mm" role="SKIP">
10265
10436
  <fo:block>
10266
10437
  <xsl:apply-templates select="." mode="list"/>
10267
10438
  </fo:block>
@@ -10270,7 +10441,7 @@
10270
10441
  </xsl:when>
10271
10442
  <xsl:otherwise>
10272
10443
 
10273
- <fo:block>
10444
+ <fo:block role="SKIP">
10274
10445
  <xsl:apply-templates select="." mode="list"/>
10275
10446
  </fo:block>
10276
10447
 
@@ -10362,7 +10533,7 @@
10362
10533
  <xsl:call-template name="refine_list-item-style"/>
10363
10534
 
10364
10535
  <fo:list-item-label end-indent="label-end()">
10365
- <fo:block xsl:use-attribute-sets="list-item-label-style">
10536
+ <fo:block xsl:use-attribute-sets="list-item-label-style" role="SKIP">
10366
10537
 
10367
10538
  <xsl:call-template name="refine_list-item-label-style"/>
10368
10539
 
@@ -10376,7 +10547,7 @@
10376
10547
  </fo:block>
10377
10548
  </fo:list-item-label>
10378
10549
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
10379
- <fo:block>
10550
+ <fo:block role="SKIP">
10380
10551
 
10381
10552
  <xsl:call-template name="refine_list-item-body-style"/>
10382
10553
 
@@ -10655,10 +10826,10 @@
10655
10826
  <fo:table-body>
10656
10827
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
10657
10828
 
10658
- <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
10659
- <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
10660
- <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
10661
- <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
10829
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
10830
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
10831
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
10832
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Pages</fo:block></fo:table-cell>
10662
10833
  </fo:table-row>
10663
10834
  <xsl:apply-templates/>
10664
10835
  </fo:table-body>
@@ -10673,7 +10844,7 @@
10673
10844
 
10674
10845
  <xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
10675
10846
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
10676
- <fo:block><xsl:apply-templates/></fo:block>
10847
+ <fo:block role="SKIP"><xsl:apply-templates/></fo:block>
10677
10848
  </fo:table-cell>
10678
10849
  </xsl:template>
10679
10850
  <!-- ============ -->
@@ -10688,7 +10859,10 @@
10688
10859
  <!-- Reference sections (Normative References and Bibliography) -->
10689
10860
  <!-- ========================================================== -->
10690
10861
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
10691
- <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/>
10862
+ <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
10863
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
10864
+
10865
+ </xsl:template>
10692
10866
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
10693
10867
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
10694
10868
 
@@ -10737,15 +10911,15 @@
10737
10911
 
10738
10912
  <!-- Bibliography (non-normative references) -->
10739
10913
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
10740
-
10914
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
10741
10915
  <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
10742
10916
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
10743
10917
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
10744
10918
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
10745
10919
  <fo:list-item>
10746
10920
  <fo:list-item-label end-indent="label-end()">
10747
- <fo:block>
10748
- <fo:inline>
10921
+ <fo:block role="SKIP">
10922
+ <fo:inline role="SKIP">
10749
10923
 
10750
10924
  <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
10751
10925
  <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
@@ -10754,7 +10928,7 @@
10754
10928
  </fo:block>
10755
10929
  </fo:list-item-label>
10756
10930
  <fo:list-item-body start-indent="body-start()">
10757
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style">
10931
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
10758
10932
  <xsl:call-template name="processBibitem">
10759
10933
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
10760
10934
  </xsl:call-template>
@@ -10765,6 +10939,35 @@
10765
10939
 
10766
10940
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
10767
10941
 
10942
+ <xsl:template name="insertListItem_Bibitem">
10943
+ <xsl:choose>
10944
+ <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
10945
+ <xsl:otherwise>
10946
+ <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
10947
+ <fo:list-item-label end-indent="label-end()">
10948
+ <fo:block role="SKIP">
10949
+ <fo:inline role="SKIP">
10950
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
10951
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
10952
+ </xsl:apply-templates>
10953
+ </fo:inline>
10954
+ </fo:block>
10955
+ </fo:list-item-label>
10956
+ <fo:list-item-body start-indent="body-start()">
10957
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
10958
+ <xsl:call-template name="processBibitem">
10959
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
10960
+ </xsl:call-template>
10961
+ </fo:block>
10962
+ </fo:list-item-body>
10963
+ </fo:list-item>
10964
+ </xsl:otherwise>
10965
+ </xsl:choose>
10966
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
10967
+ <xsl:with-param name="skip">false</xsl:with-param>
10968
+ </xsl:apply-templates>
10969
+ </xsl:template>
10970
+
10768
10971
  <xsl:template name="processBibitem">
10769
10972
  <xsl:param name="biblio_tag_part">both</xsl:param>
10770
10973
 
@@ -10981,7 +11184,7 @@
10981
11184
  <xsl:for-each select="*[local-name() = 'tab']">
10982
11185
  <xsl:variable name="current_id" select="generate-id()"/>
10983
11186
  <fo:table-cell>
10984
- <fo:block line-height-shift-adjustment="disregard-shifts">
11187
+ <fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
10985
11188
  <xsl:call-template name="insert_basic_link">
10986
11189
  <xsl:with-param name="element">
10987
11190
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -10999,7 +11202,7 @@
10999
11202
  </xsl:for-each>
11000
11203
  <!-- last column - for page numbers -->
11001
11204
  <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
11002
- <fo:block>
11205
+ <fo:block role="SKIP">
11003
11206
  <xsl:call-template name="insert_basic_link">
11004
11207
  <xsl:with-param name="element">
11005
11208
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">