metanorma-iec 2.2.11 → 2.2.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88c63cc2c74daf603f426870fdd2ec75742bed39e60a24c6cc8d054eb618271e
4
- data.tar.gz: 9a0bc3e736d8aeec83ea4b8284e12c87b4733ff5318355edd3df5eddc0d189fa
3
+ metadata.gz: ab74b531cc7b5d522767524a33600245829e0989476057c1d2767d1dc218c6e0
4
+ data.tar.gz: c4e351590eba8d1acbb4d569fab9b886b31febfc013613a8baad3c31b46beffb
5
5
  SHA512:
6
- metadata.gz: 1ab7f9ec577953150b3db3f4926ec7ddadc605f1cd9d5e1e3b49daaef130d41f011f80888f5c2a0f32b7babac14ecd5cd024cdfa95efdcb8700863d0897e3ee2
7
- data.tar.gz: 631a447183ff8b90700f5d00231b1cabd5d63da62b24f92d49409f08818915aba931a44a37bf2194d50db42b95b29f9b794d789b66450b7b894fae4300f2c9c9
6
+ metadata.gz: 654dd391978be139823cba89b9372953b67834cd283028398fb30686ff96708ba87d19281b5403118ad7c213ab276ca4a557d0818ff283c4250c7c3405f6feb0
7
+ data.tar.gz: 64f4328ead57cbf17f8c275645dc91233656016f2fb199876081beaaff4b8b540dbdc9e47e7556c08d8e3191f2f6d09dcb1b0d40f7b9a728784858aa6123d0f8
@@ -229,7 +229,7 @@
229
229
  <fo:static-content flow-name="left-region">
230
230
  <fo:block-container reference-orientation="90">
231
231
  <fo:block font-size="7pt" margin-left="3.5mm" margin-top="5.5mm">
232
- <xsl:value-of select="(//iec:iec-standard)[1]/iec:bibdata/iec:docidentifier[@type = 'iso-with-lang']"/>
232
+ <xsl:value-of select="(//iec:iec-standard)[1]/iec:bibdata/iec:docidentifier[@type = 'iso-revdate']"/>
233
233
  </fo:block>
234
234
  </fo:block-container>
235
235
  </fo:static-content>
@@ -990,7 +990,7 @@
990
990
  <xsl:otherwise><xsl:attribute name="padding-left">1mm</xsl:attribute> </xsl:otherwise>
991
991
  </xsl:choose>
992
992
  </fo:inline>
993
- <fo:inline keep-together.within-line="always" font-size="25pt" font-weight="bold" color="{$color_gray}" border-bottom="0.5pt solid {$color_gray}" padding-bottom="3.5mm" baseline-shift="5.5mm"><fo:leader leader-pattern="space"/><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type = 'iso' or @type = 'ISO']"/></fo:inline>
993
+ <fo:inline keep-together.within-line="always" font-size="25pt" font-weight="bold" color="{$color_gray}" border-bottom="0.5pt solid {$color_gray}" padding-bottom="3.5mm" baseline-shift="5.5mm"><fo:leader leader-pattern="space"/><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type = 'iso-undated']"/></fo:inline>
994
994
  </fo:block>
995
995
  <fo:block font-size="10.5pt" text-align="right" margin-top="0.5mm">
996
996
  <xsl:call-template name="capitalize">
@@ -3076,6 +3076,7 @@
3076
3076
  </xsl:attribute-set>
3077
3077
 
3078
3078
  <xsl:attribute-set name="figure-block-style">
3079
+ <xsl:attribute name="role">SKIP</xsl:attribute>
3079
3080
 
3080
3081
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3081
3082
 
@@ -3086,6 +3087,7 @@
3086
3087
  </xsl:attribute-set>
3087
3088
 
3088
3089
  <xsl:attribute-set name="figure-name-style">
3090
+ <xsl:attribute name="role">Caption</xsl:attribute>
3089
3091
 
3090
3092
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3091
3093
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -3131,7 +3133,16 @@
3131
3133
  </xsl:attribute-set> <!-- formula-stem-number-style -->
3132
3134
  <!-- End Formula's styles -->
3133
3135
 
3136
+ <xsl:template name="refine_formula-stem-number-style">
3137
+
3138
+ <xsl:if test="ancestor::*[local-name() = 'table']">
3139
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
3140
+ </xsl:if>
3141
+
3142
+ </xsl:template>
3143
+
3134
3144
  <xsl:attribute-set name="image-style">
3145
+ <xsl:attribute name="role">SKIP</xsl:attribute>
3135
3146
  <xsl:attribute name="text-align">center</xsl:attribute>
3136
3147
 
3137
3148
  </xsl:attribute-set>
@@ -3414,6 +3425,14 @@
3414
3425
 
3415
3426
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
3416
3427
 
3428
+ <xsl:attribute-set name="bibitem-non-normative-list-item-style">
3429
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3430
+
3431
+ <xsl:attribute name="margin-top">5pt</xsl:attribute>
3432
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
3433
+
3434
+ </xsl:attribute-set>
3435
+
3417
3436
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
3418
3437
  <xsl:attribute-set name="bibitem-normative-list-body-style">
3419
3438
 
@@ -3642,13 +3661,13 @@
3642
3661
 
3643
3662
  <xsl:template name="processPrefaceSectionsDefault_Contents">
3644
3663
  <xsl:variable name="nodes_preface_">
3645
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
3664
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
3646
3665
  <node id="{@id}"/>
3647
3666
  </xsl:for-each>
3648
3667
  </xsl:variable>
3649
3668
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
3650
3669
 
3651
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
3670
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
3652
3671
  <xsl:sort select="@displayorder" data-type="number"/>
3653
3672
 
3654
3673
  <!-- process Section's title -->
@@ -3682,12 +3701,12 @@
3682
3701
  <xsl:apply-templates select="." mode="contents"/>
3683
3702
  </xsl:for-each>
3684
3703
 
3685
- <xsl:for-each select="/*/*[local-name()='annex']">
3704
+ <!-- <xsl:for-each select="/*/*[local-name()='annex']">
3686
3705
  <xsl:sort select="@displayorder" data-type="number"/>
3687
3706
  <xsl:apply-templates select="." mode="contents"/>
3688
- </xsl:for-each>
3707
+ </xsl:for-each> -->
3689
3708
 
3690
- <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]">
3709
+ <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]">
3691
3710
  <xsl:sort select="@displayorder" data-type="number"/>
3692
3711
  <xsl:apply-templates select="." mode="contents"/>
3693
3712
  </xsl:for-each>
@@ -3817,14 +3836,14 @@
3817
3836
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
3818
3837
  </xsl:when>
3819
3838
  <xsl:otherwise>
3820
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
3839
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
3821
3840
  </xsl:otherwise>
3822
3841
  </xsl:choose>
3823
3842
  </xsl:for-each>
3824
3843
  </xsl:when>
3825
3844
 
3826
3845
  <xsl:otherwise>
3827
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
3846
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
3828
3847
  </xsl:otherwise>
3829
3848
 
3830
3849
  </xsl:choose>
@@ -3834,7 +3853,7 @@
3834
3853
  <!-- Preface boilerplate sections processing -->
3835
3854
  <!-- ================================= -->
3836
3855
  <xsl:template match="*[local-name()='copyright-statement']">
3837
- <fo:block xsl:use-attribute-sets="copyright-statement-style">
3856
+ <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
3838
3857
  <xsl:apply-templates/>
3839
3858
  </fo:block>
3840
3859
  </xsl:template> <!-- copyright-statement -->
@@ -4007,7 +4026,7 @@
4007
4026
  </xsl:choose>
4008
4027
  </xsl:variable>
4009
4028
 
4010
- <fo:block-container xsl:use-attribute-sets="table-container-style">
4029
+ <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
4011
4030
 
4012
4031
  <xsl:call-template name="refine_table-container-style">
4013
4032
  <xsl:with-param name="margin-side" select="$margin-side"/>
@@ -4145,7 +4164,7 @@
4145
4164
  <fo:table-row>
4146
4165
  <fo:table-cell column-number="2">
4147
4166
  <xsl:copy-of select="$table-preamble"/>
4148
- <fo:block>
4167
+ <fo:block role="SKIP">
4149
4168
  <xsl:call-template name="setTrackChangesStyles">
4150
4169
  <xsl:with-param name="isAdded" select="$isAdded"/>
4151
4170
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
@@ -4193,7 +4212,7 @@
4193
4212
  <xsl:param name="continued"/>
4194
4213
  <xsl:if test="normalize-space() != ''">
4195
4214
 
4196
- <fo:block xsl:use-attribute-sets="table-name-style">
4215
+ <fo:block xsl:use-attribute-sets="table-name-style" role="SKIP">
4197
4216
 
4198
4217
  <xsl:call-template name="refine_table-name-style">
4199
4218
  <xsl:with-param name="continued" select="$continued"/>
@@ -4209,10 +4228,10 @@
4209
4228
  </xsl:choose>
4210
4229
 
4211
4230
  <xsl:if test="$continued = 'true'">
4212
- <fo:inline font-weight="bold" font-style="normal">
4231
+ <fo:inline font-weight="bold" font-style="normal" role="SKIP">
4213
4232
  <fo:retrieve-table-marker retrieve-class-name="table_number"/>
4214
4233
  </fo:inline>
4215
- <fo:inline font-weight="normal" font-style="italic">
4234
+ <fo:inline font-weight="normal" font-style="italic" role="SKIP">
4216
4235
  <xsl:text> </xsl:text>
4217
4236
  <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
4218
4237
  </fo:inline>
@@ -4592,8 +4611,8 @@
4592
4611
  <xsl:template name="table-header-title">
4593
4612
  <xsl:param name="cols-count"/>
4594
4613
  <!-- row for title -->
4595
- <fo:table-row>
4596
- <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">
4614
+ <fo:table-row role="SKIP">
4615
+ <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">
4597
4616
 
4598
4617
  <xsl:call-template name="refine_table-header-title-style"/>
4599
4618
 
@@ -4602,7 +4621,7 @@
4602
4621
  </xsl:apply-templates>
4603
4622
 
4604
4623
  <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
4605
- <fo:block/>
4624
+ <fo:block role="SKIP"/>
4606
4625
  </xsl:if>
4607
4626
 
4608
4627
  </fo:table-cell>
@@ -4709,7 +4728,7 @@
4709
4728
  <!-- fn will be processed inside 'note' processing -->
4710
4729
 
4711
4730
  <xsl:if test="../*[local-name()='note']">
4712
- <fo:block margin-bottom="6pt"> </fo:block>
4731
+ <fo:block margin-bottom="6pt" role="SKIP"> </fo:block>
4713
4732
  </xsl:if>
4714
4733
 
4715
4734
  <!-- for BSI (not PAS) display Notes before footnotes -->
@@ -4809,24 +4828,24 @@
4809
4828
  <xsl:variable name="title_start" select="ancestor::*[local-name()='table'][1]/*[local-name()='name']/node()[1][self::text()]"/>
4810
4829
  <xsl:variable name="table_number" select="substring-before($title_start, '—')"/>
4811
4830
 
4812
- <fo:table-row height="0" keep-with-next.within-page="always">
4813
- <fo:table-cell>
4831
+ <fo:table-row height="0" keep-with-next.within-page="always" role="SKIP">
4832
+ <fo:table-cell role="SKIP">
4814
4833
 
4815
4834
  <fo:marker marker-class-name="table_number"/>
4816
4835
  <fo:marker marker-class-name="table_continued"/>
4817
4836
 
4818
- <fo:block/>
4837
+ <fo:block role="SKIP"/>
4819
4838
  </fo:table-cell>
4820
4839
  </fo:table-row>
4821
- <fo:table-row height="0" keep-with-next.within-page="always">
4822
- <fo:table-cell>
4840
+ <fo:table-row height="0" keep-with-next.within-page="always" role="SKIP">
4841
+ <fo:table-cell role="SKIP">
4823
4842
 
4824
4843
  <fo:marker marker-class-name="table_number"><xsl:value-of select="normalize-space(translate($table_number, ' ', ' '))"/></fo:marker>
4825
4844
 
4826
4845
  <fo:marker marker-class-name="table_continued">
4827
4846
  <xsl:value-of select="$title_continued"/>
4828
4847
  </fo:marker>
4829
- <fo:block/>
4848
+ <fo:block role="SKIP"/>
4830
4849
  </fo:table-cell>
4831
4850
  </fo:table-row>
4832
4851
 
@@ -4967,7 +4986,7 @@
4967
4986
 
4968
4987
  <xsl:call-template name="refine_table-header-cell-style"/>
4969
4988
 
4970
- <fo:block>
4989
+ <fo:block role="SKIP">
4971
4990
  <xsl:apply-templates/>
4972
4991
  </fo:block>
4973
4992
  </fo:table-cell>
@@ -5020,7 +5039,7 @@
5020
5039
  <xsl:attribute name="text-align">left</xsl:attribute>
5021
5040
  </xsl:if>
5022
5041
 
5023
- <fo:block>
5042
+ <fo:block role="SKIP">
5024
5043
 
5025
5044
  <xsl:if test="$isGenerateTableIF = 'true'">
5026
5045
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -5113,7 +5132,7 @@
5113
5132
  </xsl:choose>
5114
5133
  </xsl:variable>
5115
5134
  <xsl:variable name="footnote_inline">
5116
- <fo:inline>
5135
+ <fo:inline role="Reference">
5117
5136
 
5118
5137
  <xsl:variable name="fn_styles">
5119
5138
  <xsl:choose>
@@ -5136,7 +5155,7 @@
5136
5155
 
5137
5156
  <xsl:call-template name="insert_basic_link">
5138
5157
  <xsl:with-param name="element">
5139
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
5158
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
5140
5159
  <xsl:copy-of select="$current_fn_number_text"/>
5141
5160
  </fo:basic-link>
5142
5161
  </xsl:with-param>
@@ -5149,17 +5168,17 @@
5149
5168
  <xsl:copy-of select="$footnote_inline"/>
5150
5169
  </xsl:when>
5151
5170
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
5152
- <fo:footnote xsl:use-attribute-sets="fn-style">
5171
+ <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
5153
5172
  <xsl:copy-of select="$footnote_inline"/>
5154
- <fo:footnote-body>
5173
+ <fo:footnote-body role="Note">
5155
5174
 
5156
- <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
5175
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
5157
5176
 
5158
- <fo:block xsl:use-attribute-sets="fn-body-style">
5177
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
5159
5178
 
5160
5179
  <xsl:call-template name="refine_fn-body-style"/>
5161
5180
 
5162
- <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
5181
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
5163
5182
 
5164
5183
  <xsl:call-template name="refine_fn-body-num-style"/>
5165
5184
 
@@ -5421,11 +5440,11 @@
5421
5440
  </xsl:template>
5422
5441
 
5423
5442
  <xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
5424
- <fo:inline><xsl:value-of select="."/></fo:inline>
5443
+ <fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
5425
5444
  </xsl:template>
5426
5445
 
5427
5446
  <xsl:template match="*[local-name()='fn']//*[local-name()='p']">
5428
- <fo:inline>
5447
+ <fo:inline role="P">
5429
5448
  <xsl:apply-templates/>
5430
5449
  </fo:inline>
5431
5450
  </xsl:template>
@@ -5440,7 +5459,7 @@
5440
5459
  <xsl:variable name="isAdded" select="@added"/>
5441
5460
  <xsl:variable name="isDeleted" select="@deleted"/>
5442
5461
  <!-- <dl><xsl:copy-of select="."/></dl> -->
5443
- <fo:block-container xsl:use-attribute-sets="dl-block-style">
5462
+ <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
5444
5463
 
5445
5464
  <xsl:call-template name="setBlockSpanAll"/>
5446
5465
 
@@ -5475,7 +5494,7 @@
5475
5494
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
5476
5495
  </xsl:call-template>
5477
5496
 
5478
- <fo:block-container margin-left="0mm">
5497
+ <fo:block-container margin-left="0mm" role="SKIP">
5479
5498
 
5480
5499
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
5481
5500
 
@@ -5545,7 +5564,7 @@
5545
5564
 
5546
5565
  <!-- a few components -->
5547
5566
  <xsl:if test="$onlyOneComponent = 'false'">
5548
- <fo:block>
5567
+ <fo:block role="SKIP">
5549
5568
 
5550
5569
  <xsl:call-template name="refine_multicomponent_style"/>
5551
5570
 
@@ -5553,7 +5572,7 @@
5553
5572
  <xsl:attribute name="margin-top">0</xsl:attribute>
5554
5573
  </xsl:if>
5555
5574
 
5556
- <fo:block>
5575
+ <fo:block role="SKIP">
5557
5576
 
5558
5577
  <xsl:call-template name="refine_multicomponent_block_style"/>
5559
5578
 
@@ -5895,7 +5914,7 @@
5895
5914
  -->
5896
5915
  <fo:table-row>
5897
5916
  <fo:table-cell number-columns-spanned="2">
5898
- <fo:block>
5917
+ <fo:block role="SKIP">
5899
5918
  <xsl:call-template name="note"/>
5900
5919
  </fo:block>
5901
5920
  </fo:table-cell>
@@ -5960,7 +5979,7 @@
5960
5979
 
5961
5980
  <xsl:call-template name="refine_dt-cell-style"/>
5962
5981
 
5963
- <fo:block xsl:use-attribute-sets="dt-block-style">
5982
+ <fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
5964
5983
  <xsl:copy-of select="@id"/>
5965
5984
 
5966
5985
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -5990,7 +6009,7 @@
5990
6009
 
5991
6010
  <xsl:call-template name="refine_dd-cell-style"/>
5992
6011
 
5993
- <fo:block>
6012
+ <fo:block role="SKIP">
5994
6013
 
5995
6014
  <xsl:if test="$isGenerateTableIF = 'true'">
5996
6015
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -6155,6 +6174,9 @@
6155
6174
 
6156
6175
  <xsl:template name="refine_strong_style">
6157
6176
 
6177
+ <xsl:if test="ancestor::*['preferred']">
6178
+ <xsl:attribute name="role">SKIP</xsl:attribute>
6179
+ </xsl:if>
6158
6180
  </xsl:template>
6159
6181
 
6160
6182
  <xsl:template match="*[local-name()='padding']">
@@ -6365,11 +6387,41 @@
6365
6387
 
6366
6388
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
6367
6389
  <xsl:variable name="text" select="normalize-space(.)"/>
6368
- <fo:inline font-size="75%">
6390
+ <fo:inline font-size="75%" role="SKIP">
6369
6391
  <xsl:if test="string-length($text) &gt; 0">
6370
- <xsl:call-template name="recursiveSmallCaps">
6371
- <xsl:with-param name="text" select="$text"/>
6372
- </xsl:call-template>
6392
+ <xsl:variable name="smallCapsText">
6393
+ <xsl:call-template name="recursiveSmallCaps">
6394
+ <xsl:with-param name="text" select="$text"/>
6395
+ </xsl:call-template>
6396
+ </xsl:variable>
6397
+ <!-- merge neighboring fo:inline -->
6398
+ <xsl:for-each select="xalan:nodeset($smallCapsText)/node()">
6399
+ <xsl:choose>
6400
+ <xsl:when test="self::fo:inline and preceding-sibling::node()[1][self::fo:inline]"><!-- <xsl:copy-of select="."/> --></xsl:when>
6401
+ <xsl:when test="self::fo:inline and @font-size">
6402
+ <xsl:variable name="curr_pos" select="count(preceding-sibling::node()) + 1"/>
6403
+ <!-- <curr_pos><xsl:value-of select="$curr_pos"/></curr_pos> -->
6404
+ <xsl:variable name="next_text_" select="count(following-sibling::node()[not(local-name() = 'inline')][1]/preceding-sibling::node())"/>
6405
+ <xsl:variable name="next_text">
6406
+ <xsl:choose>
6407
+ <xsl:when test="$next_text_ = 0">99999999</xsl:when>
6408
+ <xsl:otherwise><xsl:value-of select="$next_text_ + 1"/></xsl:otherwise>
6409
+ </xsl:choose>
6410
+ </xsl:variable>
6411
+ <!-- <next_text><xsl:value-of select="$next_text"/></next_text> -->
6412
+ <fo:inline>
6413
+ <xsl:copy-of select="@*"/>
6414
+ <xsl:copy-of select="./node()"/>
6415
+ <xsl:for-each select="following-sibling::node()[position() &lt; $next_text - $curr_pos]"> <!-- [self::fo:inline] -->
6416
+ <xsl:copy-of select="./node()"/>
6417
+ </xsl:for-each>
6418
+ </fo:inline>
6419
+ </xsl:when>
6420
+ <xsl:otherwise>
6421
+ <xsl:copy-of select="."/>
6422
+ </xsl:otherwise>
6423
+ </xsl:choose>
6424
+ </xsl:for-each>
6373
6425
  </xsl:if>
6374
6426
  </fo:inline>
6375
6427
  </xsl:template>
@@ -6381,7 +6433,7 @@
6381
6433
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
6382
6434
  <xsl:choose>
6383
6435
  <xsl:when test="$char=$upperCase">
6384
- <fo:inline font-size="{100 div 0.75}%">
6436
+ <fo:inline font-size="{100 div 0.75}%" role="SKIP">
6385
6437
  <xsl:value-of select="$upperCase"/>
6386
6438
  </fo:inline>
6387
6439
  </xsl:when>
@@ -6614,6 +6666,10 @@
6614
6666
 
6615
6667
  <xsl:when test="not(contains($text, $separator))">
6616
6668
  <word>
6669
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
6670
+ <xsl:text>
6671
+  </xsl:text> <!-- to add distance between dt and dd -->
6672
+ </xsl:if>
6617
6673
  <xsl:call-template name="enclose_text_in_tags">
6618
6674
  <xsl:with-param name="text" select="normalize-space($text)"/>
6619
6675
  <xsl:with-param name="tags" select="$tags"/>
@@ -6622,6 +6678,10 @@
6622
6678
  </xsl:when>
6623
6679
  <xsl:otherwise>
6624
6680
  <word>
6681
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
6682
+ <xsl:text>
6683
+  </xsl:text> <!-- to add distance between dt and dd -->
6684
+ </xsl:if>
6625
6685
  <xsl:call-template name="enclose_text_in_tags">
6626
6686
  <xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
6627
6687
  <xsl:with-param name="tags" select="$tags"/>
@@ -6805,6 +6865,10 @@
6805
6865
  <xsl:template name="getSimpleTable">
6806
6866
  <xsl:param name="id"/>
6807
6867
 
6868
+ <!-- <test0>
6869
+ <xsl:copy-of select="."/>
6870
+ </test0> -->
6871
+
6808
6872
  <xsl:variable name="simple-table">
6809
6873
 
6810
6874
  <!-- Step 0. replace <br/> to <p>...</p> -->
@@ -7117,6 +7181,18 @@
7117
7181
  </xsl:copy>
7118
7182
  </xsl:template>
7119
7183
 
7184
+ <xsl:variable name="font_main_root_style">
7185
+ <root-style xsl:use-attribute-sets="root-style">
7186
+ </root-style>
7187
+ </xsl:variable>
7188
+ <xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
7189
+ <xsl:variable name="font_main">
7190
+ <xsl:choose>
7191
+ <xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
7192
+ <xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
7193
+ </xsl:choose>
7194
+ </xsl:variable>
7195
+
7120
7196
  <xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
7121
7197
  <xsl:param name="id"/>
7122
7198
  <xsl:copy>
@@ -7155,6 +7231,33 @@
7155
7231
 
7156
7232
  <!-- td_text='<xsl:copy-of select="$td_text"/>' -->
7157
7233
 
7234
+ <xsl:variable name="words_with_width">
7235
+ <!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
7236
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
7237
+ <xsl:copy>
7238
+ <xsl:copy-of select="@*"/>
7239
+ <xsl:attribute name="width">
7240
+ <xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
7241
+ </xsl:attribute>
7242
+ <xsl:copy-of select="node()"/>
7243
+ </xsl:copy>
7244
+ </xsl:for-each>
7245
+ </xsl:variable>
7246
+
7247
+ <xsl:variable name="words_with_width_sorted">
7248
+ <xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
7249
+ <xsl:sort select="@width" data-type="number" order="descending"/>
7250
+ <!-- select word maximal width only -->
7251
+ <xsl:if test="position() = 1">
7252
+ <xsl:copy-of select="."/>
7253
+ </xsl:if>
7254
+ </xsl:for-each>
7255
+ <!-- add 'word' with formatting tags inside -->
7256
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
7257
+ <xsl:copy-of select="."/>
7258
+ </xsl:for-each>
7259
+ </xsl:variable>
7260
+
7158
7261
  <xsl:variable name="words">
7159
7262
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
7160
7263
  <word>
@@ -7162,9 +7265,12 @@
7162
7265
  </word>
7163
7266
  </xsl:for-each>
7164
7267
 
7165
- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
7268
+ <xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
7166
7269
  <xsl:copy-of select="."/>
7167
7270
  </xsl:for-each>
7271
+ <!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
7272
+ <xsl:copy-of select="."/>
7273
+ </xsl:for-each> -->
7168
7274
 
7169
7275
  </xsl:variable>
7170
7276
 
@@ -7625,10 +7731,10 @@
7625
7731
  <xsl:copy>
7626
7732
  <xsl:apply-templates select="@*" mode="mathml"/>
7627
7733
  <xsl:if test="not(@lspace)">
7628
- <xsl:attribute name="lspace">0.4em</xsl:attribute>
7734
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7629
7735
  </xsl:if>
7630
- <xsl:if test="not(@rspace)">
7631
- <xsl:attribute name="rspace">0.4em</xsl:attribute>
7736
+ <xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
7737
+ <xsl:attribute name="rspace">0.2em</xsl:attribute>
7632
7738
  </xsl:if>
7633
7739
  <xsl:apply-templates mode="mathml"/>
7634
7740
  </xsl:copy>
@@ -7645,6 +7751,27 @@
7645
7751
  </xsl:copy>
7646
7752
  </xsl:template>
7647
7753
 
7754
+ <!-- increase space before '(' -->
7755
+ <xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
7756
+ <xsl:copy>
7757
+ <xsl:apply-templates select="@*" mode="mathml"/>
7758
+ <xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
7759
+ <xsl:if test="not(@lspace)">
7760
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
7761
+ <xsl:choose>
7762
+ <xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
7763
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7764
+ </xsl:when>
7765
+ <xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
7766
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7767
+ </xsl:when>
7768
+ </xsl:choose>
7769
+ </xsl:if>
7770
+ </xsl:if>
7771
+ <xsl:apply-templates mode="mathml"/>
7772
+ </xsl:copy>
7773
+ </xsl:template>
7774
+
7648
7775
  <!-- Examples:
7649
7776
  <stem type="AsciiMath">x = 1</stem>
7650
7777
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -7804,7 +7931,7 @@
7804
7931
  <!-- formula -->
7805
7932
  <!-- ====== -->
7806
7933
  <xsl:template match="*[local-name() = 'formula']" name="formula">
7807
- <fo:block-container margin-left="0mm">
7934
+ <fo:block-container margin-left="0mm" role="SKIP">
7808
7935
  <xsl:if test="parent::*[local-name() = 'note']">
7809
7936
  <xsl:attribute name="margin-left">
7810
7937
  <xsl:choose>
@@ -7814,7 +7941,7 @@
7814
7941
  </xsl:attribute>
7815
7942
 
7816
7943
  </xsl:if>
7817
- <fo:block-container margin-left="0mm">
7944
+ <fo:block-container margin-left="0mm" role="SKIP">
7818
7945
  <fo:block id="{@id}">
7819
7946
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
7820
7947
  </fo:block>
@@ -7850,7 +7977,7 @@
7850
7977
  <fo:table-body>
7851
7978
  <fo:table-row>
7852
7979
  <fo:table-cell display-align="center">
7853
- <fo:block xsl:use-attribute-sets="formula-stem-block-style">
7980
+ <fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
7854
7981
 
7855
7982
  <xsl:call-template name="refine_formula-stem-block-style"/>
7856
7983
 
@@ -7858,7 +7985,10 @@
7858
7985
  </fo:block>
7859
7986
  </fo:table-cell>
7860
7987
  <fo:table-cell display-align="center">
7861
- <fo:block xsl:use-attribute-sets="formula-stem-number-style">
7988
+ <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
7989
+
7990
+ <xsl:call-template name="refine_formula-stem-number-style"/>
7991
+
7862
7992
  <xsl:apply-templates select="../*[local-name() = 'name']"/>
7863
7993
  </fo:block>
7864
7994
  </fo:table-cell>
@@ -7891,13 +8021,13 @@
7891
8021
 
7892
8022
  <xsl:template match="*[local-name() = 'note']" name="note">
7893
8023
 
7894
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
8024
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7895
8025
 
7896
8026
  <xsl:call-template name="setBlockSpanAll"/>
7897
8027
 
7898
8028
  <xsl:call-template name="refine_note-style"/>
7899
8029
 
7900
- <fo:block-container margin-left="0mm" margin-right="0mm">
8030
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7901
8031
 
7902
8032
  <fo:block>
7903
8033
 
@@ -8061,12 +8191,13 @@
8061
8191
 
8062
8192
  <xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
8063
8193
  <xsl:if test="normalize-space() != ''">
8064
- <xsl:variable name="level">
8194
+ <!-- <xsl:variable name="level">
8065
8195
  <xsl:call-template name="getLevelTermName"/>
8066
8196
  </xsl:variable>
8067
8197
  <fo:inline role="H{$level}">
8068
- <xsl:apply-templates/>
8069
- </fo:inline>
8198
+ <xsl:apply-templates />
8199
+ </fo:inline> -->
8200
+ <xsl:apply-templates/>
8070
8201
  </xsl:if>
8071
8202
  </xsl:template>
8072
8203
  <!-- ====== -->
@@ -8090,7 +8221,7 @@
8090
8221
  <!-- Example: Dimensions in millimeters -->
8091
8222
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
8092
8223
 
8093
- <fo:block xsl:use-attribute-sets="figure-style">
8224
+ <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
8094
8225
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
8095
8226
  </fo:block>
8096
8227
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
@@ -9238,7 +9369,7 @@
9238
9369
  </xsl:when>
9239
9370
 
9240
9371
  <xsl:otherwise>
9241
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
9372
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
9242
9373
 
9243
9374
  <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
9244
9375
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -9259,7 +9390,7 @@
9259
9390
  </xsl:attribute>
9260
9391
 
9261
9392
  </xsl:if>
9262
- <fo:block-container margin-left="0mm">
9393
+ <fo:block-container margin-left="0mm" role="SKIP">
9263
9394
 
9264
9395
  <fo:block xsl:use-attribute-sets="sourcecode-style">
9265
9396
 
@@ -9383,7 +9514,7 @@
9383
9514
  <!-- second td with sourcecode -->
9384
9515
  <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'] -->
9385
9516
  <fo:table-cell>
9386
- <fo:block>
9517
+ <fo:block role="SKIP">
9387
9518
  <xsl:apply-templates/>
9388
9519
  </fo:block>
9389
9520
  </fo:table-cell>
@@ -9805,11 +9936,11 @@
9805
9936
  <!-- requirement, recommendation, permission table -->
9806
9937
  <!-- ========== -->
9807
9938
  <xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9808
- <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
9939
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
9809
9940
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9810
9941
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
9811
9942
  </xsl:if>
9812
- <fo:block-container margin-left="0mm" margin-right="0mm">
9943
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9813
9944
  <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
9814
9945
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9815
9946
  <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
@@ -9870,7 +10001,7 @@
9870
10001
 
9871
10002
  <xsl:call-template name="setTableCellAttributes"/>
9872
10003
 
9873
- <fo:block>
10004
+ <fo:block role="SKIP">
9874
10005
  <xsl:apply-templates/>
9875
10006
  </fo:block>
9876
10007
  </fo:table-cell>
@@ -9892,7 +10023,7 @@
9892
10023
 
9893
10024
  <xsl:call-template name="setTableCellAttributes"/>
9894
10025
 
9895
- <fo:block>
10026
+ <fo:block role="SKIP">
9896
10027
  <xsl:apply-templates/>
9897
10028
  </fo:block>
9898
10029
  </fo:table-cell>
@@ -9971,7 +10102,7 @@
9971
10102
  -->
9972
10103
  <xsl:template match="*[local-name() = 'example']">
9973
10104
 
9974
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
10105
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
9975
10106
 
9976
10107
  <xsl:call-template name="setBlockSpanAll"/>
9977
10108
 
@@ -9988,7 +10119,7 @@
9988
10119
 
9989
10120
  </xsl:variable>
9990
10121
 
9991
- <fo:block-container margin-left="0mm">
10122
+ <fo:block-container margin-left="0mm" role="SKIP">
9992
10123
 
9993
10124
  <xsl:choose>
9994
10125
 
@@ -10001,8 +10132,8 @@
10001
10132
  </xsl:apply-templates>
10002
10133
  </fo:block>
10003
10134
 
10004
- <fo:block-container xsl:use-attribute-sets="example-body-style">
10005
- <fo:block-container margin-left="0mm" margin-right="0mm">
10135
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
10136
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10006
10137
  <xsl:apply-templates select="node()[not(local-name() = 'name')]">
10007
10138
  <xsl:with-param name="fo_element" select="$fo_element"/>
10008
10139
  </xsl:apply-templates>
@@ -10055,8 +10186,8 @@
10055
10186
 
10056
10187
  <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
10057
10188
  <!-- display further elements in blocks -->
10058
- <fo:block-container xsl:use-attribute-sets="example-body-style">
10059
- <fo:block-container margin-left="0mm" margin-right="0mm">
10189
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
10190
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10060
10191
  <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
10061
10192
  <xsl:with-param name="fo_element" select="'block'"/>
10062
10193
  </xsl:apply-templates>
@@ -10109,7 +10240,7 @@
10109
10240
  </xsl:variable>
10110
10241
  <xsl:choose>
10111
10242
  <xsl:when test="starts-with(normalize-space($element), 'block')">
10112
- <fo:block-container>
10243
+ <fo:block-container role="SKIP">
10113
10244
  <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
10114
10245
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
10115
10246
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -10250,7 +10381,7 @@
10250
10381
  <!-- author -->
10251
10382
  <!-- ====== -->
10252
10383
  <xsl:template match="*[local-name() = 'quote']">
10253
- <fo:block-container margin-left="0mm">
10384
+ <fo:block-container margin-left="0mm" role="SKIP">
10254
10385
 
10255
10386
  <xsl:call-template name="setBlockSpanAll"/>
10256
10387
 
@@ -10260,12 +10391,12 @@
10260
10391
  </xsl:if>
10261
10392
  </xsl:if>
10262
10393
 
10263
- <fo:block-container margin-left="0mm">
10264
- <fo:block-container xsl:use-attribute-sets="quote-style">
10394
+ <fo:block-container margin-left="0mm" role="SKIP">
10395
+ <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
10265
10396
 
10266
10397
  <xsl:call-template name="refine_quote-style"/>
10267
10398
 
10268
- <fo:block-container margin-left="0mm" margin-right="0mm">
10399
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10269
10400
  <fo:block role="BlockQuote">
10270
10401
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
10271
10402
  </fo:block>
@@ -10423,10 +10554,10 @@
10423
10554
 
10424
10555
  <xsl:choose>
10425
10556
  <xsl:when test="$lang = 'zh'">
10426
- <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
10557
+ <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
10427
10558
  </xsl:when>
10428
10559
  <xsl:when test="../../@inline-header = 'true'">
10429
- <fo:inline font-size="90%">
10560
+ <fo:inline font-size="90%" role="SKIP">
10430
10561
  <xsl:call-template name="insertNonBreakSpaces">
10431
10562
  <xsl:with-param name="count" select="$padding-right"/>
10432
10563
  </xsl:call-template>
@@ -10434,7 +10565,7 @@
10434
10565
  </xsl:when>
10435
10566
  <xsl:otherwise>
10436
10567
  <xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
10437
- <fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/>​</fo:inline>
10568
+ <fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/>​</fo:inline>
10438
10569
  </xsl:otherwise>
10439
10570
  </xsl:choose>
10440
10571
 
@@ -10468,12 +10599,12 @@
10468
10599
  </xsl:if>
10469
10600
 
10470
10601
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
10471
- <fo:block xsl:use-attribute-sets="term-name-style">
10602
+ <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
10472
10603
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
10473
10604
  </fo:block>
10474
10605
  </xsl:if>
10475
10606
 
10476
- <fo:block xsl:use-attribute-sets="preferred-term-style">
10607
+ <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
10477
10608
  <xsl:call-template name="setStyle_preferred"/>
10478
10609
  <xsl:apply-templates/>
10479
10610
  </fo:block>
@@ -10514,7 +10645,7 @@
10514
10645
  <!-- definition -->
10515
10646
  <!-- ========== -->
10516
10647
  <xsl:template match="*[local-name() = 'definition']">
10517
- <fo:block xsl:use-attribute-sets="definition-style">
10648
+ <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
10518
10649
  <xsl:apply-templates/>
10519
10650
  </fo:block>
10520
10651
  </xsl:template>
@@ -10557,6 +10688,10 @@
10557
10688
 
10558
10689
  <xsl:template match="*[local-name() = 'clause']">
10559
10690
  <fo:block>
10691
+ <xsl:if test="parent::*[local-name() = 'copyright-statement']">
10692
+ <xsl:attribute name="role">SKIP</xsl:attribute>
10693
+ </xsl:if>
10694
+
10560
10695
  <xsl:call-template name="setId"/>
10561
10696
 
10562
10697
  <xsl:call-template name="setBlockSpanAll"/>
@@ -10672,7 +10807,48 @@
10672
10807
  </xsl:choose>
10673
10808
  </xsl:when>
10674
10809
  <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
10675
- <xsl:value-of select="@label"/>
10810
+
10811
+ <xsl:variable name="label">
10812
+
10813
+ <xsl:variable name="type" select="../@type"/>
10814
+
10815
+ <xsl:variable name="style_prefix_">
10816
+ <xsl:if test="$type = 'roman'">
10817
+ <!-- Example: (i) -->
10818
+ </xsl:if>
10819
+ </xsl:variable>
10820
+ <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
10821
+
10822
+ <xsl:variable name="style_suffix_">
10823
+ <xsl:choose>
10824
+ <xsl:when test="$type = 'arabic'">
10825
+ )
10826
+ </xsl:when>
10827
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
10828
+ )
10829
+ </xsl:when>
10830
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
10831
+ .
10832
+ </xsl:when>
10833
+ <xsl:when test="$type = 'roman'">
10834
+ )
10835
+ </xsl:when>
10836
+ <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
10837
+ </xsl:choose>
10838
+ </xsl:variable>
10839
+ <xsl:variable name="style_suffix" select="normalize-space($style_suffix_)"/>
10840
+
10841
+ <xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
10842
+ <xsl:value-of select="$style_prefix"/>
10843
+ </xsl:if>
10844
+ <xsl:value-of select="@label"/>
10845
+ <xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
10846
+ <xsl:value-of select="$style_suffix"/>
10847
+ </xsl:if>
10848
+ </xsl:variable>
10849
+
10850
+ <xsl:value-of select="normalize-space($label)"/>
10851
+
10676
10852
  </xsl:when>
10677
10853
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
10678
10854
 
@@ -10754,7 +10930,7 @@
10754
10930
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
10755
10931
  <xsl:choose>
10756
10932
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
10757
- <fo:block-container>
10933
+ <fo:block-container role="SKIP">
10758
10934
  <xsl:attribute name="margin-left">
10759
10935
  <xsl:choose>
10760
10936
  <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
@@ -10764,7 +10940,7 @@
10764
10940
 
10765
10941
  <xsl:call-template name="refine_list_container_style"/>
10766
10942
 
10767
- <fo:block-container margin-left="0mm">
10943
+ <fo:block-container margin-left="0mm" role="SKIP">
10768
10944
  <fo:block>
10769
10945
  <xsl:apply-templates select="." mode="list"/>
10770
10946
  </fo:block>
@@ -10773,7 +10949,7 @@
10773
10949
  </xsl:when>
10774
10950
  <xsl:otherwise>
10775
10951
 
10776
- <fo:block>
10952
+ <fo:block role="SKIP">
10777
10953
  <xsl:apply-templates select="." mode="list"/>
10778
10954
  </fo:block>
10779
10955
 
@@ -10869,7 +11045,7 @@
10869
11045
  <xsl:call-template name="refine_list-item-style"/>
10870
11046
 
10871
11047
  <fo:list-item-label end-indent="label-end()">
10872
- <fo:block xsl:use-attribute-sets="list-item-label-style">
11048
+ <fo:block xsl:use-attribute-sets="list-item-label-style" role="SKIP">
10873
11049
 
10874
11050
  <xsl:call-template name="refine_list-item-label-style"/>
10875
11051
 
@@ -10883,7 +11059,7 @@
10883
11059
  </fo:block>
10884
11060
  </fo:list-item-label>
10885
11061
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
10886
- <fo:block>
11062
+ <fo:block role="SKIP">
10887
11063
 
10888
11064
  <xsl:call-template name="refine_list-item-body-style"/>
10889
11065
 
@@ -11162,10 +11338,10 @@
11162
11338
  <fo:table-body>
11163
11339
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
11164
11340
 
11165
- <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
11166
- <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
11167
- <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
11168
- <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
11341
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
11342
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
11343
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
11344
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Pages</fo:block></fo:table-cell>
11169
11345
  </fo:table-row>
11170
11346
  <xsl:apply-templates/>
11171
11347
  </fo:table-body>
@@ -11180,7 +11356,7 @@
11180
11356
 
11181
11357
  <xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
11182
11358
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
11183
- <fo:block><xsl:apply-templates/></fo:block>
11359
+ <fo:block role="SKIP"><xsl:apply-templates/></fo:block>
11184
11360
  </fo:table-cell>
11185
11361
  </xsl:template>
11186
11362
  <!-- ============ -->
@@ -11195,7 +11371,10 @@
11195
11371
  <!-- Reference sections (Normative References and Bibliography) -->
11196
11372
  <!-- ========================================================== -->
11197
11373
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
11198
- <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/>
11374
+ <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
11375
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
11376
+
11377
+ </xsl:template>
11199
11378
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
11200
11379
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
11201
11380
 
@@ -11249,15 +11428,15 @@
11249
11428
 
11250
11429
  <!-- Bibliography (non-normative references) -->
11251
11430
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
11252
-
11431
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
11253
11432
  <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
11254
11433
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
11255
11434
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
11256
11435
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
11257
11436
  <fo:list-item>
11258
11437
  <fo:list-item-label end-indent="label-end()">
11259
- <fo:block>
11260
- <fo:inline>
11438
+ <fo:block role="SKIP">
11439
+ <fo:inline role="SKIP">
11261
11440
 
11262
11441
  <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11263
11442
  <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
@@ -11266,7 +11445,7 @@
11266
11445
  </fo:block>
11267
11446
  </fo:list-item-label>
11268
11447
  <fo:list-item-body start-indent="body-start()">
11269
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style">
11448
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
11270
11449
  <xsl:call-template name="processBibitem">
11271
11450
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11272
11451
  </xsl:call-template>
@@ -11277,6 +11456,35 @@
11277
11456
 
11278
11457
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
11279
11458
 
11459
+ <xsl:template name="insertListItem_Bibitem">
11460
+ <xsl:choose>
11461
+ <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
11462
+ <xsl:otherwise>
11463
+ <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
11464
+ <fo:list-item-label end-indent="label-end()">
11465
+ <fo:block role="SKIP">
11466
+ <fo:inline role="SKIP">
11467
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11468
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
11469
+ </xsl:apply-templates>
11470
+ </fo:inline>
11471
+ </fo:block>
11472
+ </fo:list-item-label>
11473
+ <fo:list-item-body start-indent="body-start()">
11474
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
11475
+ <xsl:call-template name="processBibitem">
11476
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11477
+ </xsl:call-template>
11478
+ </fo:block>
11479
+ </fo:list-item-body>
11480
+ </fo:list-item>
11481
+ </xsl:otherwise>
11482
+ </xsl:choose>
11483
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
11484
+ <xsl:with-param name="skip">false</xsl:with-param>
11485
+ </xsl:apply-templates>
11486
+ </xsl:template>
11487
+
11280
11488
  <xsl:template name="processBibitem">
11281
11489
  <xsl:param name="biblio_tag_part">both</xsl:param>
11282
11490
 
@@ -11488,7 +11696,7 @@
11488
11696
  <xsl:for-each select="*[local-name() = 'tab']">
11489
11697
  <xsl:variable name="current_id" select="generate-id()"/>
11490
11698
  <fo:table-cell>
11491
- <fo:block line-height-shift-adjustment="disregard-shifts">
11699
+ <fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
11492
11700
  <xsl:call-template name="insert_basic_link">
11493
11701
  <xsl:with-param name="element">
11494
11702
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -11506,7 +11714,7 @@
11506
11714
  </xsl:for-each>
11507
11715
  <!-- last column - for page numbers -->
11508
11716
  <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
11509
- <fo:block>
11717
+ <fo:block role="SKIP">
11510
11718
  <xsl:call-template name="insert_basic_link">
11511
11719
  <xsl:with-param name="element">
11512
11720
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -11610,7 +11818,7 @@
11610
11818
 
11611
11819
  <xsl:call-template name="setBlockSpanAll"/>
11612
11820
 
11613
- <fo:block-container xsl:use-attribute-sets="admonition-container-style">
11821
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
11614
11822
 
11615
11823
  <fo:block text-align="justify">
11616
11824
  <fo:inline>
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.2.11".freeze
3
+ VERSION = "2.2.13".freeze
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.11
4
+ version: 2.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-05 00:00:00.000000000 Z
11
+ date: 2023-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso