metanorma-ribose 2.2.4 → 2.2.5

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: b7fe161c84c37ab5b701b48ad724eb21fd1b1eb9e7fbf5b51baeef16135f0ad3
4
- data.tar.gz: 64eaca15058fac006e020351807e8646ca000e515fd03ce676a9af4decaa4b39
3
+ metadata.gz: b6569f96ac8899474552e44500006cf02b8c2e4c3e1da5b9548dbc03d17e1617
4
+ data.tar.gz: 1c71fcf61463fdde5a8c40cc1177373d2ca03ab5bd6c428685244b6eacc8a678
5
5
  SHA512:
6
- metadata.gz: 523c6ab1d22bf87d03cad3bdebf78cf2cda78e675e2cd071e059e670e8cd330a17a6943a2cb8cf38d6e42f00ece0a02b61a03eafb1e202285dfaa15cbeca9c64
7
- data.tar.gz: 27ebab46f0aec117f8f5ffee0883ae8378d1cc025b10d6b0517d92ab6adcc75352de9d53c324a3639df31c3d745f0f7dd46a5be146a76e55601e5e7390f780a8
6
+ metadata.gz: 66968b01642c0b65450b61e359e0e7e17c80447b0d729f114518d89c585e9188ba86af499a7b8c20636625d2901a90815df9757f8adf1bc8ca99d4f49e192956
7
+ data.tar.gz: 8f0d4ab655b1592aa400c0c7844a96e905e9a67c93458380e09c358955e8e4c26762dcda3043302a9b6b0c791ae9e9921ef12320491c2c4dcb8e8107c137e8d4
@@ -5,8 +5,8 @@ module IsoDoc
5
5
  f = docxml.at(ns("//executivesummary")) || return
6
6
  title_attr = { class: "IntroTitle" }
7
7
  page_break(out)
8
- out.div **{ class: "Section3", id: f["id"] } do |div|
9
- clause_name(nil, f&.at(ns("./title")), div, title_attr)
8
+ out.div class: "Section3", id: f["id"] do |div|
9
+ clause_name(f, f&.at(ns("./title")), div, title_attr)
10
10
  f.elements.each do |e|
11
11
  parse(e, div) unless e.name == "title"
12
12
  end
@@ -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
 
@@ -1799,7 +1799,6 @@
1799
1799
 
1800
1800
  <xsl:attribute-set name="table-header-cell-style">
1801
1801
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1802
- <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1803
1802
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1804
1803
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1805
1804
  <xsl:attribute name="display-align">center</xsl:attribute>
@@ -1811,7 +1810,6 @@
1811
1810
 
1812
1811
  <xsl:attribute-set name="table-cell-style">
1813
1812
  <xsl:attribute name="display-align">center</xsl:attribute>
1814
- <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1815
1813
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1816
1814
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1817
1815
 
@@ -2609,7 +2607,7 @@
2609
2607
  <xsl:apply-templates select="." mode="contents"/>
2610
2608
  </xsl:for-each>
2611
2609
 
2612
- <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')]]">
2610
+ <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]">
2613
2611
  <xsl:sort select="@displayorder" data-type="number"/>
2614
2612
  <xsl:apply-templates select="." mode="contents"/>
2615
2613
  </xsl:for-each>
@@ -3540,6 +3538,10 @@
3540
3538
  </xsl:choose>
3541
3539
  </xsl:variable>
3542
3540
 
3541
+ <xsl:variable name="table_fn_block">
3542
+ <xsl:call-template name="table_fn_display"/>
3543
+ </xsl:variable>
3544
+
3543
3545
  <xsl:variable name="tableWithNotesAndFootnotes">
3544
3546
 
3545
3547
  <fo:table keep-with-previous="always">
@@ -3587,11 +3589,25 @@
3587
3589
 
3588
3590
  <xsl:apply-templates select="../*[local-name()='note']"/>
3589
3591
 
3592
+ <xsl:variable name="isDisplayRowSeparator">
3593
+
3594
+ </xsl:variable>
3595
+
3590
3596
  <!-- horizontal row separator -->
3597
+ <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
3598
+ <xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
3599
+ <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
3600
+
3601
+ <xsl:call-template name="setBordersTableArray"/>
3602
+ <fo:block font-size="1pt"> </fo:block>
3603
+ </fo:block-container>
3604
+ </xsl:if>
3605
+ </xsl:if>
3591
3606
 
3592
3607
  <!-- fn processing -->
3593
3608
 
3594
- <xsl:call-template name="table_fn_display"/>
3609
+ <!-- <xsl:call-template name="table_fn_display" /> -->
3610
+ <xsl:copy-of select="$table_fn_block"/>
3595
3611
 
3596
3612
  <!-- for PAS display Notes after footnotes -->
3597
3613
 
@@ -3708,6 +3724,28 @@
3708
3724
  </fo:table-row>
3709
3725
  </xsl:template>
3710
3726
 
3727
+ <xsl:template name="setBorderUnderRow">
3728
+ <xsl:variable name="border_under_row_" select="normalize-space(ancestor::*[local-name() = 'table'][1]/@border-under-row)"/>
3729
+ <xsl:choose>
3730
+ <xsl:when test="$border_under_row_ != ''">
3731
+ <xsl:variable name="table_id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
3732
+ <xsl:variable name="row_num_"><xsl:number level="any" count="*[local-name() = 'table'][@id = $table_id]//*[local-name() = 'tr']"/></xsl:variable>
3733
+ <xsl:variable name="row_num" select="number($row_num_) - 1"/> <!-- because values in border-under-row start with 0 -->
3734
+ <xsl:variable name="border_under_row">
3735
+ <xsl:call-template name="split">
3736
+ <xsl:with-param name="pText" select="$border_under_row_"/>
3737
+ </xsl:call-template>
3738
+ </xsl:variable>
3739
+ <xsl:if test="xalan:nodeset($border_under_row)/item[. = normalize-space($row_num)]">
3740
+ <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
3741
+ </xsl:if>
3742
+ </xsl:when>
3743
+ <xsl:otherwise>
3744
+ <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
3745
+ </xsl:otherwise>
3746
+ </xsl:choose>
3747
+ </xsl:template>
3748
+
3711
3749
  <!-- row in table footer (tfoot) -->
3712
3750
  <xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
3713
3751
  <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
@@ -4041,8 +4079,16 @@
4041
4079
  <!-- figure's footnotes rendering -->
4042
4080
  <xsl:template name="fn_display_figure">
4043
4081
 
4082
+ <!-- current figure id -->
4083
+ <xsl:variable name="figure_id_">
4084
+ <xsl:value-of select="@id"/>
4085
+ <xsl:if test="not(@id)"><xsl:value-of select="generate-id()"/></xsl:if>
4086
+ </xsl:variable>
4087
+ <xsl:variable name="figure_id" select="normalize-space($figure_id_)"/>
4088
+
4089
+ <!-- all footnotes relates to the current figure -->
4044
4090
  <xsl:variable name="references">
4045
- <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
4091
+ <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])][ancestor::*[local-name() = 'figure'][1][@id = $figure_id]]">
4046
4092
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
4047
4093
  <xsl:apply-templates/>
4048
4094
  </fn>
@@ -4055,91 +4101,93 @@
4055
4101
 
4056
4102
  </xsl:variable>
4057
4103
 
4058
- <!-- current hierarchy is 'figure' element -->
4059
- <xsl:variable name="following_dl_colwidths">
4060
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
4061
- <xsl:variable name="simple-table">
4062
- <!-- <xsl:variable name="doc_ns">
4063
- <xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
4104
+ <fo:block>
4105
+
4106
+ <!-- current hierarchy is 'figure' element -->
4107
+ <xsl:variable name="following_dl_colwidths">
4108
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
4109
+ <xsl:variable name="simple-table">
4110
+ <!-- <xsl:variable name="doc_ns">
4111
+ <xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
4112
+ </xsl:variable>
4113
+ <xsl:variable name="ns">
4114
+ <xsl:choose>
4115
+ <xsl:when test="normalize-space($doc_ns) != ''">
4116
+ <xsl:value-of select="normalize-space($doc_ns)"/>
4117
+ </xsl:when>
4118
+ <xsl:otherwise>
4119
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
4120
+ </xsl:otherwise>
4121
+ </xsl:choose>
4122
+ </xsl:variable> -->
4123
+
4124
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
4125
+ <tbody>
4126
+ <xsl:apply-templates mode="dl"/>
4127
+ </tbody>
4128
+ </xsl:for-each>
4129
+ </xsl:variable>
4130
+
4131
+ <xsl:call-template name="calculate-column-widths">
4132
+ <xsl:with-param name="cols-count" select="2"/>
4133
+ <xsl:with-param name="table" select="$simple-table"/>
4134
+ </xsl:call-template>
4135
+
4136
+ </xsl:if>
4064
4137
  </xsl:variable>
4065
- <xsl:variable name="ns">
4138
+
4139
+ <xsl:variable name="maxlength_dt">
4140
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
4141
+ <xsl:call-template name="getMaxLength_dt"/>
4142
+ </xsl:for-each>
4143
+ </xsl:variable>
4144
+
4145
+ <fo:table width="95%" table-layout="fixed">
4146
+ <xsl:if test="normalize-space($key_iso) = 'true'">
4147
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
4148
+
4149
+ </xsl:if>
4066
4150
  <xsl:choose>
4067
- <xsl:when test="normalize-space($doc_ns) != ''">
4068
- <xsl:value-of select="normalize-space($doc_ns)"/>
4151
+ <!-- if there 'dl', then set same columns width -->
4152
+ <xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
4153
+ <xsl:call-template name="setColumnWidth_dl">
4154
+ <xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
4155
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
4156
+ </xsl:call-template>
4069
4157
  </xsl:when>
4070
4158
  <xsl:otherwise>
4071
- <xsl:value-of select="substring-before(name(/*), '-')"/>
4159
+ <fo:table-column column-width="5%"/>
4160
+ <fo:table-column column-width="95%"/>
4072
4161
  </xsl:otherwise>
4073
4162
  </xsl:choose>
4074
- </xsl:variable> -->
4075
-
4076
- <xsl:for-each select="*[local-name() = 'dl'][1]">
4077
- <tbody>
4078
- <xsl:apply-templates mode="dl"/>
4079
- </tbody>
4080
- </xsl:for-each>
4081
- </xsl:variable>
4082
-
4083
- <xsl:call-template name="calculate-column-widths">
4084
- <xsl:with-param name="cols-count" select="2"/>
4085
- <xsl:with-param name="table" select="$simple-table"/>
4086
- </xsl:call-template>
4087
-
4088
- </xsl:if>
4089
- </xsl:variable>
4090
-
4091
- <xsl:variable name="maxlength_dt">
4092
- <xsl:for-each select="*[local-name() = 'dl'][1]">
4093
- <xsl:call-template name="getMaxLength_dt"/>
4094
- </xsl:for-each>
4095
- </xsl:variable>
4096
-
4097
- <fo:block>
4098
- <fo:table width="95%" table-layout="fixed">
4099
- <xsl:if test="normalize-space($key_iso) = 'true'">
4100
- <xsl:attribute name="font-size">10pt</xsl:attribute>
4163
+ <fo:table-body>
4164
+ <xsl:for-each select="xalan:nodeset($references)//fn">
4165
+ <xsl:variable name="reference" select="@reference"/>
4166
+ <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
4167
+ <fo:table-row>
4168
+ <fo:table-cell>
4169
+ <fo:block>
4170
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
4171
+ <xsl:value-of select="@reference"/>
4172
+ </fo:inline>
4173
+ </fo:block>
4174
+ </fo:table-cell>
4175
+ <fo:table-cell>
4176
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
4177
+ <xsl:if test="normalize-space($key_iso) = 'true'">
4101
4178
 
4102
- </xsl:if>
4103
- <xsl:choose>
4104
- <!-- if there 'dl', then set same columns width -->
4105
- <xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
4106
- <xsl:call-template name="setColumnWidth_dl">
4107
- <xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
4108
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
4109
- </xsl:call-template>
4110
- </xsl:when>
4111
- <xsl:otherwise>
4112
- <fo:table-column column-width="15%"/>
4113
- <fo:table-column column-width="85%"/>
4114
- </xsl:otherwise>
4115
- </xsl:choose>
4116
- <fo:table-body>
4117
- <xsl:for-each select="xalan:nodeset($references)//fn">
4118
- <xsl:variable name="reference" select="@reference"/>
4119
- <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
4120
- <fo:table-row>
4121
- <fo:table-cell>
4122
- <fo:block>
4123
- <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
4124
- <xsl:value-of select="@reference"/>
4125
- </fo:inline>
4126
- </fo:block>
4127
- </fo:table-cell>
4128
- <fo:table-cell>
4129
- <fo:block xsl:use-attribute-sets="figure-fn-body-style">
4130
- <xsl:if test="normalize-space($key_iso) = 'true'">
4179
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
4131
4180
 
4132
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
4181
+ </xsl:if>
4182
+ <xsl:copy-of select="./node()"/>
4183
+ </fo:block>
4184
+ </fo:table-cell>
4185
+ </fo:table-row>
4186
+ </xsl:if>
4187
+ </xsl:for-each>
4188
+ </fo:table-body>
4189
+ </fo:table>
4133
4190
 
4134
- </xsl:if>
4135
- <xsl:copy-of select="./node()"/>
4136
- </fo:block>
4137
- </fo:table-cell>
4138
- </fo:table-row>
4139
- </xsl:if>
4140
- </xsl:for-each>
4141
- </fo:table-body>
4142
- </fo:table>
4143
4191
  </fo:block>
4144
4192
  </xsl:if>
4145
4193
 
@@ -4215,12 +4263,14 @@
4215
4263
 
4216
4264
  <fo:block margin-bottom="12pt" text-align="left">
4217
4265
 
4218
- <xsl:variable name="title-where">
4266
+ <!-- <xsl:variable name="title-where">
4219
4267
  <xsl:call-template name="getLocalizedString">
4220
4268
  <xsl:with-param name="key">where</xsl:with-param>
4221
4269
  </xsl:call-template>
4222
4270
  </xsl:variable>
4223
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
4271
+ <xsl:value-of select="$title-where"/> -->
4272
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
4273
+ <xsl:text> </xsl:text>
4224
4274
  <xsl:apply-templates select="*[local-name()='dt']/*"/>
4225
4275
  <xsl:text/>
4226
4276
  <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
@@ -4230,12 +4280,14 @@
4230
4280
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
4231
4281
  <fo:block margin-bottom="12pt" text-align="left">
4232
4282
 
4233
- <xsl:variable name="title-where">
4283
+ <!-- <xsl:variable name="title-where">
4234
4284
  <xsl:call-template name="getLocalizedString">
4235
4285
  <xsl:with-param name="key">where</xsl:with-param>
4236
4286
  </xsl:call-template>
4237
4287
  </xsl:variable>
4238
- <xsl:value-of select="$title-where"/>
4288
+ <xsl:value-of select="$title-where"/><xsl:if test="$namespace = 'bsi' or $namespace = 'itu'">:</xsl:if> -->
4289
+ <!-- preceding 'p' with word 'where' -->
4290
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
4239
4291
  </fo:block>
4240
4292
  </xsl:when> <!-- END: a few components -->
4241
4293
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
@@ -4421,6 +4473,9 @@
4421
4473
 
4422
4474
  </xsl:template> <!-- END: dl -->
4423
4475
 
4476
+ <!-- ignore 'p' with 'where' in formula, before 'dl' -->
4477
+ <xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
4478
+
4424
4479
  <xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
4425
4480
  <xsl:param name="process">false</xsl:param>
4426
4481
  <xsl:if test="$process = 'true'">
@@ -5258,8 +5313,8 @@
5258
5313
 
5259
5314
  <!-- add zero-width space (#x200B) after dot with next non-digit -->
5260
5315
  <xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(\.)([^\d\s])','$1​$2')"/>
5261
- <!-- add zero-width space (#x200B) after characters: dash, equal, underscore, em dash, thin space, arrow right -->
5262
- <xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1),'(-|=|_|—| |→)','$1​')"/>
5316
+ <!-- add zero-width space (#x200B) after characters: dash, equal, underscore, em dash, thin space, arrow right, ; -->
5317
+ <xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1),'(-|=|_|—| |→|;)','$1​')"/>
5263
5318
  <!-- add zero-width space (#x200B) after characters: colon, if there aren't digits after -->
5264
5319
  <xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2),'(:)(\D)','$1​$2')"/>
5265
5320
  <!-- add zero-width space (#x200B) after characters: 'great than' -->
@@ -5270,8 +5325,19 @@
5270
5325
  <xsl:variable name="text6" select="java:replaceAll(java:java.lang.String.new($text5), '(?&lt;!\W)(\{)', '​$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
5271
5326
  <!-- add zero-width space (#x200B) after character: , -->
5272
5327
  <xsl:variable name="text7" select="java:replaceAll(java:java.lang.String.new($text6), '(\,)(?!\d)', '$1​')"/> <!-- negative lookahead: ',' not followed by digit -->
5328
+ <!-- add zero-width space (#x200B) after character: '/' -->
5329
+ <xsl:variable name="text8" select="java:replaceAll(java:java.lang.String.new($text7), '(\u002f)(?!\u002f)', '$1​')"/><!-- negative lookahead: '/' not followed by '/' -->
5330
+
5331
+ <xsl:variable name="text9">
5332
+ <xsl:choose>
5333
+ <xsl:when test="$isGenerateTableIF = 'true'">
5334
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text8), '([\u3000-\u9FFF])', '$1​')"/> <!-- 3000 - CJK Symbols and Punctuation ... 9FFF CJK Unified Ideographs-->
5335
+ </xsl:when>
5336
+ <xsl:otherwise><xsl:value-of select="$text8"/></xsl:otherwise>
5337
+ </xsl:choose>
5338
+ </xsl:variable>
5273
5339
 
5274
- <xsl:value-of select="$text7"/>
5340
+ <xsl:value-of select="$text9"/>
5275
5341
  </xsl:template>
5276
5342
 
5277
5343
  <xsl:template name="add-zero-spaces-link-java">
@@ -5279,8 +5345,8 @@
5279
5345
 
5280
5346
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
5281
5347
  <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
5282
- <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
5283
- <xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
5348
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
5349
+ <xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>
5284
5350
  <!-- remove zero-width space at the end -->
5285
5351
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
5286
5352
  </xsl:template>
@@ -5635,9 +5701,28 @@
5635
5701
  </xsl:variable>
5636
5702
  <xsl:copy-of select="$newRow"/>
5637
5703
 
5638
- <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
5639
- <xsl:with-param name="previousRow" select="$newRow"/>
5640
- </xsl:apply-templates>
5704
+ <!-- optimize to prevent StackOverflowError, just copy next 'tr' -->
5705
+ <xsl:variable name="currrow_num" select="count(preceding-sibling::tr) + 1"/>
5706
+ <xsl:variable name="nextrow_without_rowspan_" select="count(following-sibling::tr[*[@rowspan and @rowspan != 1]][1]/preceding-sibling::tr) + 1"/>
5707
+ <xsl:variable name="nextrow_without_rowspan" select="$nextrow_without_rowspan_ - $currrow_num"/>
5708
+ <xsl:choose>
5709
+ <xsl:when test="not(xalan:nodeset($newRow)/*/*[@rowspan and @rowspan != 1]) and $nextrow_without_rowspan &lt;= 0">
5710
+ <xsl:copy-of select="following-sibling::tr"/>
5711
+ </xsl:when>
5712
+ <!-- <xsl:when test="xalan:nodeset($newRow)/*[not(@rowspan) or (@rowspan = 1)] and $nextrow_without_rowspan &gt; 0">
5713
+ <xsl:copy-of select="following-sibling::tr[position() &lt;= $nextrow_without_rowspan]"/>
5714
+
5715
+ <xsl:copy-of select="following-sibling::tr[$nextrow_without_rowspan + 1]"/>
5716
+ <xsl:apply-templates select="following-sibling::tr[$nextrow_without_rowspan + 2]" mode="simple-table-rowspan">
5717
+ <xsl:with-param name="previousRow" select="following-sibling::tr[$nextrow_without_rowspan + 1]"/>
5718
+ </xsl:apply-templates>
5719
+ </xsl:when> -->
5720
+ <xsl:otherwise>
5721
+ <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
5722
+ <xsl:with-param name="previousRow" select="$newRow"/>
5723
+ </xsl:apply-templates>
5724
+ </xsl:otherwise>
5725
+ </xsl:choose>
5641
5726
  </xsl:template>
5642
5727
  <!-- End mode simple-table-rowspan -->
5643
5728
 
@@ -5800,6 +5885,27 @@
5800
5885
  </xsl:call-template>
5801
5886
  </xsl:template>
5802
5887
 
5888
+ <xsl:template match="*[local-name() = 'link'][normalize-space() = '']" mode="td_text_with_formatting">
5889
+ <xsl:variable name="link">
5890
+ <link_updated>
5891
+ <xsl:variable name="target_text">
5892
+ <xsl:choose>
5893
+ <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
5894
+ <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
5895
+ </xsl:when>
5896
+ <xsl:otherwise>
5897
+ <xsl:value-of select="normalize-space(@target)"/>
5898
+ </xsl:otherwise>
5899
+ </xsl:choose>
5900
+ </xsl:variable>
5901
+ <xsl:value-of select="$target_text"/>
5902
+ </link_updated>
5903
+ </xsl:variable>
5904
+ <xsl:for-each select="xalan:nodeset($link)/*">
5905
+ <xsl:apply-templates mode="td_text_with_formatting"/>
5906
+ </xsl:for-each>
5907
+ </xsl:template>
5908
+
5803
5909
  <xsl:template name="getFormattingTags">
5804
5910
  <tags>
5805
5911
  <xsl:if test="ancestor::*[local-name() = 'strong']"><tag>strong</tag></xsl:if>
@@ -6141,7 +6247,7 @@
6141
6247
  </xsl:variable>
6142
6248
  <fo:inline xsl:use-attribute-sets="link-style">
6143
6249
 
6144
- <xsl:if test="starts-with(normalize-space(@target), 'mailto:')">
6250
+ <xsl:if test="starts-with(normalize-space(@target), 'mailto:') and not(ancestor::*[local-name() = 'td'])">
6145
6251
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
6146
6252
  </xsl:if>
6147
6253
 
@@ -6514,10 +6620,10 @@
6514
6620
  <fo:block xsl:use-attribute-sets="figure-style">
6515
6621
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
6516
6622
  </fo:block>
6517
- <xsl:call-template name="fn_display_figure"/>
6518
6623
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
6519
6624
  <xsl:call-template name="note"/>
6520
6625
  </xsl:for-each>
6626
+ <xsl:call-template name="fn_display_figure"/>
6521
6627
 
6522
6628
  </fo:block-container>
6523
6629
  </xsl:template>
@@ -6578,7 +6684,13 @@
6578
6684
  </xsl:choose>
6579
6685
  </xsl:variable>
6580
6686
 
6581
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
6687
+ <xsl:variable name="image_width_effective">
6688
+
6689
+ <xsl:value-of select="$width_effective"/>
6690
+
6691
+ </xsl:variable>
6692
+
6693
+ <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
6582
6694
  <xsl:if test="number($scale) &lt; 100">
6583
6695
 
6584
6696
  <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
@@ -7165,6 +7277,13 @@
7165
7277
  <xsl:when test="$contents_nodes/doc">
7166
7278
  <xsl:choose>
7167
7279
  <xsl:when test="count($contents_nodes/doc) &gt; 1">
7280
+
7281
+ <xsl:if test="$contents_nodes/collection">
7282
+ <fo:bookmark internal-destination="{$contents/collection/@firstpage_id}">
7283
+ <fo:bookmark-title>collection.pdf</fo:bookmark-title>
7284
+ </fo:bookmark>
7285
+ </xsl:if>
7286
+
7168
7287
  <xsl:for-each select="$contents_nodes/doc">
7169
7288
  <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
7170
7289
  <xsl:if test="@bundle = 'true'">
@@ -9064,6 +9183,44 @@
9064
9183
 
9065
9184
  <fo:list-block xsl:use-attribute-sets="list-style">
9066
9185
 
9186
+ <xsl:variable name="provisional_distance_between_starts_">
9187
+ <attributes xsl:use-attribute-sets="list-style">
9188
+
9189
+ </attributes>
9190
+ </xsl:variable>
9191
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space(xalan:nodeset($provisional_distance_between_starts_)/attributes/@provisional-distance-between-starts)"/>
9192
+ <xsl:if test="$provisional_distance_between_starts != ''">
9193
+ <xsl:attribute name="provisional-distance-between-starts"><xsl:value-of select="$provisional_distance_between_starts"/></xsl:attribute>
9194
+ </xsl:if>
9195
+ <xsl:variable name="provisional_distance_between_starts_value" select="substring-before($provisional_distance_between_starts, 'mm')"/>
9196
+
9197
+ <!-- increase provisional-distance-between-starts for long lists -->
9198
+ <xsl:if test="local-name() = 'ol'">
9199
+ <!-- Examples: xiii), xviii), xxviii) -->
9200
+ <xsl:variable name="item_numbers">
9201
+ <xsl:for-each select="*[local-name() = 'li']">
9202
+ <item><xsl:call-template name="getListItemFormat"/></item>
9203
+ </xsl:for-each>
9204
+ </xsl:variable>
9205
+
9206
+ <xsl:variable name="max_length">
9207
+ <xsl:for-each select="xalan:nodeset($item_numbers)/item">
9208
+ <xsl:sort select="string-length(.)" data-type="number" order="descending"/>
9209
+ <xsl:if test="position() = 1"><xsl:value-of select="string-length(.)"/></xsl:if>
9210
+ </xsl:for-each>
9211
+ </xsl:variable>
9212
+
9213
+ <!-- base width (provisional-distance-between-starts) for 4 chars -->
9214
+ <xsl:variable name="addon" select="$max_length - 4"/>
9215
+ <xsl:if test="$addon &gt; 0">
9216
+ <xsl:attribute name="provisional-distance-between-starts"><xsl:value-of select="$provisional_distance_between_starts_value + $addon * 2"/>mm</xsl:attribute>
9217
+ </xsl:if>
9218
+ <!-- DEBUG -->
9219
+ <!-- <xsl:copy-of select="$item_numbers"/>
9220
+ <max_length><xsl:value-of select="$max_length"/></max_length>
9221
+ <addon><xsl:value-of select="$addon"/></addon> -->
9222
+ </xsl:if>
9223
+
9067
9224
  <xsl:if test="*[local-name() = 'name']">
9068
9225
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
9069
9226
  </xsl:if>
@@ -10013,7 +10170,7 @@
10013
10170
  <!-- \S matches any non-whitespace character (equivalent to [^\r\n\t\f\v ]) -->
10014
10171
  <!-- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable> -->
10015
10172
  <!-- add &lt; and &gt; to \S -->
10016
- <xsl:variable name="regex_S">[^\r\n\t\f\v \&lt;&gt;]</xsl:variable>
10173
+ <xsl:variable name="regex_S">[^\r\n\t\f\v \&lt;&gt;\u3000-\u9FFF]</xsl:variable>
10017
10174
  <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>
10018
10175
  <xsl:variable name="text3">
10019
10176
  <text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
@@ -10035,7 +10192,8 @@
10035
10192
  <xsl:choose>
10036
10193
  <xsl:when test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
10037
10194
  <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
10038
- <xsl:variable name="regex_dots_units">((\b((\S{1,3}\.\S+)|(\S+\.\S{1,3}))\b)|(\.\S{1,3})\b)</xsl:variable>
10195
+ <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
10196
+ <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>
10039
10197
  <xsl:for-each select="xalan:nodeset($text3)/text/node()">
10040
10198
  <xsl:choose>
10041
10199
  <xsl:when test="self::text()">
@@ -10638,6 +10796,23 @@
10638
10796
  </xsl:if>
10639
10797
  </xsl:template>
10640
10798
 
10799
+ <xsl:template name="setBlockAttributes">
10800
+ <xsl:param name="text_align_default">left</xsl:param>
10801
+ <xsl:call-template name="setTextAlignment">
10802
+ <xsl:with-param name="default" select="$text_align_default"/>
10803
+ </xsl:call-template>
10804
+
10805
+ <!-- https://www.metanorma.org/author/topics/document-format/text/#avoiding-page-breaks -->
10806
+ <!-- Example: keep-lines-together="true" -->
10807
+ <xsl:if test="@keep-lines-together = 'true'">
10808
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
10809
+ </xsl:if>
10810
+ <!-- Example: keep-with-next="true" -->
10811
+ <xsl:if test="@keep-with-next = 'true'">
10812
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
10813
+ </xsl:if>
10814
+ </xsl:template>
10815
+
10641
10816
  <xsl:template name="number-to-words">
10642
10817
  <xsl:param name="number"/>
10643
10818
  <xsl:param name="first"/>
@@ -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>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.2.4".freeze
3
+ VERSION = "2.2.5".freeze
4
4
  end
5
5
  end
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ["lib"]
30
30
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
31
31
 
32
- spec.add_dependency "metanorma-generic", "~> 2.3.0"
32
+ spec.add_dependency "metanorma-generic", "~> 2.4.0"
33
33
 
34
34
  spec.add_development_dependency "debug"
35
35
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ribose
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
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-generic
@@ -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: debug
29
29
  requirement: !ruby/object:Gem::Requirement