metanorma-itu 2.2.12 → 2.2.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -363,6 +363,9 @@
363
363
  <fo:page-sequence master-reference="SP-first-page" force-page-count="no-force">
364
364
  <fo:flow flow-name="xsl-region-body">
365
365
  <fo:block font-size="10pt" font-style="italic" text-align="center">
366
+ <xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
367
+ <xsl:attribute name="font-style">normal</xsl:attribute>
368
+ </xsl:if>
366
369
  <fo:block>
367
370
  <xsl:call-template name="getLocalizedString">
368
371
  <xsl:with-param name="key">annex_to_itu_ob</xsl:with-param>
@@ -1095,6 +1098,9 @@
1095
1098
  <xsl:variable name="subtitle" select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'subtitle' and @language = $lang]"/>
1096
1099
  <xsl:if test="$subtitle != ''">
1097
1100
  <fo:block margin-top="18pt" font-weight="normal" font-style="italic">
1101
+ <xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
1102
+ <xsl:attribute name="font-style">normal</xsl:attribute>
1103
+ </xsl:if>
1098
1104
  <xsl:value-of select="$subtitle"/>
1099
1105
  </fo:block>
1100
1106
  </xsl:if>
@@ -1103,6 +1109,9 @@
1103
1109
  <xsl:if test="$doctype = 'resolution' and $resolution-placedate != ''">
1104
1110
  <fo:block font-size="11pt" margin-top="6pt" font-weight="normal">
1105
1111
  <fo:inline font-style="italic">
1112
+ <xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
1113
+ <xsl:attribute name="font-style">normal</xsl:attribute>
1114
+ </xsl:if>
1106
1115
  <xsl:text>(</xsl:text><xsl:value-of select="$resolution-placedate"/><xsl:text>)</xsl:text>
1107
1116
  </fo:inline>
1108
1117
  <xsl:apply-templates select="/itu:itu-standard/itu:bibdata/itu:note[@type = 'title-footnote']" mode="title_footnote"/>
@@ -1483,6 +1492,9 @@
1483
1492
 
1484
1493
  <xsl:template match="itu:clause[@id='draft-warning']/itu:title" mode="caution">
1485
1494
  <fo:block font-size="16pt" font-family="Times New Roman" font-style="italic" font-weight="bold" text-align="center" space-after="6pt" role="H1">
1495
+ <xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
1496
+ <xsl:attribute name="font-style">normal</xsl:attribute>
1497
+ </xsl:if>
1486
1498
  <xsl:apply-templates/>
1487
1499
  <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
1488
1500
  </fo:block>
@@ -3098,6 +3110,7 @@
3098
3110
  </xsl:attribute-set>
3099
3111
 
3100
3112
  <xsl:attribute-set name="figure-block-style">
3113
+ <xsl:attribute name="role">SKIP</xsl:attribute>
3101
3114
 
3102
3115
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3103
3116
 
@@ -3108,6 +3121,7 @@
3108
3121
  </xsl:attribute-set>
3109
3122
 
3110
3123
  <xsl:attribute-set name="figure-name-style">
3124
+ <xsl:attribute name="role">Caption</xsl:attribute>
3111
3125
 
3112
3126
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3113
3127
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -3153,7 +3167,12 @@
3153
3167
  </xsl:attribute-set> <!-- formula-stem-number-style -->
3154
3168
  <!-- End Formula's styles -->
3155
3169
 
3170
+ <xsl:template name="refine_formula-stem-number-style">
3171
+
3172
+ </xsl:template>
3173
+
3156
3174
  <xsl:attribute-set name="image-style">
3175
+ <xsl:attribute name="role">SKIP</xsl:attribute>
3157
3176
  <xsl:attribute name="text-align">center</xsl:attribute>
3158
3177
 
3159
3178
  </xsl:attribute-set>
@@ -3426,6 +3445,11 @@
3426
3445
 
3427
3446
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
3428
3447
 
3448
+ <xsl:attribute-set name="bibitem-non-normative-list-item-style">
3449
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3450
+
3451
+ </xsl:attribute-set>
3452
+
3429
3453
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
3430
3454
  <xsl:attribute-set name="bibitem-normative-list-body-style">
3431
3455
 
@@ -3653,13 +3677,13 @@
3653
3677
 
3654
3678
  <xsl:template name="processPrefaceSectionsDefault_Contents">
3655
3679
  <xsl:variable name="nodes_preface_">
3656
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
3680
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
3657
3681
  <node id="{@id}"/>
3658
3682
  </xsl:for-each>
3659
3683
  </xsl:variable>
3660
3684
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
3661
3685
 
3662
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
3686
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
3663
3687
  <xsl:sort select="@displayorder" data-type="number"/>
3664
3688
 
3665
3689
  <!-- process Section's title -->
@@ -3693,12 +3717,12 @@
3693
3717
  <xsl:apply-templates select="." mode="contents"/>
3694
3718
  </xsl:for-each>
3695
3719
 
3696
- <xsl:for-each select="/*/*[local-name()='annex']">
3720
+ <!-- <xsl:for-each select="/*/*[local-name()='annex']">
3697
3721
  <xsl:sort select="@displayorder" data-type="number"/>
3698
3722
  <xsl:apply-templates select="." mode="contents"/>
3699
- </xsl:for-each>
3723
+ </xsl:for-each> -->
3700
3724
 
3701
- <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]">
3725
+ <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]">
3702
3726
  <xsl:sort select="@displayorder" data-type="number"/>
3703
3727
  <xsl:apply-templates select="." mode="contents"/>
3704
3728
  </xsl:for-each>
@@ -3828,14 +3852,14 @@
3828
3852
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
3829
3853
  </xsl:when>
3830
3854
  <xsl:otherwise>
3831
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
3855
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
3832
3856
  </xsl:otherwise>
3833
3857
  </xsl:choose>
3834
3858
  </xsl:for-each>
3835
3859
  </xsl:when>
3836
3860
 
3837
3861
  <xsl:otherwise>
3838
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
3862
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
3839
3863
  </xsl:otherwise>
3840
3864
 
3841
3865
  </xsl:choose>
@@ -3845,7 +3869,7 @@
3845
3869
  <!-- Preface boilerplate sections processing -->
3846
3870
  <!-- ================================= -->
3847
3871
  <xsl:template match="*[local-name()='copyright-statement']">
3848
- <fo:block xsl:use-attribute-sets="copyright-statement-style">
3872
+ <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
3849
3873
  <xsl:apply-templates/>
3850
3874
  </fo:block>
3851
3875
  </xsl:template> <!-- copyright-statement -->
@@ -4028,7 +4052,7 @@
4028
4052
  </xsl:choose>
4029
4053
  </xsl:variable>
4030
4054
 
4031
- <fo:block-container xsl:use-attribute-sets="table-container-style">
4055
+ <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
4032
4056
 
4033
4057
  <xsl:call-template name="refine_table-container-style">
4034
4058
  <xsl:with-param name="margin-side" select="$margin-side"/>
@@ -4166,7 +4190,7 @@
4166
4190
  <fo:table-row>
4167
4191
  <fo:table-cell column-number="2">
4168
4192
  <xsl:copy-of select="$table-preamble"/>
4169
- <fo:block>
4193
+ <fo:block role="SKIP">
4170
4194
  <xsl:call-template name="setTrackChangesStyles">
4171
4195
  <xsl:with-param name="isAdded" select="$isAdded"/>
4172
4196
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
@@ -4209,7 +4233,7 @@
4209
4233
  <xsl:param name="continued"/>
4210
4234
  <xsl:if test="normalize-space() != ''">
4211
4235
 
4212
- <fo:block xsl:use-attribute-sets="table-name-style">
4236
+ <fo:block xsl:use-attribute-sets="table-name-style" role="SKIP">
4213
4237
 
4214
4238
  <xsl:call-template name="refine_table-name-style">
4215
4239
  <xsl:with-param name="continued" select="$continued"/>
@@ -4594,8 +4618,8 @@
4594
4618
  <xsl:template name="table-header-title">
4595
4619
  <xsl:param name="cols-count"/>
4596
4620
  <!-- row for title -->
4597
- <fo:table-row>
4598
- <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">
4621
+ <fo:table-row role="SKIP">
4622
+ <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">
4599
4623
 
4600
4624
  <xsl:call-template name="refine_table-header-title-style"/>
4601
4625
 
@@ -4604,7 +4628,7 @@
4604
4628
  </xsl:apply-templates>
4605
4629
 
4606
4630
  <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
4607
- <fo:block/>
4631
+ <fo:block role="SKIP"/>
4608
4632
  </xsl:if>
4609
4633
 
4610
4634
  </fo:table-cell>
@@ -4712,7 +4736,7 @@
4712
4736
  <!-- fn will be processed inside 'note' processing -->
4713
4737
 
4714
4738
  <xsl:if test="$doctype = 'service-publication'">
4715
- <fo:block margin-top="7pt" margin-bottom="2pt"><fo:inline>____________</fo:inline></fo:block>
4739
+ <fo:block margin-top="7pt" margin-bottom="2pt" role="SKIP"><fo:inline>____________</fo:inline></fo:block>
4716
4740
  </xsl:if>
4717
4741
 
4718
4742
  <!-- for BSI (not PAS) display Notes before footnotes -->
@@ -4929,7 +4953,7 @@
4929
4953
 
4930
4954
  <xsl:call-template name="refine_table-header-cell-style"/>
4931
4955
 
4932
- <fo:block>
4956
+ <fo:block role="SKIP">
4933
4957
  <xsl:apply-templates/>
4934
4958
  </fo:block>
4935
4959
  </fo:table-cell>
@@ -4982,7 +5006,7 @@
4982
5006
  <xsl:attribute name="text-align">left</xsl:attribute>
4983
5007
  </xsl:if>
4984
5008
 
4985
- <fo:block>
5009
+ <fo:block role="SKIP">
4986
5010
 
4987
5011
  <xsl:if test="$isGenerateTableIF = 'true'">
4988
5012
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -5075,7 +5099,7 @@
5075
5099
  </xsl:choose>
5076
5100
  </xsl:variable>
5077
5101
  <xsl:variable name="footnote_inline">
5078
- <fo:inline>
5102
+ <fo:inline role="Reference">
5079
5103
 
5080
5104
  <xsl:variable name="fn_styles">
5081
5105
  <xsl:choose>
@@ -5098,7 +5122,7 @@
5098
5122
 
5099
5123
  <xsl:call-template name="insert_basic_link">
5100
5124
  <xsl:with-param name="element">
5101
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
5125
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
5102
5126
  <xsl:copy-of select="$current_fn_number_text"/>
5103
5127
  </fo:basic-link>
5104
5128
  </xsl:with-param>
@@ -5111,17 +5135,17 @@
5111
5135
  <xsl:copy-of select="$footnote_inline"/>
5112
5136
  </xsl:when>
5113
5137
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
5114
- <fo:footnote xsl:use-attribute-sets="fn-style">
5138
+ <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
5115
5139
  <xsl:copy-of select="$footnote_inline"/>
5116
- <fo:footnote-body>
5140
+ <fo:footnote-body role="Note">
5117
5141
 
5118
- <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
5142
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
5119
5143
 
5120
- <fo:block xsl:use-attribute-sets="fn-body-style">
5144
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
5121
5145
 
5122
5146
  <xsl:call-template name="refine_fn-body-style"/>
5123
5147
 
5124
- <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
5148
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
5125
5149
 
5126
5150
  <xsl:call-template name="refine_fn-body-num-style"/>
5127
5151
 
@@ -5389,11 +5413,11 @@
5389
5413
  </xsl:template>
5390
5414
 
5391
5415
  <xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
5392
- <fo:inline><xsl:value-of select="."/></fo:inline>
5416
+ <fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
5393
5417
  </xsl:template>
5394
5418
 
5395
5419
  <xsl:template match="*[local-name()='fn']//*[local-name()='p']">
5396
- <fo:inline>
5420
+ <fo:inline role="P">
5397
5421
  <xsl:apply-templates/>
5398
5422
  </fo:inline>
5399
5423
  </xsl:template>
@@ -5408,7 +5432,7 @@
5408
5432
  <xsl:variable name="isAdded" select="@added"/>
5409
5433
  <xsl:variable name="isDeleted" select="@deleted"/>
5410
5434
  <!-- <dl><xsl:copy-of select="."/></dl> -->
5411
- <fo:block-container xsl:use-attribute-sets="dl-block-style">
5435
+ <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
5412
5436
 
5413
5437
  <xsl:call-template name="setBlockSpanAll"/>
5414
5438
 
@@ -5443,7 +5467,7 @@
5443
5467
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
5444
5468
  </xsl:call-template>
5445
5469
 
5446
- <fo:block-container margin-left="0mm">
5470
+ <fo:block-container margin-left="0mm" role="SKIP">
5447
5471
 
5448
5472
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
5449
5473
 
@@ -5508,7 +5532,7 @@
5508
5532
 
5509
5533
  <!-- a few components -->
5510
5534
  <xsl:if test="$onlyOneComponent = 'false'">
5511
- <fo:block>
5535
+ <fo:block role="SKIP">
5512
5536
 
5513
5537
  <xsl:call-template name="refine_multicomponent_style"/>
5514
5538
 
@@ -5516,7 +5540,7 @@
5516
5540
  <xsl:attribute name="margin-top">0</xsl:attribute>
5517
5541
  </xsl:if>
5518
5542
 
5519
- <fo:block>
5543
+ <fo:block role="SKIP">
5520
5544
 
5521
5545
  <xsl:call-template name="refine_multicomponent_block_style"/>
5522
5546
 
@@ -5857,7 +5881,7 @@
5857
5881
  -->
5858
5882
  <fo:table-row>
5859
5883
  <fo:table-cell number-columns-spanned="2">
5860
- <fo:block>
5884
+ <fo:block role="SKIP">
5861
5885
  <xsl:call-template name="note"/>
5862
5886
  </fo:block>
5863
5887
  </fo:table-cell>
@@ -5922,7 +5946,7 @@
5922
5946
 
5923
5947
  <xsl:call-template name="refine_dt-cell-style"/>
5924
5948
 
5925
- <fo:block xsl:use-attribute-sets="dt-block-style">
5949
+ <fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
5926
5950
  <xsl:copy-of select="@id"/>
5927
5951
 
5928
5952
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -5952,7 +5976,7 @@
5952
5976
 
5953
5977
  <xsl:call-template name="refine_dd-cell-style"/>
5954
5978
 
5955
- <fo:block>
5979
+ <fo:block role="SKIP">
5956
5980
 
5957
5981
  <xsl:if test="$isGenerateTableIF = 'true'">
5958
5982
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -6103,6 +6127,10 @@
6103
6127
 
6104
6128
  <xsl:template name="refine_italic_style">
6105
6129
 
6130
+ <xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
6131
+ <xsl:attribute name="font-style">normal</xsl:attribute>
6132
+ </xsl:if>
6133
+
6106
6134
  </xsl:template>
6107
6135
 
6108
6136
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
@@ -6119,6 +6147,9 @@
6119
6147
 
6120
6148
  <xsl:template name="refine_strong_style">
6121
6149
 
6150
+ <xsl:if test="ancestor::*['preferred']">
6151
+ <xsl:attribute name="role">SKIP</xsl:attribute>
6152
+ </xsl:if>
6122
6153
  </xsl:template>
6123
6154
 
6124
6155
  <xsl:template match="*[local-name()='padding']">
@@ -6327,11 +6358,41 @@
6327
6358
 
6328
6359
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
6329
6360
  <xsl:variable name="text" select="normalize-space(.)"/>
6330
- <fo:inline font-size="75%">
6361
+ <fo:inline font-size="75%" role="SKIP">
6331
6362
  <xsl:if test="string-length($text) &gt; 0">
6332
- <xsl:call-template name="recursiveSmallCaps">
6333
- <xsl:with-param name="text" select="$text"/>
6334
- </xsl:call-template>
6363
+ <xsl:variable name="smallCapsText">
6364
+ <xsl:call-template name="recursiveSmallCaps">
6365
+ <xsl:with-param name="text" select="$text"/>
6366
+ </xsl:call-template>
6367
+ </xsl:variable>
6368
+ <!-- merge neighboring fo:inline -->
6369
+ <xsl:for-each select="xalan:nodeset($smallCapsText)/node()">
6370
+ <xsl:choose>
6371
+ <xsl:when test="self::fo:inline and preceding-sibling::node()[1][self::fo:inline]"><!-- <xsl:copy-of select="."/> --></xsl:when>
6372
+ <xsl:when test="self::fo:inline and @font-size">
6373
+ <xsl:variable name="curr_pos" select="count(preceding-sibling::node()) + 1"/>
6374
+ <!-- <curr_pos><xsl:value-of select="$curr_pos"/></curr_pos> -->
6375
+ <xsl:variable name="next_text_" select="count(following-sibling::node()[not(local-name() = 'inline')][1]/preceding-sibling::node())"/>
6376
+ <xsl:variable name="next_text">
6377
+ <xsl:choose>
6378
+ <xsl:when test="$next_text_ = 0">99999999</xsl:when>
6379
+ <xsl:otherwise><xsl:value-of select="$next_text_ + 1"/></xsl:otherwise>
6380
+ </xsl:choose>
6381
+ </xsl:variable>
6382
+ <!-- <next_text><xsl:value-of select="$next_text"/></next_text> -->
6383
+ <fo:inline>
6384
+ <xsl:copy-of select="@*"/>
6385
+ <xsl:copy-of select="./node()"/>
6386
+ <xsl:for-each select="following-sibling::node()[position() &lt; $next_text - $curr_pos]"> <!-- [self::fo:inline] -->
6387
+ <xsl:copy-of select="./node()"/>
6388
+ </xsl:for-each>
6389
+ </fo:inline>
6390
+ </xsl:when>
6391
+ <xsl:otherwise>
6392
+ <xsl:copy-of select="."/>
6393
+ </xsl:otherwise>
6394
+ </xsl:choose>
6395
+ </xsl:for-each>
6335
6396
  </xsl:if>
6336
6397
  </fo:inline>
6337
6398
  </xsl:template>
@@ -6343,7 +6404,7 @@
6343
6404
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
6344
6405
  <xsl:choose>
6345
6406
  <xsl:when test="$char=$upperCase">
6346
- <fo:inline font-size="{100 div 0.75}%">
6407
+ <fo:inline font-size="{100 div 0.75}%" role="SKIP">
6347
6408
  <xsl:value-of select="$upperCase"/>
6348
6409
  </fo:inline>
6349
6410
  </xsl:when>
@@ -6505,6 +6566,10 @@
6505
6566
 
6506
6567
  <xsl:when test="not(contains($text, $separator))">
6507
6568
  <word>
6569
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
6570
+ <xsl:text>
6571
+  </xsl:text> <!-- to add distance between dt and dd -->
6572
+ </xsl:if>
6508
6573
  <xsl:call-template name="enclose_text_in_tags">
6509
6574
  <xsl:with-param name="text" select="normalize-space($text)"/>
6510
6575
  <xsl:with-param name="tags" select="$tags"/>
@@ -6513,6 +6578,10 @@
6513
6578
  </xsl:when>
6514
6579
  <xsl:otherwise>
6515
6580
  <word>
6581
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
6582
+ <xsl:text>
6583
+  </xsl:text> <!-- to add distance between dt and dd -->
6584
+ </xsl:if>
6516
6585
  <xsl:call-template name="enclose_text_in_tags">
6517
6586
  <xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
6518
6587
  <xsl:with-param name="tags" select="$tags"/>
@@ -6696,6 +6765,10 @@
6696
6765
  <xsl:template name="getSimpleTable">
6697
6766
  <xsl:param name="id"/>
6698
6767
 
6768
+ <!-- <test0>
6769
+ <xsl:copy-of select="."/>
6770
+ </test0> -->
6771
+
6699
6772
  <xsl:variable name="simple-table">
6700
6773
 
6701
6774
  <!-- Step 0. replace <br/> to <p>...</p> -->
@@ -7008,6 +7081,18 @@
7008
7081
  </xsl:copy>
7009
7082
  </xsl:template>
7010
7083
 
7084
+ <xsl:variable name="font_main_root_style">
7085
+ <root-style xsl:use-attribute-sets="root-style">
7086
+ </root-style>
7087
+ </xsl:variable>
7088
+ <xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
7089
+ <xsl:variable name="font_main">
7090
+ <xsl:choose>
7091
+ <xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
7092
+ <xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
7093
+ </xsl:choose>
7094
+ </xsl:variable>
7095
+
7011
7096
  <xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
7012
7097
  <xsl:param name="id"/>
7013
7098
  <xsl:copy>
@@ -7046,6 +7131,33 @@
7046
7131
 
7047
7132
  <!-- td_text='<xsl:copy-of select="$td_text"/>' -->
7048
7133
 
7134
+ <xsl:variable name="words_with_width">
7135
+ <!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
7136
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
7137
+ <xsl:copy>
7138
+ <xsl:copy-of select="@*"/>
7139
+ <xsl:attribute name="width">
7140
+ <xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
7141
+ </xsl:attribute>
7142
+ <xsl:copy-of select="node()"/>
7143
+ </xsl:copy>
7144
+ </xsl:for-each>
7145
+ </xsl:variable>
7146
+
7147
+ <xsl:variable name="words_with_width_sorted">
7148
+ <xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
7149
+ <xsl:sort select="@width" data-type="number" order="descending"/>
7150
+ <!-- select word maximal width only -->
7151
+ <xsl:if test="position() = 1">
7152
+ <xsl:copy-of select="."/>
7153
+ </xsl:if>
7154
+ </xsl:for-each>
7155
+ <!-- add 'word' with formatting tags inside -->
7156
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
7157
+ <xsl:copy-of select="."/>
7158
+ </xsl:for-each>
7159
+ </xsl:variable>
7160
+
7049
7161
  <xsl:variable name="words">
7050
7162
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
7051
7163
  <word>
@@ -7053,9 +7165,12 @@
7053
7165
  </word>
7054
7166
  </xsl:for-each>
7055
7167
 
7056
- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
7168
+ <xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
7057
7169
  <xsl:copy-of select="."/>
7058
7170
  </xsl:for-each>
7171
+ <!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
7172
+ <xsl:copy-of select="."/>
7173
+ </xsl:for-each> -->
7059
7174
 
7060
7175
  </xsl:variable>
7061
7176
 
@@ -7516,10 +7631,10 @@
7516
7631
  <xsl:copy>
7517
7632
  <xsl:apply-templates select="@*" mode="mathml"/>
7518
7633
  <xsl:if test="not(@lspace)">
7519
- <xsl:attribute name="lspace">0.4em</xsl:attribute>
7634
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7520
7635
  </xsl:if>
7521
- <xsl:if test="not(@rspace)">
7522
- <xsl:attribute name="rspace">0.4em</xsl:attribute>
7636
+ <xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
7637
+ <xsl:attribute name="rspace">0.2em</xsl:attribute>
7523
7638
  </xsl:if>
7524
7639
  <xsl:apply-templates mode="mathml"/>
7525
7640
  </xsl:copy>
@@ -7536,6 +7651,27 @@
7536
7651
  </xsl:copy>
7537
7652
  </xsl:template>
7538
7653
 
7654
+ <!-- increase space before '(' -->
7655
+ <xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
7656
+ <xsl:copy>
7657
+ <xsl:apply-templates select="@*" mode="mathml"/>
7658
+ <xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
7659
+ <xsl:if test="not(@lspace)">
7660
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
7661
+ <xsl:choose>
7662
+ <xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
7663
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7664
+ </xsl:when>
7665
+ <xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
7666
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7667
+ </xsl:when>
7668
+ </xsl:choose>
7669
+ </xsl:if>
7670
+ </xsl:if>
7671
+ <xsl:apply-templates mode="mathml"/>
7672
+ </xsl:copy>
7673
+ </xsl:template>
7674
+
7539
7675
  <!-- Examples:
7540
7676
  <stem type="AsciiMath">x = 1</stem>
7541
7677
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -7695,7 +7831,7 @@
7695
7831
  <!-- formula -->
7696
7832
  <!-- ====== -->
7697
7833
  <xsl:template match="*[local-name() = 'formula']" name="formula">
7698
- <fo:block-container margin-left="0mm">
7834
+ <fo:block-container margin-left="0mm" role="SKIP">
7699
7835
  <xsl:if test="parent::*[local-name() = 'note']">
7700
7836
  <xsl:attribute name="margin-left">
7701
7837
  <xsl:choose>
@@ -7705,7 +7841,7 @@
7705
7841
  </xsl:attribute>
7706
7842
 
7707
7843
  </xsl:if>
7708
- <fo:block-container margin-left="0mm">
7844
+ <fo:block-container margin-left="0mm" role="SKIP">
7709
7845
  <fo:block id="{@id}">
7710
7846
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
7711
7847
  </fo:block>
@@ -7741,7 +7877,7 @@
7741
7877
  <fo:table-body>
7742
7878
  <fo:table-row>
7743
7879
  <fo:table-cell display-align="center">
7744
- <fo:block xsl:use-attribute-sets="formula-stem-block-style">
7880
+ <fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
7745
7881
 
7746
7882
  <xsl:call-template name="refine_formula-stem-block-style"/>
7747
7883
 
@@ -7749,7 +7885,10 @@
7749
7885
  </fo:block>
7750
7886
  </fo:table-cell>
7751
7887
  <fo:table-cell display-align="center">
7752
- <fo:block xsl:use-attribute-sets="formula-stem-number-style">
7888
+ <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
7889
+
7890
+ <xsl:call-template name="refine_formula-stem-number-style"/>
7891
+
7753
7892
  <xsl:apply-templates select="../*[local-name() = 'name']"/>
7754
7893
  </fo:block>
7755
7894
  </fo:table-cell>
@@ -7782,13 +7921,13 @@
7782
7921
 
7783
7922
  <xsl:template match="*[local-name() = 'note']" name="note">
7784
7923
 
7785
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
7924
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7786
7925
 
7787
7926
  <xsl:call-template name="setBlockSpanAll"/>
7788
7927
 
7789
7928
  <xsl:call-template name="refine_note-style"/>
7790
7929
 
7791
- <fo:block-container margin-left="0mm" margin-right="0mm">
7930
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7792
7931
 
7793
7932
  <fo:block>
7794
7933
 
@@ -7958,12 +8097,13 @@
7958
8097
 
7959
8098
  <xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
7960
8099
  <xsl:if test="normalize-space() != ''">
7961
- <xsl:variable name="level">
8100
+ <!-- <xsl:variable name="level">
7962
8101
  <xsl:call-template name="getLevelTermName"/>
7963
8102
  </xsl:variable>
7964
8103
  <fo:inline role="H{$level}">
7965
- <xsl:apply-templates/>
7966
- </fo:inline>
8104
+ <xsl:apply-templates />
8105
+ </fo:inline> -->
8106
+ <xsl:apply-templates/>
7967
8107
  </xsl:if>
7968
8108
  </xsl:template>
7969
8109
  <!-- ====== -->
@@ -7987,7 +8127,7 @@
7987
8127
  <!-- Example: Dimensions in millimeters -->
7988
8128
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
7989
8129
 
7990
- <fo:block xsl:use-attribute-sets="figure-style">
8130
+ <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
7991
8131
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
7992
8132
  </fo:block>
7993
8133
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
@@ -9122,7 +9262,7 @@
9122
9262
  </xsl:when>
9123
9263
 
9124
9264
  <xsl:otherwise>
9125
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
9265
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
9126
9266
 
9127
9267
  <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
9128
9268
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -9143,7 +9283,7 @@
9143
9283
  </xsl:attribute>
9144
9284
 
9145
9285
  </xsl:if>
9146
- <fo:block-container margin-left="0mm">
9286
+ <fo:block-container margin-left="0mm" role="SKIP">
9147
9287
 
9148
9288
  <fo:block xsl:use-attribute-sets="sourcecode-style">
9149
9289
 
@@ -9267,7 +9407,7 @@
9267
9407
  <!-- second td with sourcecode -->
9268
9408
  <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'] -->
9269
9409
  <fo:table-cell>
9270
- <fo:block>
9410
+ <fo:block role="SKIP">
9271
9411
  <xsl:apply-templates/>
9272
9412
  </fo:block>
9273
9413
  </fo:table-cell>
@@ -9689,11 +9829,11 @@
9689
9829
  <!-- requirement, recommendation, permission table -->
9690
9830
  <!-- ========== -->
9691
9831
  <xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9692
- <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
9832
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
9693
9833
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9694
9834
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
9695
9835
  </xsl:if>
9696
- <fo:block-container margin-left="0mm" margin-right="0mm">
9836
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9697
9837
  <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
9698
9838
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9699
9839
  <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
@@ -9754,7 +9894,7 @@
9754
9894
 
9755
9895
  <xsl:call-template name="setTableCellAttributes"/>
9756
9896
 
9757
- <fo:block>
9897
+ <fo:block role="SKIP">
9758
9898
  <xsl:apply-templates/>
9759
9899
  </fo:block>
9760
9900
  </fo:table-cell>
@@ -9776,7 +9916,7 @@
9776
9916
 
9777
9917
  <xsl:call-template name="setTableCellAttributes"/>
9778
9918
 
9779
- <fo:block>
9919
+ <fo:block role="SKIP">
9780
9920
  <xsl:apply-templates/>
9781
9921
  </fo:block>
9782
9922
  </fo:table-cell>
@@ -9855,7 +9995,7 @@
9855
9995
  -->
9856
9996
  <xsl:template match="*[local-name() = 'example']">
9857
9997
 
9858
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
9998
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
9859
9999
 
9860
10000
  <xsl:call-template name="setBlockSpanAll"/>
9861
10001
 
@@ -9866,7 +10006,7 @@
9866
10006
  block
9867
10007
  </xsl:variable>
9868
10008
 
9869
- <fo:block-container margin-left="0mm">
10009
+ <fo:block-container margin-left="0mm" role="SKIP">
9870
10010
 
9871
10011
  <xsl:choose>
9872
10012
 
@@ -9879,8 +10019,8 @@
9879
10019
  </xsl:apply-templates>
9880
10020
  </fo:block>
9881
10021
 
9882
- <fo:block-container xsl:use-attribute-sets="example-body-style">
9883
- <fo:block-container margin-left="0mm" margin-right="0mm">
10022
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
10023
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9884
10024
  <xsl:apply-templates select="node()[not(local-name() = 'name')]">
9885
10025
  <xsl:with-param name="fo_element" select="$fo_element"/>
9886
10026
  </xsl:apply-templates>
@@ -9933,8 +10073,8 @@
9933
10073
 
9934
10074
  <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
9935
10075
  <!-- display further elements in blocks -->
9936
- <fo:block-container xsl:use-attribute-sets="example-body-style">
9937
- <fo:block-container margin-left="0mm" margin-right="0mm">
10076
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
10077
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9938
10078
  <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
9939
10079
  <xsl:with-param name="fo_element" select="'block'"/>
9940
10080
  </xsl:apply-templates>
@@ -9987,7 +10127,7 @@
9987
10127
  </xsl:variable>
9988
10128
  <xsl:choose>
9989
10129
  <xsl:when test="starts-with(normalize-space($element), 'block')">
9990
- <fo:block-container>
10130
+ <fo:block-container role="SKIP">
9991
10131
  <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
9992
10132
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
9993
10133
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -10128,7 +10268,7 @@
10128
10268
  <!-- author -->
10129
10269
  <!-- ====== -->
10130
10270
  <xsl:template match="*[local-name() = 'quote']">
10131
- <fo:block-container margin-left="0mm">
10271
+ <fo:block-container margin-left="0mm" role="SKIP">
10132
10272
 
10133
10273
  <xsl:call-template name="setBlockSpanAll"/>
10134
10274
 
@@ -10138,12 +10278,12 @@
10138
10278
  </xsl:if>
10139
10279
  </xsl:if>
10140
10280
 
10141
- <fo:block-container margin-left="0mm">
10142
- <fo:block-container xsl:use-attribute-sets="quote-style">
10281
+ <fo:block-container margin-left="0mm" role="SKIP">
10282
+ <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
10143
10283
 
10144
10284
  <xsl:call-template name="refine_quote-style"/>
10145
10285
 
10146
- <fo:block-container margin-left="0mm" margin-right="0mm">
10286
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10147
10287
  <fo:block role="BlockQuote">
10148
10288
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
10149
10289
  </fo:block>
@@ -10302,10 +10442,10 @@
10302
10442
 
10303
10443
  <xsl:choose>
10304
10444
  <xsl:when test="$lang = 'zh'">
10305
- <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
10445
+ <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
10306
10446
  </xsl:when>
10307
10447
  <xsl:when test="../../@inline-header = 'true'">
10308
- <fo:inline font-size="90%">
10448
+ <fo:inline font-size="90%" role="SKIP">
10309
10449
  <xsl:call-template name="insertNonBreakSpaces">
10310
10450
  <xsl:with-param name="count" select="$padding-right"/>
10311
10451
  </xsl:call-template>
@@ -10313,7 +10453,7 @@
10313
10453
  </xsl:when>
10314
10454
  <xsl:otherwise>
10315
10455
  <xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
10316
- <fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/>​</fo:inline>
10456
+ <fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/>​</fo:inline>
10317
10457
  </xsl:otherwise>
10318
10458
  </xsl:choose>
10319
10459
 
@@ -10343,12 +10483,12 @@
10343
10483
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
10344
10484
 
10345
10485
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
10346
- <fo:block xsl:use-attribute-sets="term-name-style">
10486
+ <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
10347
10487
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
10348
10488
  </fo:block>
10349
10489
  </xsl:if>
10350
10490
 
10351
- <fo:block xsl:use-attribute-sets="preferred-term-style">
10491
+ <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
10352
10492
  <xsl:call-template name="setStyle_preferred"/>
10353
10493
  <xsl:apply-templates/>
10354
10494
  </fo:block>
@@ -10389,7 +10529,7 @@
10389
10529
  <!-- definition -->
10390
10530
  <!-- ========== -->
10391
10531
  <xsl:template match="*[local-name() = 'definition']">
10392
- <fo:block xsl:use-attribute-sets="definition-style">
10532
+ <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
10393
10533
  <xsl:apply-templates/>
10394
10534
  </fo:block>
10395
10535
  </xsl:template>
@@ -10439,6 +10579,10 @@
10439
10579
 
10440
10580
  <xsl:template match="*[local-name() = 'clause']">
10441
10581
  <fo:block>
10582
+ <xsl:if test="parent::*[local-name() = 'copyright-statement']">
10583
+ <xsl:attribute name="role">SKIP</xsl:attribute>
10584
+ </xsl:if>
10585
+
10442
10586
  <xsl:call-template name="setId"/>
10443
10587
 
10444
10588
  <xsl:call-template name="setBlockSpanAll"/>
@@ -10558,7 +10702,48 @@
10558
10702
  </xsl:choose>
10559
10703
  </xsl:when>
10560
10704
  <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
10561
- <xsl:value-of select="@label"/>
10705
+
10706
+ <xsl:variable name="label">
10707
+
10708
+ <xsl:variable name="type" select="../@type"/>
10709
+
10710
+ <xsl:variable name="style_prefix_">
10711
+ <xsl:if test="$type = 'roman'">
10712
+ <!-- Example: (i) -->
10713
+ </xsl:if>
10714
+ </xsl:variable>
10715
+ <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
10716
+
10717
+ <xsl:variable name="style_suffix_">
10718
+ <xsl:choose>
10719
+ <xsl:when test="$type = 'arabic'">
10720
+ )
10721
+ </xsl:when>
10722
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
10723
+ )
10724
+ </xsl:when>
10725
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
10726
+ .
10727
+ </xsl:when>
10728
+ <xsl:when test="$type = 'roman'">
10729
+ )
10730
+ </xsl:when>
10731
+ <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
10732
+ </xsl:choose>
10733
+ </xsl:variable>
10734
+ <xsl:variable name="style_suffix" select="normalize-space($style_suffix_)"/>
10735
+
10736
+ <xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
10737
+ <xsl:value-of select="$style_prefix"/>
10738
+ </xsl:if>
10739
+ <xsl:value-of select="@label"/>
10740
+ <xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
10741
+ <xsl:value-of select="$style_suffix"/>
10742
+ </xsl:if>
10743
+ </xsl:variable>
10744
+
10745
+ <xsl:value-of select="normalize-space($label)"/>
10746
+
10562
10747
  </xsl:when>
10563
10748
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
10564
10749
 
@@ -10640,7 +10825,7 @@
10640
10825
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
10641
10826
  <xsl:choose>
10642
10827
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
10643
- <fo:block-container>
10828
+ <fo:block-container role="SKIP">
10644
10829
  <xsl:attribute name="margin-left">
10645
10830
  <xsl:choose>
10646
10831
  <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
@@ -10650,7 +10835,7 @@
10650
10835
 
10651
10836
  <xsl:call-template name="refine_list_container_style"/>
10652
10837
 
10653
- <fo:block-container margin-left="0mm">
10838
+ <fo:block-container margin-left="0mm" role="SKIP">
10654
10839
  <fo:block>
10655
10840
  <xsl:apply-templates select="." mode="list"/>
10656
10841
  </fo:block>
@@ -10659,7 +10844,7 @@
10659
10844
  </xsl:when>
10660
10845
  <xsl:otherwise>
10661
10846
 
10662
- <fo:block>
10847
+ <fo:block role="SKIP">
10663
10848
  <xsl:apply-templates select="." mode="list"/>
10664
10849
  </fo:block>
10665
10850
 
@@ -10751,7 +10936,7 @@
10751
10936
  <xsl:call-template name="refine_list-item-style"/>
10752
10937
 
10753
10938
  <fo:list-item-label end-indent="label-end()">
10754
- <fo:block xsl:use-attribute-sets="list-item-label-style">
10939
+ <fo:block xsl:use-attribute-sets="list-item-label-style" role="SKIP">
10755
10940
 
10756
10941
  <xsl:call-template name="refine_list-item-label-style"/>
10757
10942
 
@@ -10765,7 +10950,7 @@
10765
10950
  </fo:block>
10766
10951
  </fo:list-item-label>
10767
10952
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
10768
- <fo:block>
10953
+ <fo:block role="SKIP">
10769
10954
 
10770
10955
  <xsl:call-template name="refine_list-item-body-style"/>
10771
10956
 
@@ -11044,10 +11229,10 @@
11044
11229
  <fo:table-body>
11045
11230
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
11046
11231
 
11047
- <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
11048
- <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
11049
- <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
11050
- <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
11232
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
11233
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
11234
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
11235
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Pages</fo:block></fo:table-cell>
11051
11236
  </fo:table-row>
11052
11237
  <xsl:apply-templates/>
11053
11238
  </fo:table-body>
@@ -11062,7 +11247,7 @@
11062
11247
 
11063
11248
  <xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
11064
11249
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
11065
- <fo:block><xsl:apply-templates/></fo:block>
11250
+ <fo:block role="SKIP"><xsl:apply-templates/></fo:block>
11066
11251
  </fo:table-cell>
11067
11252
  </xsl:template>
11068
11253
  <!-- ============ -->
@@ -11077,7 +11262,10 @@
11077
11262
  <!-- Reference sections (Normative References and Bibliography) -->
11078
11263
  <!-- ========================================================== -->
11079
11264
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
11080
- <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/>
11265
+ <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
11266
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
11267
+
11268
+ </xsl:template>
11081
11269
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
11082
11270
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
11083
11271
 
@@ -11126,6 +11314,7 @@
11126
11314
 
11127
11315
  <!-- Bibliography (non-normative references) -->
11128
11316
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
11317
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
11129
11318
 
11130
11319
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
11131
11320
  <xsl:call-template name="processBibitem"/>
@@ -11133,6 +11322,35 @@
11133
11322
 
11134
11323
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
11135
11324
 
11325
+ <xsl:template name="insertListItem_Bibitem">
11326
+ <xsl:choose>
11327
+ <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
11328
+ <xsl:otherwise>
11329
+ <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
11330
+ <fo:list-item-label end-indent="label-end()">
11331
+ <fo:block role="SKIP">
11332
+ <fo:inline role="SKIP">
11333
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11334
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
11335
+ </xsl:apply-templates>
11336
+ </fo:inline>
11337
+ </fo:block>
11338
+ </fo:list-item-label>
11339
+ <fo:list-item-body start-indent="body-start()">
11340
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
11341
+ <xsl:call-template name="processBibitem">
11342
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11343
+ </xsl:call-template>
11344
+ </fo:block>
11345
+ </fo:list-item-body>
11346
+ </fo:list-item>
11347
+ </xsl:otherwise>
11348
+ </xsl:choose>
11349
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
11350
+ <xsl:with-param name="skip">false</xsl:with-param>
11351
+ </xsl:apply-templates>
11352
+ </xsl:template>
11353
+
11136
11354
  <xsl:template name="processBibitem">
11137
11355
  <xsl:param name="biblio_tag_part">both</xsl:param>
11138
11356
 
@@ -11165,8 +11383,8 @@
11165
11383
  <fo:table-column column-width="80%"/>
11166
11384
  <fo:table-body>
11167
11385
  <fo:table-row>
11168
- <fo:table-cell><fo:block><xsl:value-of select="$bibitem_label"/></fo:block></fo:table-cell>
11169
- <fo:table-cell><fo:block><xsl:copy-of select="$bibitem_body"/></fo:block></fo:table-cell>
11386
+ <fo:table-cell><fo:block role="SKIP"><xsl:value-of select="$bibitem_label"/></fo:block></fo:table-cell>
11387
+ <fo:table-cell><fo:block role="SKIP"><xsl:copy-of select="$bibitem_body"/></fo:block></fo:table-cell>
11170
11388
  </fo:table-row>
11171
11389
  </fo:table-body>
11172
11390
  </fo:table>
@@ -11393,7 +11611,7 @@
11393
11611
  <xsl:for-each select="*[local-name() = 'tab']">
11394
11612
  <xsl:variable name="current_id" select="generate-id()"/>
11395
11613
  <fo:table-cell>
11396
- <fo:block line-height-shift-adjustment="disregard-shifts">
11614
+ <fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
11397
11615
  <xsl:call-template name="insert_basic_link">
11398
11616
  <xsl:with-param name="element">
11399
11617
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -11411,7 +11629,7 @@
11411
11629
  </xsl:for-each>
11412
11630
  <!-- last column - for page numbers -->
11413
11631
  <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
11414
- <fo:block>
11632
+ <fo:block role="SKIP">
11415
11633
  <xsl:call-template name="insert_basic_link">
11416
11634
  <xsl:with-param name="element">
11417
11635
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -11515,7 +11733,7 @@
11515
11733
 
11516
11734
  <xsl:call-template name="setBlockSpanAll"/>
11517
11735
 
11518
- <fo:block-container xsl:use-attribute-sets="admonition-container-style">
11736
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
11519
11737
 
11520
11738
  <fo:block xsl:use-attribute-sets="admonition-name-style">
11521
11739
  <xsl:call-template name="displayAdmonitionName"/>