metanorma-iec 2.2.5 → 2.2.6

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: a4f205002b7704e320138de0db41daf9d8404b46c723dee2395f0359deb9eaca
4
- data.tar.gz: 5cbeace9aaa3ae0851e2e684c1ef189c9e65a323f8ac78a594f089feba61102f
3
+ metadata.gz: 58071f48a741c221fd98b99a707cb7b2ad5c7f868bea8238438fe81b1cb2e371
4
+ data.tar.gz: b11e99b0a0321425e55fcb7515368e76541f0108c0328feb40d63413de1f508c
5
5
  SHA512:
6
- metadata.gz: fe32c4002e186961be6a6e377f975b3cc8209ef2089e1379ea376dfba3f08466b962808a61c2582982e6342048e5bb09ec62550f14e3233a0af8a5a568a72351
7
- data.tar.gz: 36ce73d818a23878064830df2ed92f67832c65ac807cdd8b7518035fba76fdd911fe805c484bae8d74e2700f97df28323f4fcf357347e0935f50106801646d1b
6
+ metadata.gz: f393546cf2a2627a0a14b5211a9fa3c9c4cbba6d7657f533898539b964e4ecf58dce59e70c8aa294ad367c402e5a11b345ad28560f02c30da95931f8de35a7ef
7
+ data.tar.gz: d81439766d47249a9614f981058b19ae60549f543236e2e324cd2bbb7a208e35591d415eaaa2d8871131a9b52b70f3a40b1444295256acb563b383a8e9ee5eee
@@ -124,6 +124,10 @@ a.FootnoteRef + a.FootnoteRef:before {
124
124
  content: ", ";
125
125
  vertical-align: super; }
126
126
 
127
+ a.TableFootnoteRef + a.TableFootnoteRef:before {
128
+ content: ", ";
129
+ vertical-align: super; }
130
+
127
131
  .addition {
128
132
  color: blue; }
129
133
 
@@ -400,7 +400,7 @@
400
400
  <fo:table-body>
401
401
  <fo:table-row border-bottom="0.5pt solid {$color_gray}" height="16mm">
402
402
  <fo:table-cell font-size="8pt" text-align="right" display-align="center">
403
- <fo:block>
403
+ <fo:block padding-top="1mm">
404
404
  <xsl:if test="normalize-space($price_code_value) != ''">
405
405
  <fo:block color="{$color_blue}" margin-bottom="3pt">
406
406
  <!-- PRICE CODE -->
@@ -413,15 +413,18 @@
413
413
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($price_code))"/>
414
414
  </fo:block>
415
415
 
416
- <fo:block>
417
- <xsl:variable name="price_code">
418
- <xsl:call-template name="getLocalizedString">
419
- <xsl:with-param name="key">price-code</xsl:with-param>
420
- <xsl:with-param name="lang"><xsl:value-of select="$lang_second"/></xsl:with-param>
421
- </xsl:call-template>
422
- </xsl:variable>
423
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($price_code))"/>
424
- </fo:block>
416
+ <xsl:variable name="price_code_lang_second">
417
+ <xsl:call-template name="getLocalizedString">
418
+ <xsl:with-param name="key">price-code</xsl:with-param>
419
+ <xsl:with-param name="lang"><xsl:value-of select="$lang_second"/></xsl:with-param>
420
+ <xsl:with-param name="returnEmptyIfNotFound">true</xsl:with-param>
421
+ </xsl:call-template>
422
+ </xsl:variable>
423
+ <xsl:if test="normalize-space($price_code_lang_second) != ''">
424
+ <fo:block>
425
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($price_code_lang_second))"/>
426
+ </fo:block>
427
+ </xsl:if>
425
428
  </xsl:if>
426
429
  </fo:block>
427
430
  </fo:table-cell>
@@ -2617,7 +2620,6 @@
2617
2620
 
2618
2621
  <xsl:attribute-set name="table-header-cell-style">
2619
2622
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2620
- <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2621
2623
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
2622
2624
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2623
2625
  <xsl:attribute name="display-align">center</xsl:attribute>
@@ -2630,7 +2632,6 @@
2630
2632
 
2631
2633
  <xsl:attribute-set name="table-cell-style">
2632
2634
  <xsl:attribute name="display-align">center</xsl:attribute>
2633
- <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2634
2635
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
2635
2636
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2636
2637
 
@@ -3399,7 +3400,7 @@
3399
3400
  <xsl:apply-templates select="." mode="contents"/>
3400
3401
  </xsl:for-each>
3401
3402
 
3402
- <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
3403
+ <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]">
3403
3404
  <xsl:sort select="@displayorder" data-type="number"/>
3404
3405
  <xsl:apply-templates select="." mode="contents"/>
3405
3406
  </xsl:for-each>
@@ -4347,6 +4348,10 @@
4347
4348
  </xsl:choose>
4348
4349
  </xsl:variable>
4349
4350
 
4351
+ <xsl:variable name="table_fn_block">
4352
+ <xsl:call-template name="table_fn_display"/>
4353
+ </xsl:variable>
4354
+
4350
4355
  <xsl:variable name="tableWithNotesAndFootnotes">
4351
4356
 
4352
4357
  <fo:table keep-with-previous="always">
@@ -4398,18 +4403,26 @@
4398
4403
 
4399
4404
  <xsl:apply-templates select="../*[local-name()='note']"/>
4400
4405
 
4401
- <!-- horizontal row separator -->
4406
+ <xsl:variable name="isDisplayRowSeparator">
4407
+ true
4402
4408
 
4403
- <xsl:if test="../*[local-name()='note']">
4409
+ </xsl:variable>
4410
+
4411
+ <!-- horizontal row separator -->
4412
+ <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
4413
+ <xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
4404
4414
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
4415
+
4405
4416
  <xsl:call-template name="setBordersTableArray"/>
4406
4417
  <fo:block font-size="1pt"> </fo:block>
4407
4418
  </fo:block-container>
4408
4419
  </xsl:if>
4420
+ </xsl:if>
4409
4421
 
4410
4422
  <!-- fn processing -->
4411
4423
 
4412
- <xsl:call-template name="table_fn_display"/>
4424
+ <!-- <xsl:call-template name="table_fn_display" /> -->
4425
+ <xsl:copy-of select="$table_fn_block"/>
4413
4426
 
4414
4427
  <!-- for PAS display Notes after footnotes -->
4415
4428
 
@@ -4526,6 +4539,28 @@
4526
4539
  </fo:table-row>
4527
4540
  </xsl:template>
4528
4541
 
4542
+ <xsl:template name="setBorderUnderRow">
4543
+ <xsl:variable name="border_under_row_" select="normalize-space(ancestor::*[local-name() = 'table'][1]/@border-under-row)"/>
4544
+ <xsl:choose>
4545
+ <xsl:when test="$border_under_row_ != ''">
4546
+ <xsl:variable name="table_id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
4547
+ <xsl:variable name="row_num_"><xsl:number level="any" count="*[local-name() = 'table'][@id = $table_id]//*[local-name() = 'tr']"/></xsl:variable>
4548
+ <xsl:variable name="row_num" select="number($row_num_) - 1"/> <!-- because values in border-under-row start with 0 -->
4549
+ <xsl:variable name="border_under_row">
4550
+ <xsl:call-template name="split">
4551
+ <xsl:with-param name="pText" select="$border_under_row_"/>
4552
+ </xsl:call-template>
4553
+ </xsl:variable>
4554
+ <xsl:if test="xalan:nodeset($border_under_row)/item[. = normalize-space($row_num)]">
4555
+ <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
4556
+ </xsl:if>
4557
+ </xsl:when>
4558
+ <xsl:otherwise>
4559
+ <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
4560
+ </xsl:otherwise>
4561
+ </xsl:choose>
4562
+ </xsl:template>
4563
+
4529
4564
  <!-- row in table footer (tfoot) -->
4530
4565
  <xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
4531
4566
  <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
@@ -4863,8 +4898,16 @@
4863
4898
  <!-- figure's footnotes rendering -->
4864
4899
  <xsl:template name="fn_display_figure">
4865
4900
 
4901
+ <!-- current figure id -->
4902
+ <xsl:variable name="figure_id_">
4903
+ <xsl:value-of select="@id"/>
4904
+ <xsl:if test="not(@id)"><xsl:value-of select="generate-id()"/></xsl:if>
4905
+ </xsl:variable>
4906
+ <xsl:variable name="figure_id" select="normalize-space($figure_id_)"/>
4907
+
4908
+ <!-- all footnotes relates to the current figure -->
4866
4909
  <xsl:variable name="references">
4867
- <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
4910
+ <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])][ancestor::*[local-name() = 'figure'][1][@id = $figure_id]]">
4868
4911
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
4869
4912
  <xsl:apply-templates/>
4870
4913
  </fn>
@@ -4877,91 +4920,93 @@
4877
4920
  true
4878
4921
  </xsl:variable>
4879
4922
 
4880
- <!-- current hierarchy is 'figure' element -->
4881
- <xsl:variable name="following_dl_colwidths">
4882
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
4883
- <xsl:variable name="simple-table">
4884
- <!-- <xsl:variable name="doc_ns">
4885
- <xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
4886
- </xsl:variable>
4887
- <xsl:variable name="ns">
4888
- <xsl:choose>
4889
- <xsl:when test="normalize-space($doc_ns) != ''">
4890
- <xsl:value-of select="normalize-space($doc_ns)"/>
4891
- </xsl:when>
4892
- <xsl:otherwise>
4893
- <xsl:value-of select="substring-before(name(/*), '-')"/>
4894
- </xsl:otherwise>
4895
- </xsl:choose>
4896
- </xsl:variable> -->
4923
+ <fo:block>
4897
4924
 
4898
- <xsl:for-each select="*[local-name() = 'dl'][1]">
4899
- <tbody>
4900
- <xsl:apply-templates mode="dl"/>
4901
- </tbody>
4902
- </xsl:for-each>
4903
- </xsl:variable>
4925
+ <!-- current hierarchy is 'figure' element -->
4926
+ <xsl:variable name="following_dl_colwidths">
4927
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
4928
+ <xsl:variable name="simple-table">
4929
+ <!-- <xsl:variable name="doc_ns">
4930
+ <xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
4931
+ </xsl:variable>
4932
+ <xsl:variable name="ns">
4933
+ <xsl:choose>
4934
+ <xsl:when test="normalize-space($doc_ns) != ''">
4935
+ <xsl:value-of select="normalize-space($doc_ns)"/>
4936
+ </xsl:when>
4937
+ <xsl:otherwise>
4938
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
4939
+ </xsl:otherwise>
4940
+ </xsl:choose>
4941
+ </xsl:variable> -->
4904
4942
 
4905
- <xsl:call-template name="calculate-column-widths">
4906
- <xsl:with-param name="cols-count" select="2"/>
4907
- <xsl:with-param name="table" select="$simple-table"/>
4908
- </xsl:call-template>
4943
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
4944
+ <tbody>
4945
+ <xsl:apply-templates mode="dl"/>
4946
+ </tbody>
4947
+ </xsl:for-each>
4948
+ </xsl:variable>
4909
4949
 
4910
- </xsl:if>
4911
- </xsl:variable>
4950
+ <xsl:call-template name="calculate-column-widths">
4951
+ <xsl:with-param name="cols-count" select="2"/>
4952
+ <xsl:with-param name="table" select="$simple-table"/>
4953
+ </xsl:call-template>
4912
4954
 
4913
- <xsl:variable name="maxlength_dt">
4914
- <xsl:for-each select="*[local-name() = 'dl'][1]">
4915
- <xsl:call-template name="getMaxLength_dt"/>
4916
- </xsl:for-each>
4917
- </xsl:variable>
4955
+ </xsl:if>
4956
+ </xsl:variable>
4918
4957
 
4919
- <fo:block>
4920
- <fo:table width="95%" table-layout="fixed">
4921
- <xsl:if test="normalize-space($key_iso) = 'true'">
4922
- <xsl:attribute name="font-size">10pt</xsl:attribute>
4958
+ <xsl:variable name="maxlength_dt">
4959
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
4960
+ <xsl:call-template name="getMaxLength_dt"/>
4961
+ </xsl:for-each>
4962
+ </xsl:variable>
4923
4963
 
4924
- <xsl:attribute name="font-size">8pt</xsl:attribute>
4964
+ <fo:table width="95%" table-layout="fixed">
4965
+ <xsl:if test="normalize-space($key_iso) = 'true'">
4966
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
4925
4967
 
4926
- </xsl:if>
4927
- <xsl:choose>
4928
- <!-- if there 'dl', then set same columns width -->
4929
- <xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
4930
- <xsl:call-template name="setColumnWidth_dl">
4931
- <xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
4932
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
4933
- </xsl:call-template>
4934
- </xsl:when>
4935
- <xsl:otherwise>
4936
- <fo:table-column column-width="15%"/>
4937
- <fo:table-column column-width="85%"/>
4938
- </xsl:otherwise>
4939
- </xsl:choose>
4940
- <fo:table-body>
4941
- <xsl:for-each select="xalan:nodeset($references)//fn">
4942
- <xsl:variable name="reference" select="@reference"/>
4943
- <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
4944
- <fo:table-row>
4945
- <fo:table-cell>
4946
- <fo:block>
4947
- <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
4948
- <xsl:value-of select="@reference"/>
4949
- </fo:inline>
4950
- </fo:block>
4951
- </fo:table-cell>
4952
- <fo:table-cell>
4953
- <fo:block xsl:use-attribute-sets="figure-fn-body-style">
4954
- <xsl:if test="normalize-space($key_iso) = 'true'">
4968
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
4955
4969
 
4956
- </xsl:if>
4957
- <xsl:copy-of select="./node()"/>
4958
- </fo:block>
4959
- </fo:table-cell>
4960
- </fo:table-row>
4961
4970
  </xsl:if>
4962
- </xsl:for-each>
4963
- </fo:table-body>
4964
- </fo:table>
4971
+ <xsl:choose>
4972
+ <!-- if there 'dl', then set same columns width -->
4973
+ <xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
4974
+ <xsl:call-template name="setColumnWidth_dl">
4975
+ <xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
4976
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
4977
+ </xsl:call-template>
4978
+ </xsl:when>
4979
+ <xsl:otherwise>
4980
+ <fo:table-column column-width="5%"/>
4981
+ <fo:table-column column-width="95%"/>
4982
+ </xsl:otherwise>
4983
+ </xsl:choose>
4984
+ <fo:table-body>
4985
+ <xsl:for-each select="xalan:nodeset($references)//fn">
4986
+ <xsl:variable name="reference" select="@reference"/>
4987
+ <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
4988
+ <fo:table-row>
4989
+ <fo:table-cell>
4990
+ <fo:block>
4991
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
4992
+ <xsl:value-of select="@reference"/>
4993
+ </fo:inline>
4994
+ </fo:block>
4995
+ </fo:table-cell>
4996
+ <fo:table-cell>
4997
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
4998
+ <xsl:if test="normalize-space($key_iso) = 'true'">
4999
+
5000
+ </xsl:if>
5001
+ <xsl:copy-of select="./node()"/>
5002
+ </fo:block>
5003
+ </fo:table-cell>
5004
+ </fo:table-row>
5005
+ </xsl:if>
5006
+ </xsl:for-each>
5007
+ </fo:table-body>
5008
+ </fo:table>
5009
+
4965
5010
  </fo:block>
4966
5011
  </xsl:if>
4967
5012
 
@@ -5046,12 +5091,13 @@
5046
5091
 
5047
5092
  <xsl:attribute name="margin-bottom">15pt</xsl:attribute>
5048
5093
 
5049
- <xsl:variable name="title-where">
5094
+ <!-- <xsl:variable name="title-where">
5050
5095
  <xsl:call-template name="getLocalizedString">
5051
5096
  <xsl:with-param name="key">where</xsl:with-param>
5052
5097
  </xsl:call-template>
5053
5098
  </xsl:variable>
5054
- <xsl:value-of select="$title-where"/>
5099
+ <xsl:value-of select="$title-where"/> -->
5100
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
5055
5101
  </fo:block>
5056
5102
  <fo:block>
5057
5103
 
@@ -5067,12 +5113,14 @@
5067
5113
 
5068
5114
  <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
5069
5115
 
5070
- <xsl:variable name="title-where">
5116
+ <!-- <xsl:variable name="title-where">
5071
5117
  <xsl:call-template name="getLocalizedString">
5072
5118
  <xsl:with-param name="key">where</xsl:with-param>
5073
5119
  </xsl:call-template>
5074
5120
  </xsl:variable>
5075
- <xsl:value-of select="$title-where"/>
5121
+ <xsl:value-of select="$title-where"/><xsl:if test="$namespace = 'bsi' or $namespace = 'itu'">:</xsl:if> -->
5122
+ <!-- preceding 'p' with word 'where' -->
5123
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
5076
5124
  </fo:block>
5077
5125
  </xsl:when> <!-- END: a few components -->
5078
5126
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
@@ -5260,6 +5308,9 @@
5260
5308
 
5261
5309
  </xsl:template> <!-- END: dl -->
5262
5310
 
5311
+ <!-- ignore 'p' with 'where' in formula, before 'dl' -->
5312
+ <xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
5313
+
5263
5314
  <xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
5264
5315
  <xsl:param name="process">false</xsl:param>
5265
5316
  <xsl:if test="$process = 'true'">
@@ -6160,8 +6211,8 @@
6160
6211
 
6161
6212
  <!-- add zero-width space (#x200B) after dot with next non-digit -->
6162
6213
  <xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(\.)([^\d\s])','$1​$2')"/>
6163
- <!-- add zero-width space (#x200B) after characters: dash, equal, underscore, em dash, thin space, arrow right -->
6164
- <xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1),'(-|=|_|—| |→)','$1​')"/>
6214
+ <!-- add zero-width space (#x200B) after characters: dash, equal, underscore, em dash, thin space, arrow right, ; -->
6215
+ <xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1),'(-|=|_|—| |→|;)','$1​')"/>
6165
6216
  <!-- add zero-width space (#x200B) after characters: colon, if there aren't digits after -->
6166
6217
  <xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2),'(:)(\D)','$1​$2')"/>
6167
6218
  <!-- add zero-width space (#x200B) after characters: 'great than' -->
@@ -6172,8 +6223,19 @@
6172
6223
  <xsl:variable name="text6" select="java:replaceAll(java:java.lang.String.new($text5), '(?&lt;!\W)(\{)', '​$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
6173
6224
  <!-- add zero-width space (#x200B) after character: , -->
6174
6225
  <xsl:variable name="text7" select="java:replaceAll(java:java.lang.String.new($text6), '(\,)(?!\d)', '$1​')"/> <!-- negative lookahead: ',' not followed by digit -->
6226
+ <!-- add zero-width space (#x200B) after character: '/' -->
6227
+ <xsl:variable name="text8" select="java:replaceAll(java:java.lang.String.new($text7), '(\u002f)(?!\u002f)', '$1​')"/><!-- negative lookahead: '/' not followed by '/' -->
6228
+
6229
+ <xsl:variable name="text9">
6230
+ <xsl:choose>
6231
+ <xsl:when test="$isGenerateTableIF = 'true'">
6232
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text8), '([\u3000-\u9FFF])', '$1​')"/> <!-- 3000 - CJK Symbols and Punctuation ... 9FFF CJK Unified Ideographs-->
6233
+ </xsl:when>
6234
+ <xsl:otherwise><xsl:value-of select="$text8"/></xsl:otherwise>
6235
+ </xsl:choose>
6236
+ </xsl:variable>
6175
6237
 
6176
- <xsl:value-of select="$text7"/>
6238
+ <xsl:value-of select="$text9"/>
6177
6239
  </xsl:template>
6178
6240
 
6179
6241
  <xsl:template name="add-zero-spaces-link-java">
@@ -6181,8 +6243,8 @@
6181
6243
 
6182
6244
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
6183
6245
  <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
6184
- <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
6185
- <xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
6246
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
6247
+ <xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>
6186
6248
  <!-- remove zero-width space at the end -->
6187
6249
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
6188
6250
  </xsl:template>
@@ -6537,9 +6599,28 @@
6537
6599
  </xsl:variable>
6538
6600
  <xsl:copy-of select="$newRow"/>
6539
6601
 
6540
- <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
6541
- <xsl:with-param name="previousRow" select="$newRow"/>
6542
- </xsl:apply-templates>
6602
+ <!-- optimize to prevent StackOverflowError, just copy next 'tr' -->
6603
+ <xsl:variable name="currrow_num" select="count(preceding-sibling::tr) + 1"/>
6604
+ <xsl:variable name="nextrow_without_rowspan_" select="count(following-sibling::tr[*[@rowspan and @rowspan != 1]][1]/preceding-sibling::tr) + 1"/>
6605
+ <xsl:variable name="nextrow_without_rowspan" select="$nextrow_without_rowspan_ - $currrow_num"/>
6606
+ <xsl:choose>
6607
+ <xsl:when test="not(xalan:nodeset($newRow)/*/*[@rowspan and @rowspan != 1]) and $nextrow_without_rowspan &lt;= 0">
6608
+ <xsl:copy-of select="following-sibling::tr"/>
6609
+ </xsl:when>
6610
+ <!-- <xsl:when test="xalan:nodeset($newRow)/*[not(@rowspan) or (@rowspan = 1)] and $nextrow_without_rowspan &gt; 0">
6611
+ <xsl:copy-of select="following-sibling::tr[position() &lt;= $nextrow_without_rowspan]"/>
6612
+
6613
+ <xsl:copy-of select="following-sibling::tr[$nextrow_without_rowspan + 1]"/>
6614
+ <xsl:apply-templates select="following-sibling::tr[$nextrow_without_rowspan + 2]" mode="simple-table-rowspan">
6615
+ <xsl:with-param name="previousRow" select="following-sibling::tr[$nextrow_without_rowspan + 1]"/>
6616
+ </xsl:apply-templates>
6617
+ </xsl:when> -->
6618
+ <xsl:otherwise>
6619
+ <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
6620
+ <xsl:with-param name="previousRow" select="$newRow"/>
6621
+ </xsl:apply-templates>
6622
+ </xsl:otherwise>
6623
+ </xsl:choose>
6543
6624
  </xsl:template>
6544
6625
  <!-- End mode simple-table-rowspan -->
6545
6626
 
@@ -6702,6 +6783,27 @@
6702
6783
  </xsl:call-template>
6703
6784
  </xsl:template>
6704
6785
 
6786
+ <xsl:template match="*[local-name() = 'link'][normalize-space() = '']" mode="td_text_with_formatting">
6787
+ <xsl:variable name="link">
6788
+ <link_updated>
6789
+ <xsl:variable name="target_text">
6790
+ <xsl:choose>
6791
+ <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
6792
+ <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
6793
+ </xsl:when>
6794
+ <xsl:otherwise>
6795
+ <xsl:value-of select="normalize-space(@target)"/>
6796
+ </xsl:otherwise>
6797
+ </xsl:choose>
6798
+ </xsl:variable>
6799
+ <xsl:value-of select="$target_text"/>
6800
+ </link_updated>
6801
+ </xsl:variable>
6802
+ <xsl:for-each select="xalan:nodeset($link)/*">
6803
+ <xsl:apply-templates mode="td_text_with_formatting"/>
6804
+ </xsl:for-each>
6805
+ </xsl:template>
6806
+
6705
6807
  <xsl:template name="getFormattingTags">
6706
6808
  <tags>
6707
6809
  <xsl:if test="ancestor::*[local-name() = 'strong']"><tag>strong</tag></xsl:if>
@@ -7043,7 +7145,7 @@
7043
7145
  </xsl:variable>
7044
7146
  <fo:inline xsl:use-attribute-sets="link-style">
7045
7147
 
7046
- <xsl:if test="starts-with(normalize-space(@target), 'mailto:')">
7148
+ <xsl:if test="starts-with(normalize-space(@target), 'mailto:') and not(ancestor::*[local-name() = 'td'])">
7047
7149
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7048
7150
  </xsl:if>
7049
7151
 
@@ -7404,10 +7506,10 @@
7404
7506
  <fo:block xsl:use-attribute-sets="figure-style">
7405
7507
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
7406
7508
  </fo:block>
7407
- <xsl:call-template name="fn_display_figure"/>
7408
7509
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
7409
7510
  <xsl:call-template name="note"/>
7410
7511
  </xsl:for-each>
7512
+ <xsl:call-template name="fn_display_figure"/>
7411
7513
 
7412
7514
  <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
7413
7515
 
@@ -7470,7 +7572,13 @@
7470
7572
  </xsl:choose>
7471
7573
  </xsl:variable>
7472
7574
 
7473
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
7575
+ <xsl:variable name="image_width_effective">
7576
+
7577
+ <xsl:value-of select="$width_effective"/>
7578
+
7579
+ </xsl:variable>
7580
+
7581
+ <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
7474
7582
  <xsl:if test="number($scale) &lt; 100">
7475
7583
 
7476
7584
  <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
@@ -8057,6 +8165,13 @@
8057
8165
  <xsl:when test="$contents_nodes/doc">
8058
8166
  <xsl:choose>
8059
8167
  <xsl:when test="count($contents_nodes/doc) &gt; 1">
8168
+
8169
+ <xsl:if test="$contents_nodes/collection">
8170
+ <fo:bookmark internal-destination="{$contents/collection/@firstpage_id}">
8171
+ <fo:bookmark-title>collection.pdf</fo:bookmark-title>
8172
+ </fo:bookmark>
8173
+ </xsl:if>
8174
+
8060
8175
  <xsl:for-each select="$contents_nodes/doc">
8061
8176
  <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
8062
8177
  <xsl:if test="@bundle = 'true'">
@@ -9949,12 +10064,51 @@
9949
10064
 
9950
10065
  <fo:list-block xsl:use-attribute-sets="list-style">
9951
10066
 
10067
+ <xsl:variable name="provisional_distance_between_starts_">
10068
+ <attributes xsl:use-attribute-sets="list-style">
10069
+
10070
+ <xsl:if test="ancestor::iec:legal-statement">
10071
+ <xsl:attribute name="provisional-distance-between-starts">5mm</xsl:attribute>
10072
+ </xsl:if>
10073
+
10074
+ </attributes>
10075
+ </xsl:variable>
10076
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space(xalan:nodeset($provisional_distance_between_starts_)/attributes/@provisional-distance-between-starts)"/>
10077
+ <xsl:if test="$provisional_distance_between_starts != ''">
10078
+ <xsl:attribute name="provisional-distance-between-starts"><xsl:value-of select="$provisional_distance_between_starts"/></xsl:attribute>
10079
+ </xsl:if>
10080
+ <xsl:variable name="provisional_distance_between_starts_value" select="substring-before($provisional_distance_between_starts, 'mm')"/>
10081
+
10082
+ <!-- increase provisional-distance-between-starts for long lists -->
10083
+ <xsl:if test="local-name() = 'ol'">
10084
+ <!-- Examples: xiii), xviii), xxviii) -->
10085
+ <xsl:variable name="item_numbers">
10086
+ <xsl:for-each select="*[local-name() = 'li']">
10087
+ <item><xsl:call-template name="getListItemFormat"/></item>
10088
+ </xsl:for-each>
10089
+ </xsl:variable>
10090
+
10091
+ <xsl:variable name="max_length">
10092
+ <xsl:for-each select="xalan:nodeset($item_numbers)/item">
10093
+ <xsl:sort select="string-length(.)" data-type="number" order="descending"/>
10094
+ <xsl:if test="position() = 1"><xsl:value-of select="string-length(.)"/></xsl:if>
10095
+ </xsl:for-each>
10096
+ </xsl:variable>
10097
+
10098
+ <!-- base width (provisional-distance-between-starts) for 4 chars -->
10099
+ <xsl:variable name="addon" select="$max_length - 4"/>
10100
+ <xsl:if test="$addon &gt; 0">
10101
+ <xsl:attribute name="provisional-distance-between-starts"><xsl:value-of select="$provisional_distance_between_starts_value + $addon * 2"/>mm</xsl:attribute>
10102
+ </xsl:if>
10103
+ <!-- DEBUG -->
10104
+ <!-- <xsl:copy-of select="$item_numbers"/>
10105
+ <max_length><xsl:value-of select="$max_length"/></max_length>
10106
+ <addon><xsl:value-of select="$addon"/></addon> -->
10107
+ </xsl:if>
10108
+
9952
10109
  <xsl:if test="ancestor::iec:ul or ancestor::iec:ol">
9953
10110
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
9954
10111
  </xsl:if>
9955
- <xsl:if test="ancestor::iec:legal-statement">
9956
- <xsl:attribute name="provisional-distance-between-starts">5mm</xsl:attribute>
9957
- </xsl:if>
9958
10112
 
9959
10113
  <xsl:if test="*[local-name() = 'name']">
9960
10114
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
@@ -10913,7 +11067,7 @@
10913
11067
  <!-- \S matches any non-whitespace character (equivalent to [^\r\n\t\f\v ]) -->
10914
11068
  <!-- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable> -->
10915
11069
  <!-- add &lt; and &gt; to \S -->
10916
- <xsl:variable name="regex_S">[^\r\n\t\f\v \&lt;&gt;]</xsl:variable>
11070
+ <xsl:variable name="regex_S">[^\r\n\t\f\v \&lt;&gt;\u3000-\u9FFF]</xsl:variable>
10917
11071
  <xsl:variable name="regex_solidus_units">((\b((<xsl:value-of select="$regex_S"/>{1,3}\/<xsl:value-of select="$regex_S"/>+)|(<xsl:value-of select="$regex_S"/>+\/<xsl:value-of select="$regex_S"/>{1,3}))\b)|(\/<xsl:value-of select="$regex_S"/>{1,3})\b)</xsl:variable>
10918
11072
  <xsl:variable name="text3">
10919
11073
  <text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
@@ -10935,7 +11089,8 @@
10935
11089
  <xsl:choose>
10936
11090
  <xsl:when test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
10937
11091
  <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
10938
- <xsl:variable name="regex_dots_units">((\b((\S{1,3}\.\S+)|(\S+\.\S{1,3}))\b)|(\.\S{1,3})\b)</xsl:variable>
11092
+ <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
11093
+ <xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
10939
11094
  <xsl:for-each select="xalan:nodeset($text3)/text/node()">
10940
11095
  <xsl:choose>
10941
11096
  <xsl:when test="self::text()">
@@ -11538,6 +11693,23 @@
11538
11693
  </xsl:if>
11539
11694
  </xsl:template>
11540
11695
 
11696
+ <xsl:template name="setBlockAttributes">
11697
+ <xsl:param name="text_align_default">left</xsl:param>
11698
+ <xsl:call-template name="setTextAlignment">
11699
+ <xsl:with-param name="default" select="$text_align_default"/>
11700
+ </xsl:call-template>
11701
+
11702
+ <!-- https://www.metanorma.org/author/topics/document-format/text/#avoiding-page-breaks -->
11703
+ <!-- Example: keep-lines-together="true" -->
11704
+ <xsl:if test="@keep-lines-together = 'true'">
11705
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
11706
+ </xsl:if>
11707
+ <!-- Example: keep-with-next="true" -->
11708
+ <xsl:if test="@keep-with-next = 'true'">
11709
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
11710
+ </xsl:if>
11711
+ </xsl:template>
11712
+
11541
11713
  <xsl:template name="number-to-words">
11542
11714
  <xsl:param name="number"/>
11543
11715
  <xsl:param name="first"/>
@@ -200,7 +200,7 @@ module IsoDoc
200
200
  preceding_floating_titles(name, div)
201
201
  return if name.nil?
202
202
 
203
- div.h1 **{ class: "Annex" } do |t|
203
+ div.h1 class: "Annex" do |t|
204
204
  name.children.each { |c2| parse(c2, t) }
205
205
  clause_parse_subtitle(name, t)
206
206
  end
@@ -19,14 +19,7 @@
19
19
  <optional>
20
20
  <attribute name="script"/>
21
21
  </optional>
22
- <optional>
23
- <attribute name="tag"/>
24
- </optional>
25
- <optional>
26
- <attribute name="multilingual-rendering">
27
- <ref name="MultilingualRenderingType"/>
28
- </attribute>
29
- </optional>
22
+ <ref name="BlockAttributes"/>
30
23
  <oneOrMore>
31
24
  <ref name="preferred"/>
32
25
  </oneOrMore>
@@ -220,24 +220,7 @@
220
220
  <attribute name="id">
221
221
  <data type="ID"/>
222
222
  </attribute>
223
- <optional>
224
- <attribute name="keep-with-next">
225
- <data type="boolean"/>
226
- </attribute>
227
- </optional>
228
- <optional>
229
- <attribute name="keep-lines-together">
230
- <data type="boolean"/>
231
- </attribute>
232
- </optional>
233
- <optional>
234
- <attribute name="tag"/>
235
- </optional>
236
- <optional>
237
- <attribute name="multilingual-rendering">
238
- <ref name="MultilingualRenderingType"/>
239
- </attribute>
240
- </optional>
223
+ <ref name="BlockAttributes"/>
241
224
  <optional>
242
225
  <ref name="tname"/>
243
226
  </optional>
@@ -254,24 +237,7 @@
254
237
  <attribute name="id">
255
238
  <data type="ID"/>
256
239
  </attribute>
257
- <optional>
258
- <attribute name="keep-with-next">
259
- <data type="boolean"/>
260
- </attribute>
261
- </optional>
262
- <optional>
263
- <attribute name="keep-lines-together">
264
- <data type="boolean"/>
265
- </attribute>
266
- </optional>
267
- <optional>
268
- <attribute name="tag"/>
269
- </optional>
270
- <optional>
271
- <attribute name="multilingual-rendering">
272
- <ref name="MultilingualRenderingType"/>
273
- </attribute>
274
- </optional>
240
+ <ref name="BlockAttributes"/>
275
241
  <optional>
276
242
  <attribute name="type">
277
243
  <choice>
@@ -299,29 +265,12 @@
299
265
  <attribute name="id">
300
266
  <data type="ID"/>
301
267
  </attribute>
302
- <optional>
303
- <attribute name="keep-with-next">
304
- <data type="boolean"/>
305
- </attribute>
306
- </optional>
307
- <optional>
308
- <attribute name="keep-lines-together">
309
- <data type="boolean"/>
310
- </attribute>
311
- </optional>
268
+ <ref name="BlockAttributes"/>
312
269
  <optional>
313
270
  <attribute name="key">
314
271
  <data type="boolean"/>
315
272
  </attribute>
316
273
  </optional>
317
- <optional>
318
- <attribute name="tag"/>
319
- </optional>
320
- <optional>
321
- <attribute name="multilingual-rendering">
322
- <ref name="MultilingualRenderingType"/>
323
- </attribute>
324
- </optional>
325
274
  <optional>
326
275
  <ref name="tname"/>
327
276
  </optional>
@@ -362,24 +311,7 @@
362
311
  <optional>
363
312
  <attribute name="number"/>
364
313
  </optional>
365
- <optional>
366
- <attribute name="keep-with-next">
367
- <data type="boolean"/>
368
- </attribute>
369
- </optional>
370
- <optional>
371
- <attribute name="keep-lines-together">
372
- <data type="boolean"/>
373
- </attribute>
374
- </optional>
375
- <optional>
376
- <attribute name="tag"/>
377
- </optional>
378
- <optional>
379
- <attribute name="multilingual-rendering">
380
- <ref name="MultilingualRenderingType"/>
381
- </attribute>
382
- </optional>
314
+ <ref name="BlockAttributes"/>
383
315
  <optional>
384
316
  <ref name="tname"/>
385
317
  </optional>
@@ -427,27 +359,10 @@
427
359
  <data type="anyURI"/>
428
360
  </attribute>
429
361
  </optional>
430
- <optional>
431
- <attribute name="keep-with-next">
432
- <data type="boolean"/>
433
- </attribute>
434
- </optional>
435
- <optional>
436
- <attribute name="keep-lines-together">
437
- <data type="boolean"/>
438
- </attribute>
439
- </optional>
440
362
  <optional>
441
363
  <attribute name="width"/>
442
364
  </optional>
443
- <optional>
444
- <attribute name="tag"/>
445
- </optional>
446
- <optional>
447
- <attribute name="multilingual-rendering">
448
- <ref name="MultilingualRenderingType"/>
449
- </attribute>
450
- </optional>
365
+ <ref name="BlockAttributes"/>
451
366
  <optional>
452
367
  <ref name="colgroup"/>
453
368
  </optional>
@@ -485,27 +400,10 @@
485
400
  <optional>
486
401
  <attribute name="subsequence"/>
487
402
  </optional>
488
- <optional>
489
- <attribute name="keep-with-next">
490
- <data type="boolean"/>
491
- </attribute>
492
- </optional>
493
- <optional>
494
- <attribute name="keep-lines-together">
495
- <data type="boolean"/>
496
- </attribute>
497
- </optional>
498
403
  <optional>
499
404
  <attribute name="class"/>
500
405
  </optional>
501
- <optional>
502
- <attribute name="tag"/>
503
- </optional>
504
- <optional>
505
- <attribute name="multilingual-rendering">
506
- <ref name="MultilingualRenderingType"/>
507
- </attribute>
508
- </optional>
406
+ <ref name="BlockAttributes"/>
509
407
  <optional>
510
408
  <ref name="source"/>
511
409
  </optional>
@@ -551,27 +449,10 @@
551
449
  <optional>
552
450
  <attribute name="subsequence"/>
553
451
  </optional>
554
- <optional>
555
- <attribute name="keep-with-next">
556
- <data type="boolean"/>
557
- </attribute>
558
- </optional>
559
- <optional>
560
- <attribute name="keep-lines-together">
561
- <data type="boolean"/>
562
- </attribute>
563
- </optional>
564
452
  <optional>
565
453
  <attribute name="lang"/>
566
454
  </optional>
567
- <optional>
568
- <attribute name="tag"/>
569
- </optional>
570
- <optional>
571
- <attribute name="multilingual-rendering">
572
- <ref name="MultilingualRenderingType"/>
573
- </attribute>
574
- </optional>
455
+ <ref name="BlockAttributes"/>
575
456
  <optional>
576
457
  <attribute name="linenums">
577
458
  <data type="boolean"/>
@@ -610,29 +491,12 @@
610
491
  <optional>
611
492
  <attribute name="subsequence"/>
612
493
  </optional>
613
- <optional>
614
- <attribute name="keep-with-next">
615
- <data type="boolean"/>
616
- </attribute>
617
- </optional>
618
- <optional>
619
- <attribute name="keep-lines-together">
620
- <data type="boolean"/>
621
- </attribute>
622
- </optional>
623
494
  <optional>
624
495
  <attribute name="inequality">
625
496
  <data type="boolean"/>
626
497
  </attribute>
627
498
  </optional>
628
- <optional>
629
- <attribute name="tag"/>
630
- </optional>
631
- <optional>
632
- <attribute name="multilingual-rendering">
633
- <ref name="MultilingualRenderingType"/>
634
- </attribute>
635
- </optional>
499
+ <ref name="BlockAttributes"/>
636
500
  <ref name="stem"/>
637
501
  <optional>
638
502
  <ref name="dl"/>
@@ -651,27 +515,7 @@
651
515
  <ref name="Alignments"/>
652
516
  </attribute>
653
517
  </optional>
654
- <optional>
655
- <attribute name="keep-with-next">
656
- <data type="boolean"/>
657
- </attribute>
658
- </optional>
659
- <optional>
660
- <attribute name="keep-lines-together">
661
- <data type="boolean"/>
662
- </attribute>
663
- </optional>
664
- <optional>
665
- <attribute name="tag"/>
666
- </optional>
667
- <optional>
668
- <attribute name="type"/>
669
- </optional>
670
- <optional>
671
- <attribute name="multilingual-rendering">
672
- <ref name="MultilingualRenderingType"/>
673
- </attribute>
674
- </optional>
518
+ <ref name="BlockAttributes"/>
675
519
  <zeroOrMore>
676
520
  <ref name="TextElement"/>
677
521
  </zeroOrMore>
@@ -689,27 +533,10 @@
689
533
  <ref name="Alignments"/>
690
534
  </attribute>
691
535
  </optional>
692
- <optional>
693
- <attribute name="keep-with-next">
694
- <data type="boolean"/>
695
- </attribute>
696
- </optional>
697
- <optional>
698
- <attribute name="keep-lines-together">
699
- <data type="boolean"/>
700
- </attribute>
701
- </optional>
702
- <optional>
703
- <attribute name="tag"/>
704
- </optional>
705
536
  <optional>
706
537
  <attribute name="type"/>
707
538
  </optional>
708
- <optional>
709
- <attribute name="multilingual-rendering">
710
- <ref name="MultilingualRenderingType"/>
711
- </attribute>
712
- </optional>
539
+ <ref name="BlockAttributes"/>
713
540
  <zeroOrMore>
714
541
  <choice>
715
542
  <ref name="TextElement"/>
@@ -731,24 +558,7 @@
731
558
  <ref name="Alignments"/>
732
559
  </attribute>
733
560
  </optional>
734
- <optional>
735
- <attribute name="keep-with-next">
736
- <data type="boolean"/>
737
- </attribute>
738
- </optional>
739
- <optional>
740
- <attribute name="keep-lines-together">
741
- <data type="boolean"/>
742
- </attribute>
743
- </optional>
744
- <optional>
745
- <attribute name="tag"/>
746
- </optional>
747
- <optional>
748
- <attribute name="multilingual-rendering">
749
- <ref name="MultilingualRenderingType"/>
750
- </attribute>
751
- </optional>
561
+ <ref name="BlockAttributes"/>
752
562
  <optional>
753
563
  <ref name="quote-source"/>
754
564
  </optional>
@@ -828,27 +638,9 @@
828
638
  <optional>
829
639
  <attribute name="subsequence"/>
830
640
  </optional>
831
- <optional>
832
- <attribute name="keep-with-next">
833
- <data type="boolean"/>
834
- </attribute>
835
- </optional>
836
- <optional>
837
- <attribute name="keep-lines-together">
838
- <data type="boolean"/>
839
- </attribute>
840
- </optional>
841
641
  <optional>
842
642
  <attribute name="type"/>
843
643
  </optional>
844
- <optional>
845
- <attribute name="tag"/>
846
- </optional>
847
- <optional>
848
- <attribute name="multilingual-rendering">
849
- <ref name="MultilingualRenderingType"/>
850
- </attribute>
851
- </optional>
852
644
  <optional>
853
645
  <attribute name="coverpage">
854
646
  <data type="boolean"/>
@@ -859,6 +651,7 @@
859
651
  <data type="boolean"/>
860
652
  </attribute>
861
653
  </optional>
654
+ <ref name="BlockAttributes"/>
862
655
  <oneOrMore>
863
656
  <choice>
864
657
  <ref name="paragraph"/>
@@ -1332,14 +1125,7 @@
1332
1125
  <optional>
1333
1126
  <attribute name="class"/>
1334
1127
  </optional>
1335
- <optional>
1336
- <attribute name="tag"/>
1337
- </optional>
1338
- <optional>
1339
- <attribute name="multilingual-rendering">
1340
- <ref name="MultilingualRenderingType"/>
1341
- </attribute>
1342
- </optional>
1128
+ <ref name="BlockAttributes"/>
1343
1129
  <zeroOrMore>
1344
1130
  <choice>
1345
1131
  <ref name="TextElement"/>
@@ -1908,7 +1694,10 @@
1908
1694
  </zeroOrMore>
1909
1695
  <choice>
1910
1696
  <oneOrMore>
1911
- <ref name="term"/>
1697
+ <choice>
1698
+ <ref name="term"/>
1699
+ <ref name="terms"/>
1700
+ </choice>
1912
1701
  </oneOrMore>
1913
1702
  <group>
1914
1703
  <zeroOrMore>
@@ -1934,14 +1723,7 @@
1934
1723
  <optional>
1935
1724
  <attribute name="script"/>
1936
1725
  </optional>
1937
- <optional>
1938
- <attribute name="tag"/>
1939
- </optional>
1940
- <optional>
1941
- <attribute name="multilingual-rendering">
1942
- <ref name="MultilingualRenderingType"/>
1943
- </attribute>
1944
- </optional>
1726
+ <ref name="BlockAttributes"/>
1945
1727
  <oneOrMore>
1946
1728
  <ref name="preferred"/>
1947
1729
  </oneOrMore>
@@ -2282,24 +2064,7 @@
2282
2064
  <optional>
2283
2065
  <attribute name="subsequence"/>
2284
2066
  </optional>
2285
- <optional>
2286
- <attribute name="keep-with-next">
2287
- <data type="boolean"/>
2288
- </attribute>
2289
- </optional>
2290
- <optional>
2291
- <attribute name="keep-lines-together">
2292
- <data type="boolean"/>
2293
- </attribute>
2294
- </optional>
2295
- <optional>
2296
- <attribute name="tag"/>
2297
- </optional>
2298
- <optional>
2299
- <attribute name="multilingual-rendering">
2300
- <ref name="MultilingualRenderingType"/>
2301
- </attribute>
2302
- </optional>
2067
+ <ref name="BlockAttributes"/>
2303
2068
  <oneOrMore>
2304
2069
  <choice>
2305
2070
  <ref name="paragraph"/>
@@ -2316,24 +2081,7 @@
2316
2081
  <attribute name="id">
2317
2082
  <data type="ID"/>
2318
2083
  </attribute>
2319
- <optional>
2320
- <attribute name="keep-with-next">
2321
- <data type="boolean"/>
2322
- </attribute>
2323
- </optional>
2324
- <optional>
2325
- <attribute name="keep-lines-together">
2326
- <data type="boolean"/>
2327
- </attribute>
2328
- </optional>
2329
- <optional>
2330
- <attribute name="tag"/>
2331
- </optional>
2332
- <optional>
2333
- <attribute name="multilingual-rendering">
2334
- <ref name="MultilingualRenderingType"/>
2335
- </attribute>
2336
- </optional>
2084
+ <ref name="BlockAttributes"/>
2337
2085
  <oneOrMore>
2338
2086
  <choice>
2339
2087
  <ref name="formula"/>
@@ -2460,14 +2208,7 @@
2460
2208
  <optional>
2461
2209
  <attribute name="title"/>
2462
2210
  </optional>
2463
- <optional>
2464
- <attribute name="tag"/>
2465
- </optional>
2466
- <optional>
2467
- <attribute name="multilingual-rendering">
2468
- <ref name="MultilingualRenderingType"/>
2469
- </attribute>
2470
- </optional>
2211
+ <ref name="BlockAttributes"/>
2471
2212
  <optional>
2472
2213
  <element name="location">
2473
2214
  <zeroOrMore>
@@ -2527,14 +2268,7 @@
2527
2268
  </define>
2528
2269
  <define name="imagemap">
2529
2270
  <element name="imagemap">
2530
- <optional>
2531
- <attribute name="tag"/>
2532
- </optional>
2533
- <optional>
2534
- <attribute name="multilingual-rendering">
2535
- <ref name="MultilingualRenderingType"/>
2536
- </attribute>
2537
- </optional>
2271
+ <ref name="BlockAttributes"/>
2538
2272
  <ref name="figure"/>
2539
2273
  <zeroOrMore>
2540
2274
  <element name="area">
@@ -2580,14 +2314,7 @@
2580
2314
  </define>
2581
2315
  <define name="svgmap">
2582
2316
  <element name="svgmap">
2583
- <optional>
2584
- <attribute name="tag"/>
2585
- </optional>
2586
- <optional>
2587
- <attribute name="multilingual-rendering">
2588
- <ref name="MultilingualRenderingType"/>
2589
- </attribute>
2590
- </optional>
2317
+ <ref name="BlockAttributes"/>
2591
2318
  <ref name="figure"/>
2592
2319
  <zeroOrMore>
2593
2320
  <element name="target">
@@ -2694,6 +2421,29 @@
2694
2421
  </oneOrMore>
2695
2422
  </element>
2696
2423
  </define>
2424
+ <define name="BlockAttributes">
2425
+ <optional>
2426
+ <attribute name="keep-with-next">
2427
+ <data type="boolean"/>
2428
+ </attribute>
2429
+ </optional>
2430
+ <optional>
2431
+ <attribute name="keep-lines-together">
2432
+ <data type="boolean"/>
2433
+ </attribute>
2434
+ </optional>
2435
+ <optional>
2436
+ <attribute name="tag"/>
2437
+ </optional>
2438
+ <optional>
2439
+ <attribute name="multilingual-rendering">
2440
+ <ref name="MultilingualRenderingType"/>
2441
+ </attribute>
2442
+ </optional>
2443
+ <optional>
2444
+ <attribute name="columns"/>
2445
+ </optional>
2446
+ </define>
2697
2447
  <start>
2698
2448
  <ref name="standard-document"/>
2699
2449
  </start>
@@ -88,14 +88,7 @@
88
88
  <optional>
89
89
  <attribute name="script"/>
90
90
  </optional>
91
- <optional>
92
- <attribute name="tag"/>
93
- </optional>
94
- <optional>
95
- <attribute name="multilingual-rendering">
96
- <ref name="MultilingualRenderingType"/>
97
- </attribute>
98
- </optional>
91
+ <ref name="BlockAttributes"/>
99
92
  <ref name="preferred"/>
100
93
  <zeroOrMore>
101
94
  <ref name="admitted"/>
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.2.5".freeze
3
+ VERSION = "2.2.6".freeze
4
4
  end
5
5
  end
6
6
 
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.test_files = `git ls-files -- {spec}/*`.split("\n")
31
31
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
32
32
 
33
- spec.add_dependency "metanorma-iso", "~> 2.3.0"
33
+ spec.add_dependency "metanorma-iso", "~> 2.4.0"
34
34
  spec.add_dependency "ruby-jing"
35
35
 
36
36
  spec.add_development_dependency "debug"
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.5
4
+ version: 2.2.6
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-02-27 00:00:00.000000000 Z
11
+ date: 2023-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.3.0
19
+ version: 2.4.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.3.0
26
+ version: 2.4.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ruby-jing
29
29
  requirement: !ruby/object:Gem::Requirement