metanorma-cc 2.2.4 → 2.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8bc0f7fc89706fda4659178578d0dc36df860bf39cfa922833b56b6cc5a3244
4
- data.tar.gz: '008c0041602511aa48595895c034f657e9550811630016f09bafb0a6a03f7694'
3
+ metadata.gz: b9409829ee76874795daca563b1a53ce680be430a1bab2c173c6befb8dba8645
4
+ data.tar.gz: '05784a026b5e1c1ea5699e25ecfd5c1949c3241e31de11dbc4352a771c58de5f'
5
5
  SHA512:
6
- metadata.gz: 1015ad2790e861ecc8c5a987e7d9d94fb84527ba5d7fa1bf6963fe1d2282a3d0dec75add166a26a5fcbf1f7d9fed85af3ce4488953057926d4c5d06257759e43
7
- data.tar.gz: 2292e0873343ea9800cc3955c3a9c9efea5533bceff1c4ecbca9536d3c82d4017c4db9777610d5d9e9f30a6e70ab2b0fb4e2130451399d46742e4b8d755d89f8
6
+ metadata.gz: 57630940fdb5039b666c33a0494c1465734954995c8ba4f0bbf2e5d18b69bc9c30bc46f48dacc55d7e044ead8c667954c4036c7478deb703533cea17cf80f32e
7
+ data.tar.gz: 9d14496986bf088b87a5a0995bc02497d23d96e2066ad5ef96c4675ebb30a06aeb82481c0a93d9bc987fe7a8a59b717e2eea354bb596016cc3588e3f67e8cbac
@@ -1139,7 +1139,6 @@
1139
1139
 
1140
1140
  <xsl:attribute-set name="table-header-cell-style">
1141
1141
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1142
- <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1143
1142
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1144
1143
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1145
1144
  <xsl:attribute name="display-align">center</xsl:attribute>
@@ -1148,7 +1147,6 @@
1148
1147
 
1149
1148
  <xsl:attribute-set name="table-cell-style">
1150
1149
  <xsl:attribute name="display-align">center</xsl:attribute>
1151
- <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1152
1150
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1153
1151
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1154
1152
 
@@ -1867,7 +1865,7 @@
1867
1865
  <xsl:apply-templates select="." mode="contents"/>
1868
1866
  </xsl:for-each>
1869
1867
 
1870
- <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')]]">
1868
+ <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]">
1871
1869
  <xsl:sort select="@displayorder" data-type="number"/>
1872
1870
  <xsl:apply-templates select="." mode="contents"/>
1873
1871
  </xsl:for-each>
@@ -2803,6 +2801,10 @@
2803
2801
  </xsl:choose>
2804
2802
  </xsl:variable>
2805
2803
 
2804
+ <xsl:variable name="table_fn_block">
2805
+ <xsl:call-template name="table_fn_display"/>
2806
+ </xsl:variable>
2807
+
2806
2808
  <xsl:variable name="tableWithNotesAndFootnotes">
2807
2809
 
2808
2810
  <fo:table keep-with-previous="always">
@@ -2850,11 +2852,25 @@
2850
2852
 
2851
2853
  <xsl:apply-templates select="../*[local-name()='note']"/>
2852
2854
 
2855
+ <xsl:variable name="isDisplayRowSeparator">
2856
+
2857
+ </xsl:variable>
2858
+
2853
2859
  <!-- horizontal row separator -->
2860
+ <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
2861
+ <xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
2862
+ <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
2863
+
2864
+ <xsl:call-template name="setBordersTableArray"/>
2865
+ <fo:block font-size="1pt"> </fo:block>
2866
+ </fo:block-container>
2867
+ </xsl:if>
2868
+ </xsl:if>
2854
2869
 
2855
2870
  <!-- fn processing -->
2856
2871
 
2857
- <xsl:call-template name="table_fn_display"/>
2872
+ <!-- <xsl:call-template name="table_fn_display" /> -->
2873
+ <xsl:copy-of select="$table_fn_block"/>
2858
2874
 
2859
2875
  <!-- for PAS display Notes after footnotes -->
2860
2876
 
@@ -2971,6 +2987,28 @@
2971
2987
  </fo:table-row>
2972
2988
  </xsl:template>
2973
2989
 
2990
+ <xsl:template name="setBorderUnderRow">
2991
+ <xsl:variable name="border_under_row_" select="normalize-space(ancestor::*[local-name() = 'table'][1]/@border-under-row)"/>
2992
+ <xsl:choose>
2993
+ <xsl:when test="$border_under_row_ != ''">
2994
+ <xsl:variable name="table_id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
2995
+ <xsl:variable name="row_num_"><xsl:number level="any" count="*[local-name() = 'table'][@id = $table_id]//*[local-name() = 'tr']"/></xsl:variable>
2996
+ <xsl:variable name="row_num" select="number($row_num_) - 1"/> <!-- because values in border-under-row start with 0 -->
2997
+ <xsl:variable name="border_under_row">
2998
+ <xsl:call-template name="split">
2999
+ <xsl:with-param name="pText" select="$border_under_row_"/>
3000
+ </xsl:call-template>
3001
+ </xsl:variable>
3002
+ <xsl:if test="xalan:nodeset($border_under_row)/item[. = normalize-space($row_num)]">
3003
+ <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
3004
+ </xsl:if>
3005
+ </xsl:when>
3006
+ <xsl:otherwise>
3007
+ <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
3008
+ </xsl:otherwise>
3009
+ </xsl:choose>
3010
+ </xsl:template>
3011
+
2974
3012
  <!-- row in table footer (tfoot) -->
2975
3013
  <xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
2976
3014
  <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
@@ -3299,8 +3337,16 @@
3299
3337
  <!-- figure's footnotes rendering -->
3300
3338
  <xsl:template name="fn_display_figure">
3301
3339
 
3340
+ <!-- current figure id -->
3341
+ <xsl:variable name="figure_id_">
3342
+ <xsl:value-of select="@id"/>
3343
+ <xsl:if test="not(@id)"><xsl:value-of select="generate-id()"/></xsl:if>
3344
+ </xsl:variable>
3345
+ <xsl:variable name="figure_id" select="normalize-space($figure_id_)"/>
3346
+
3347
+ <!-- all footnotes relates to the current figure -->
3302
3348
  <xsl:variable name="references">
3303
- <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
3349
+ <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])][ancestor::*[local-name() = 'figure'][1][@id = $figure_id]]">
3304
3350
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
3305
3351
  <xsl:apply-templates/>
3306
3352
  </fn>
@@ -3313,91 +3359,93 @@
3313
3359
 
3314
3360
  </xsl:variable>
3315
3361
 
3316
- <!-- current hierarchy is 'figure' element -->
3317
- <xsl:variable name="following_dl_colwidths">
3318
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
3319
- <xsl:variable name="simple-table">
3320
- <!-- <xsl:variable name="doc_ns">
3321
- <xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
3362
+ <fo:block>
3363
+
3364
+ <!-- current hierarchy is 'figure' element -->
3365
+ <xsl:variable name="following_dl_colwidths">
3366
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
3367
+ <xsl:variable name="simple-table">
3368
+ <!-- <xsl:variable name="doc_ns">
3369
+ <xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
3370
+ </xsl:variable>
3371
+ <xsl:variable name="ns">
3372
+ <xsl:choose>
3373
+ <xsl:when test="normalize-space($doc_ns) != ''">
3374
+ <xsl:value-of select="normalize-space($doc_ns)"/>
3375
+ </xsl:when>
3376
+ <xsl:otherwise>
3377
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
3378
+ </xsl:otherwise>
3379
+ </xsl:choose>
3380
+ </xsl:variable> -->
3381
+
3382
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
3383
+ <tbody>
3384
+ <xsl:apply-templates mode="dl"/>
3385
+ </tbody>
3386
+ </xsl:for-each>
3387
+ </xsl:variable>
3388
+
3389
+ <xsl:call-template name="calculate-column-widths">
3390
+ <xsl:with-param name="cols-count" select="2"/>
3391
+ <xsl:with-param name="table" select="$simple-table"/>
3392
+ </xsl:call-template>
3393
+
3394
+ </xsl:if>
3322
3395
  </xsl:variable>
3323
- <xsl:variable name="ns">
3396
+
3397
+ <xsl:variable name="maxlength_dt">
3398
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
3399
+ <xsl:call-template name="getMaxLength_dt"/>
3400
+ </xsl:for-each>
3401
+ </xsl:variable>
3402
+
3403
+ <fo:table width="95%" table-layout="fixed">
3404
+ <xsl:if test="normalize-space($key_iso) = 'true'">
3405
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
3406
+
3407
+ </xsl:if>
3324
3408
  <xsl:choose>
3325
- <xsl:when test="normalize-space($doc_ns) != ''">
3326
- <xsl:value-of select="normalize-space($doc_ns)"/>
3409
+ <!-- if there 'dl', then set same columns width -->
3410
+ <xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
3411
+ <xsl:call-template name="setColumnWidth_dl">
3412
+ <xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
3413
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
3414
+ </xsl:call-template>
3327
3415
  </xsl:when>
3328
3416
  <xsl:otherwise>
3329
- <xsl:value-of select="substring-before(name(/*), '-')"/>
3417
+ <fo:table-column column-width="5%"/>
3418
+ <fo:table-column column-width="95%"/>
3330
3419
  </xsl:otherwise>
3331
3420
  </xsl:choose>
3332
- </xsl:variable> -->
3333
-
3334
- <xsl:for-each select="*[local-name() = 'dl'][1]">
3335
- <tbody>
3336
- <xsl:apply-templates mode="dl"/>
3337
- </tbody>
3338
- </xsl:for-each>
3339
- </xsl:variable>
3340
-
3341
- <xsl:call-template name="calculate-column-widths">
3342
- <xsl:with-param name="cols-count" select="2"/>
3343
- <xsl:with-param name="table" select="$simple-table"/>
3344
- </xsl:call-template>
3345
-
3346
- </xsl:if>
3347
- </xsl:variable>
3348
-
3349
- <xsl:variable name="maxlength_dt">
3350
- <xsl:for-each select="*[local-name() = 'dl'][1]">
3351
- <xsl:call-template name="getMaxLength_dt"/>
3352
- </xsl:for-each>
3353
- </xsl:variable>
3421
+ <fo:table-body>
3422
+ <xsl:for-each select="xalan:nodeset($references)//fn">
3423
+ <xsl:variable name="reference" select="@reference"/>
3424
+ <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
3425
+ <fo:table-row>
3426
+ <fo:table-cell>
3427
+ <fo:block>
3428
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
3429
+ <xsl:value-of select="@reference"/>
3430
+ </fo:inline>
3431
+ </fo:block>
3432
+ </fo:table-cell>
3433
+ <fo:table-cell>
3434
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
3435
+ <xsl:if test="normalize-space($key_iso) = 'true'">
3354
3436
 
3355
- <fo:block>
3356
- <fo:table width="95%" table-layout="fixed">
3357
- <xsl:if test="normalize-space($key_iso) = 'true'">
3358
- <xsl:attribute name="font-size">10pt</xsl:attribute>
3437
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
3359
3438
 
3360
- </xsl:if>
3361
- <xsl:choose>
3362
- <!-- if there 'dl', then set same columns width -->
3363
- <xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
3364
- <xsl:call-template name="setColumnWidth_dl">
3365
- <xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
3366
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
3367
- </xsl:call-template>
3368
- </xsl:when>
3369
- <xsl:otherwise>
3370
- <fo:table-column column-width="15%"/>
3371
- <fo:table-column column-width="85%"/>
3372
- </xsl:otherwise>
3373
- </xsl:choose>
3374
- <fo:table-body>
3375
- <xsl:for-each select="xalan:nodeset($references)//fn">
3376
- <xsl:variable name="reference" select="@reference"/>
3377
- <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
3378
- <fo:table-row>
3379
- <fo:table-cell>
3380
- <fo:block>
3381
- <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
3382
- <xsl:value-of select="@reference"/>
3383
- </fo:inline>
3384
- </fo:block>
3385
- </fo:table-cell>
3386
- <fo:table-cell>
3387
- <fo:block xsl:use-attribute-sets="figure-fn-body-style">
3388
- <xsl:if test="normalize-space($key_iso) = 'true'">
3389
-
3390
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
3439
+ </xsl:if>
3440
+ <xsl:copy-of select="./node()"/>
3441
+ </fo:block>
3442
+ </fo:table-cell>
3443
+ </fo:table-row>
3444
+ </xsl:if>
3445
+ </xsl:for-each>
3446
+ </fo:table-body>
3447
+ </fo:table>
3391
3448
 
3392
- </xsl:if>
3393
- <xsl:copy-of select="./node()"/>
3394
- </fo:block>
3395
- </fo:table-cell>
3396
- </fo:table-row>
3397
- </xsl:if>
3398
- </xsl:for-each>
3399
- </fo:table-body>
3400
- </fo:table>
3401
3449
  </fo:block>
3402
3450
  </xsl:if>
3403
3451
 
@@ -3473,12 +3521,14 @@
3473
3521
 
3474
3522
  <fo:block margin-bottom="12pt" text-align="left">
3475
3523
 
3476
- <xsl:variable name="title-where">
3524
+ <!-- <xsl:variable name="title-where">
3477
3525
  <xsl:call-template name="getLocalizedString">
3478
3526
  <xsl:with-param name="key">where</xsl:with-param>
3479
3527
  </xsl:call-template>
3480
3528
  </xsl:variable>
3481
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
3529
+ <xsl:value-of select="$title-where"/> -->
3530
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
3531
+ <xsl:text> </xsl:text>
3482
3532
  <xsl:apply-templates select="*[local-name()='dt']/*"/>
3483
3533
  <xsl:text/>
3484
3534
  <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
@@ -3488,12 +3538,14 @@
3488
3538
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
3489
3539
  <fo:block margin-bottom="12pt" text-align="left">
3490
3540
 
3491
- <xsl:variable name="title-where">
3541
+ <!-- <xsl:variable name="title-where">
3492
3542
  <xsl:call-template name="getLocalizedString">
3493
3543
  <xsl:with-param name="key">where</xsl:with-param>
3494
3544
  </xsl:call-template>
3495
3545
  </xsl:variable>
3496
- <xsl:value-of select="$title-where"/>
3546
+ <xsl:value-of select="$title-where"/><xsl:if test="$namespace = 'bsi' or $namespace = 'itu'">:</xsl:if> -->
3547
+ <!-- preceding 'p' with word 'where' -->
3548
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
3497
3549
  </fo:block>
3498
3550
  </xsl:when> <!-- END: a few components -->
3499
3551
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
@@ -3676,6 +3728,9 @@
3676
3728
 
3677
3729
  </xsl:template> <!-- END: dl -->
3678
3730
 
3731
+ <!-- ignore 'p' with 'where' in formula, before 'dl' -->
3732
+ <xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
3733
+
3679
3734
  <xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
3680
3735
  <xsl:param name="process">false</xsl:param>
3681
3736
  <xsl:if test="$process = 'true'">
@@ -4506,8 +4561,8 @@
4506
4561
 
4507
4562
  <!-- add zero-width space (#x200B) after dot with next non-digit -->
4508
4563
  <xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(\.)([^\d\s])','$1​$2')"/>
4509
- <!-- add zero-width space (#x200B) after characters: dash, equal, underscore, em dash, thin space, arrow right -->
4510
- <xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1),'(-|=|_|—| |→)','$1​')"/>
4564
+ <!-- add zero-width space (#x200B) after characters: dash, equal, underscore, em dash, thin space, arrow right, ; -->
4565
+ <xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1),'(-|=|_|—| |→|;)','$1​')"/>
4511
4566
  <!-- add zero-width space (#x200B) after characters: colon, if there aren't digits after -->
4512
4567
  <xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2),'(:)(\D)','$1​$2')"/>
4513
4568
  <!-- add zero-width space (#x200B) after characters: 'great than' -->
@@ -4518,8 +4573,19 @@
4518
4573
  <xsl:variable name="text6" select="java:replaceAll(java:java.lang.String.new($text5), '(?&lt;!\W)(\{)', '​$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
4519
4574
  <!-- add zero-width space (#x200B) after character: , -->
4520
4575
  <xsl:variable name="text7" select="java:replaceAll(java:java.lang.String.new($text6), '(\,)(?!\d)', '$1​')"/> <!-- negative lookahead: ',' not followed by digit -->
4576
+ <!-- add zero-width space (#x200B) after character: '/' -->
4577
+ <xsl:variable name="text8" select="java:replaceAll(java:java.lang.String.new($text7), '(\u002f)(?!\u002f)', '$1​')"/><!-- negative lookahead: '/' not followed by '/' -->
4521
4578
 
4522
- <xsl:value-of select="$text7"/>
4579
+ <xsl:variable name="text9">
4580
+ <xsl:choose>
4581
+ <xsl:when test="$isGenerateTableIF = 'true'">
4582
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text8), '([\u3000-\u9FFF])', '$1​')"/> <!-- 3000 - CJK Symbols and Punctuation ... 9FFF CJK Unified Ideographs-->
4583
+ </xsl:when>
4584
+ <xsl:otherwise><xsl:value-of select="$text8"/></xsl:otherwise>
4585
+ </xsl:choose>
4586
+ </xsl:variable>
4587
+
4588
+ <xsl:value-of select="$text9"/>
4523
4589
  </xsl:template>
4524
4590
 
4525
4591
  <xsl:template name="add-zero-spaces-link-java">
@@ -4527,8 +4593,8 @@
4527
4593
 
4528
4594
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
4529
4595
  <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
4530
- <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
4531
- <xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
4596
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
4597
+ <xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>
4532
4598
  <!-- remove zero-width space at the end -->
4533
4599
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
4534
4600
  </xsl:template>
@@ -4883,9 +4949,28 @@
4883
4949
  </xsl:variable>
4884
4950
  <xsl:copy-of select="$newRow"/>
4885
4951
 
4886
- <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
4887
- <xsl:with-param name="previousRow" select="$newRow"/>
4888
- </xsl:apply-templates>
4952
+ <!-- optimize to prevent StackOverflowError, just copy next 'tr' -->
4953
+ <xsl:variable name="currrow_num" select="count(preceding-sibling::tr) + 1"/>
4954
+ <xsl:variable name="nextrow_without_rowspan_" select="count(following-sibling::tr[*[@rowspan and @rowspan != 1]][1]/preceding-sibling::tr) + 1"/>
4955
+ <xsl:variable name="nextrow_without_rowspan" select="$nextrow_without_rowspan_ - $currrow_num"/>
4956
+ <xsl:choose>
4957
+ <xsl:when test="not(xalan:nodeset($newRow)/*/*[@rowspan and @rowspan != 1]) and $nextrow_without_rowspan &lt;= 0">
4958
+ <xsl:copy-of select="following-sibling::tr"/>
4959
+ </xsl:when>
4960
+ <!-- <xsl:when test="xalan:nodeset($newRow)/*[not(@rowspan) or (@rowspan = 1)] and $nextrow_without_rowspan &gt; 0">
4961
+ <xsl:copy-of select="following-sibling::tr[position() &lt;= $nextrow_without_rowspan]"/>
4962
+
4963
+ <xsl:copy-of select="following-sibling::tr[$nextrow_without_rowspan + 1]"/>
4964
+ <xsl:apply-templates select="following-sibling::tr[$nextrow_without_rowspan + 2]" mode="simple-table-rowspan">
4965
+ <xsl:with-param name="previousRow" select="following-sibling::tr[$nextrow_without_rowspan + 1]"/>
4966
+ </xsl:apply-templates>
4967
+ </xsl:when> -->
4968
+ <xsl:otherwise>
4969
+ <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
4970
+ <xsl:with-param name="previousRow" select="$newRow"/>
4971
+ </xsl:apply-templates>
4972
+ </xsl:otherwise>
4973
+ </xsl:choose>
4889
4974
  </xsl:template>
4890
4975
  <!-- End mode simple-table-rowspan -->
4891
4976
 
@@ -5048,6 +5133,27 @@
5048
5133
  </xsl:call-template>
5049
5134
  </xsl:template>
5050
5135
 
5136
+ <xsl:template match="*[local-name() = 'link'][normalize-space() = '']" mode="td_text_with_formatting">
5137
+ <xsl:variable name="link">
5138
+ <link_updated>
5139
+ <xsl:variable name="target_text">
5140
+ <xsl:choose>
5141
+ <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
5142
+ <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
5143
+ </xsl:when>
5144
+ <xsl:otherwise>
5145
+ <xsl:value-of select="normalize-space(@target)"/>
5146
+ </xsl:otherwise>
5147
+ </xsl:choose>
5148
+ </xsl:variable>
5149
+ <xsl:value-of select="$target_text"/>
5150
+ </link_updated>
5151
+ </xsl:variable>
5152
+ <xsl:for-each select="xalan:nodeset($link)/*">
5153
+ <xsl:apply-templates mode="td_text_with_formatting"/>
5154
+ </xsl:for-each>
5155
+ </xsl:template>
5156
+
5051
5157
  <xsl:template name="getFormattingTags">
5052
5158
  <tags>
5053
5159
  <xsl:if test="ancestor::*[local-name() = 'strong']"><tag>strong</tag></xsl:if>
@@ -5389,7 +5495,7 @@
5389
5495
  </xsl:variable>
5390
5496
  <fo:inline xsl:use-attribute-sets="link-style">
5391
5497
 
5392
- <xsl:if test="starts-with(normalize-space(@target), 'mailto:')">
5498
+ <xsl:if test="starts-with(normalize-space(@target), 'mailto:') and not(ancestor::*[local-name() = 'td'])">
5393
5499
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5394
5500
  </xsl:if>
5395
5501
 
@@ -5744,10 +5850,10 @@
5744
5850
  <fo:block xsl:use-attribute-sets="figure-style">
5745
5851
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
5746
5852
  </fo:block>
5747
- <xsl:call-template name="fn_display_figure"/>
5748
5853
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
5749
5854
  <xsl:call-template name="note"/>
5750
5855
  </xsl:for-each>
5856
+ <xsl:call-template name="fn_display_figure"/>
5751
5857
 
5752
5858
  <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
5753
5859
 
@@ -5810,7 +5916,13 @@
5810
5916
  </xsl:choose>
5811
5917
  </xsl:variable>
5812
5918
 
5813
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
5919
+ <xsl:variable name="image_width_effective">
5920
+
5921
+ <xsl:value-of select="$width_effective"/>
5922
+
5923
+ </xsl:variable>
5924
+
5925
+ <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
5814
5926
  <xsl:if test="number($scale) &lt; 100">
5815
5927
 
5816
5928
  <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
@@ -6397,6 +6509,13 @@
6397
6509
  <xsl:when test="$contents_nodes/doc">
6398
6510
  <xsl:choose>
6399
6511
  <xsl:when test="count($contents_nodes/doc) &gt; 1">
6512
+
6513
+ <xsl:if test="$contents_nodes/collection">
6514
+ <fo:bookmark internal-destination="{$contents/collection/@firstpage_id}">
6515
+ <fo:bookmark-title>collection.pdf</fo:bookmark-title>
6516
+ </fo:bookmark>
6517
+ </xsl:if>
6518
+
6400
6519
  <xsl:for-each select="$contents_nodes/doc">
6401
6520
  <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
6402
6521
  <xsl:if test="@bundle = 'true'">
@@ -8279,6 +8398,44 @@
8279
8398
 
8280
8399
  <fo:list-block xsl:use-attribute-sets="list-style">
8281
8400
 
8401
+ <xsl:variable name="provisional_distance_between_starts_">
8402
+ <attributes xsl:use-attribute-sets="list-style">
8403
+
8404
+ </attributes>
8405
+ </xsl:variable>
8406
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space(xalan:nodeset($provisional_distance_between_starts_)/attributes/@provisional-distance-between-starts)"/>
8407
+ <xsl:if test="$provisional_distance_between_starts != ''">
8408
+ <xsl:attribute name="provisional-distance-between-starts"><xsl:value-of select="$provisional_distance_between_starts"/></xsl:attribute>
8409
+ </xsl:if>
8410
+ <xsl:variable name="provisional_distance_between_starts_value" select="substring-before($provisional_distance_between_starts, 'mm')"/>
8411
+
8412
+ <!-- increase provisional-distance-between-starts for long lists -->
8413
+ <xsl:if test="local-name() = 'ol'">
8414
+ <!-- Examples: xiii), xviii), xxviii) -->
8415
+ <xsl:variable name="item_numbers">
8416
+ <xsl:for-each select="*[local-name() = 'li']">
8417
+ <item><xsl:call-template name="getListItemFormat"/></item>
8418
+ </xsl:for-each>
8419
+ </xsl:variable>
8420
+
8421
+ <xsl:variable name="max_length">
8422
+ <xsl:for-each select="xalan:nodeset($item_numbers)/item">
8423
+ <xsl:sort select="string-length(.)" data-type="number" order="descending"/>
8424
+ <xsl:if test="position() = 1"><xsl:value-of select="string-length(.)"/></xsl:if>
8425
+ </xsl:for-each>
8426
+ </xsl:variable>
8427
+
8428
+ <!-- base width (provisional-distance-between-starts) for 4 chars -->
8429
+ <xsl:variable name="addon" select="$max_length - 4"/>
8430
+ <xsl:if test="$addon &gt; 0">
8431
+ <xsl:attribute name="provisional-distance-between-starts"><xsl:value-of select="$provisional_distance_between_starts_value + $addon * 2"/>mm</xsl:attribute>
8432
+ </xsl:if>
8433
+ <!-- DEBUG -->
8434
+ <!-- <xsl:copy-of select="$item_numbers"/>
8435
+ <max_length><xsl:value-of select="$max_length"/></max_length>
8436
+ <addon><xsl:value-of select="$addon"/></addon> -->
8437
+ </xsl:if>
8438
+
8282
8439
  <xsl:if test="ancestor::csd:ol">
8283
8440
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
8284
8441
  </xsl:if>
@@ -9240,7 +9397,7 @@
9240
9397
  <!-- \S matches any non-whitespace character (equivalent to [^\r\n\t\f\v ]) -->
9241
9398
  <!-- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable> -->
9242
9399
  <!-- add &lt; and &gt; to \S -->
9243
- <xsl:variable name="regex_S">[^\r\n\t\f\v \&lt;&gt;]</xsl:variable>
9400
+ <xsl:variable name="regex_S">[^\r\n\t\f\v \&lt;&gt;\u3000-\u9FFF]</xsl:variable>
9244
9401
  <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>
9245
9402
  <xsl:variable name="text3">
9246
9403
  <text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
@@ -9262,7 +9419,8 @@
9262
9419
  <xsl:choose>
9263
9420
  <xsl:when test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
9264
9421
  <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
9265
- <xsl:variable name="regex_dots_units">((\b((\S{1,3}\.\S+)|(\S+\.\S{1,3}))\b)|(\.\S{1,3})\b)</xsl:variable>
9422
+ <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
9423
+ <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>
9266
9424
  <xsl:for-each select="xalan:nodeset($text3)/text/node()">
9267
9425
  <xsl:choose>
9268
9426
  <xsl:when test="self::text()">
@@ -9865,6 +10023,23 @@
9865
10023
  </xsl:if>
9866
10024
  </xsl:template>
9867
10025
 
10026
+ <xsl:template name="setBlockAttributes">
10027
+ <xsl:param name="text_align_default">left</xsl:param>
10028
+ <xsl:call-template name="setTextAlignment">
10029
+ <xsl:with-param name="default" select="$text_align_default"/>
10030
+ </xsl:call-template>
10031
+
10032
+ <!-- https://www.metanorma.org/author/topics/document-format/text/#avoiding-page-breaks -->
10033
+ <!-- Example: keep-lines-together="true" -->
10034
+ <xsl:if test="@keep-lines-together = 'true'">
10035
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
10036
+ </xsl:if>
10037
+ <!-- Example: keep-with-next="true" -->
10038
+ <xsl:if test="@keep-with-next = 'true'">
10039
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
10040
+ </xsl:if>
10041
+ </xsl:template>
10042
+
9868
10043
  <xsl:template name="number-to-words">
9869
10044
  <xsl:param name="number"/>
9870
10045
  <xsl:param name="first"/>
@@ -117,6 +117,10 @@ a.FootnoteRef + a.FootnoteRef:before {
117
117
  content: ", ";
118
118
  vertical-align: super; }
119
119
 
120
+ a.TableFootnoteRef + a.TableFootnoteRef:before {
121
+ content: ", ";
122
+ vertical-align: super; }
123
+
120
124
  .addition {
121
125
  color: blue; }
122
126
 
@@ -117,6 +117,10 @@ a.FootnoteRef + a.FootnoteRef:before {
117
117
  content: ", ";
118
118
  vertical-align: super; }
119
119
 
120
+ a.TableFootnoteRef + a.TableFootnoteRef:before {
121
+ content: ", ";
122
+ vertical-align: super; }
123
+
120
124
  .addition {
121
125
  color: blue; }
122
126
 
@@ -374,6 +378,10 @@ a.FootnoteRef + a.FootnoteRef:before {
374
378
  content: ", ";
375
379
  vertical-align: super; }
376
380
 
381
+ a.TableFootnoteRef + a.TableFootnoteRef:before {
382
+ content: ", ";
383
+ vertical-align: super; }
384
+
377
385
  .addition {
378
386
  color: blue; }
379
387
 
@@ -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 CC
3
- VERSION = "2.2.4".freeze
3
+ VERSION = "2.2.5".freeze
4
4
  end
5
5
  end
data/metanorma-cc.gemspec CHANGED
@@ -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-cc
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