metanorma-csa 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: 2d3a32f72415c3686b71c6403ce09f7eda11dbf6183b75cfaf91747b27e0ee60
4
- data.tar.gz: 321c976dff72a64acbb5f267850505f2f0008d51ce79a6221958c836a55236e1
3
+ metadata.gz: e7dfce83c3b89acac0ccebac4fa674de69935512279e96342e089d7eb8765e83
4
+ data.tar.gz: f2207a0524acd460bb56833ac2e5d3b18f56ea215d6b8d5af17c9384831dce45
5
5
  SHA512:
6
- metadata.gz: 0f1147857046f984258e10ecf5f063797d69cedddd8600d11be944ed98d65a6824b9089bda57701f02a11cbb6fed852276c0277742eca49ec6433e6956603ffe
7
- data.tar.gz: 8d2b991f6a03678bcc0baae65009874ebdcbb73f06d5c5f4a64e5732fb2fb30c29dd1d7c2277684f9221b33e77073b23efcc966cc19f0025f86b870fb22b3a88
6
+ metadata.gz: 7ed87e25311faf2aae6d46a0b1e6e7e7436b6f34c29f4fdeb4fa877352b781b8073561f5a4cb86c12aeff6ed9f8b7dde323144f1ca19e892db0f95f509db517a
7
+ data.tar.gz: 3674ecdd8c03bd2714427c3c128c6be8525933c78c9b952cd092a8faddca4ef40f194288985ab85020b3e8ca1a23e39cb6070f773c5a4f3b5e132fd2086093a9
@@ -1142,7 +1142,6 @@
1142
1142
 
1143
1143
  <xsl:attribute-set name="table-header-cell-style">
1144
1144
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1145
- <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1146
1145
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1147
1146
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1148
1147
  <xsl:attribute name="display-align">center</xsl:attribute>
@@ -1151,7 +1150,6 @@
1151
1150
 
1152
1151
  <xsl:attribute-set name="table-cell-style">
1153
1152
  <xsl:attribute name="display-align">center</xsl:attribute>
1154
- <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1155
1153
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1156
1154
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1157
1155
 
@@ -1895,7 +1893,7 @@
1895
1893
  <xsl:apply-templates select="." mode="contents"/>
1896
1894
  </xsl:for-each>
1897
1895
 
1898
- <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')]]">
1896
+ <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]">
1899
1897
  <xsl:sort select="@displayorder" data-type="number"/>
1900
1898
  <xsl:apply-templates select="." mode="contents"/>
1901
1899
  </xsl:for-each>
@@ -2829,6 +2827,10 @@
2829
2827
  </xsl:choose>
2830
2828
  </xsl:variable>
2831
2829
 
2830
+ <xsl:variable name="table_fn_block">
2831
+ <xsl:call-template name="table_fn_display"/>
2832
+ </xsl:variable>
2833
+
2832
2834
  <xsl:variable name="tableWithNotesAndFootnotes">
2833
2835
 
2834
2836
  <fo:table keep-with-previous="always">
@@ -2876,11 +2878,25 @@
2876
2878
 
2877
2879
  <xsl:apply-templates select="../*[local-name()='note']"/>
2878
2880
 
2881
+ <xsl:variable name="isDisplayRowSeparator">
2882
+
2883
+ </xsl:variable>
2884
+
2879
2885
  <!-- horizontal row separator -->
2886
+ <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
2887
+ <xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
2888
+ <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
2889
+
2890
+ <xsl:call-template name="setBordersTableArray"/>
2891
+ <fo:block font-size="1pt"> </fo:block>
2892
+ </fo:block-container>
2893
+ </xsl:if>
2894
+ </xsl:if>
2880
2895
 
2881
2896
  <!-- fn processing -->
2882
2897
 
2883
- <xsl:call-template name="table_fn_display"/>
2898
+ <!-- <xsl:call-template name="table_fn_display" /> -->
2899
+ <xsl:copy-of select="$table_fn_block"/>
2884
2900
 
2885
2901
  <!-- for PAS display Notes after footnotes -->
2886
2902
 
@@ -2997,6 +3013,28 @@
2997
3013
  </fo:table-row>
2998
3014
  </xsl:template>
2999
3015
 
3016
+ <xsl:template name="setBorderUnderRow">
3017
+ <xsl:variable name="border_under_row_" select="normalize-space(ancestor::*[local-name() = 'table'][1]/@border-under-row)"/>
3018
+ <xsl:choose>
3019
+ <xsl:when test="$border_under_row_ != ''">
3020
+ <xsl:variable name="table_id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
3021
+ <xsl:variable name="row_num_"><xsl:number level="any" count="*[local-name() = 'table'][@id = $table_id]//*[local-name() = 'tr']"/></xsl:variable>
3022
+ <xsl:variable name="row_num" select="number($row_num_) - 1"/> <!-- because values in border-under-row start with 0 -->
3023
+ <xsl:variable name="border_under_row">
3024
+ <xsl:call-template name="split">
3025
+ <xsl:with-param name="pText" select="$border_under_row_"/>
3026
+ </xsl:call-template>
3027
+ </xsl:variable>
3028
+ <xsl:if test="xalan:nodeset($border_under_row)/item[. = normalize-space($row_num)]">
3029
+ <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
3030
+ </xsl:if>
3031
+ </xsl:when>
3032
+ <xsl:otherwise>
3033
+ <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
3034
+ </xsl:otherwise>
3035
+ </xsl:choose>
3036
+ </xsl:template>
3037
+
3000
3038
  <!-- row in table footer (tfoot) -->
3001
3039
  <xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
3002
3040
  <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
@@ -3325,8 +3363,16 @@
3325
3363
  <!-- figure's footnotes rendering -->
3326
3364
  <xsl:template name="fn_display_figure">
3327
3365
 
3366
+ <!-- current figure id -->
3367
+ <xsl:variable name="figure_id_">
3368
+ <xsl:value-of select="@id"/>
3369
+ <xsl:if test="not(@id)"><xsl:value-of select="generate-id()"/></xsl:if>
3370
+ </xsl:variable>
3371
+ <xsl:variable name="figure_id" select="normalize-space($figure_id_)"/>
3372
+
3373
+ <!-- all footnotes relates to the current figure -->
3328
3374
  <xsl:variable name="references">
3329
- <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
3375
+ <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])][ancestor::*[local-name() = 'figure'][1][@id = $figure_id]]">
3330
3376
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
3331
3377
  <xsl:apply-templates/>
3332
3378
  </fn>
@@ -3339,91 +3385,93 @@
3339
3385
 
3340
3386
  </xsl:variable>
3341
3387
 
3342
- <!-- current hierarchy is 'figure' element -->
3343
- <xsl:variable name="following_dl_colwidths">
3344
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
3345
- <xsl:variable name="simple-table">
3346
- <!-- <xsl:variable name="doc_ns">
3347
- <xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
3388
+ <fo:block>
3389
+
3390
+ <!-- current hierarchy is 'figure' element -->
3391
+ <xsl:variable name="following_dl_colwidths">
3392
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
3393
+ <xsl:variable name="simple-table">
3394
+ <!-- <xsl:variable name="doc_ns">
3395
+ <xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
3396
+ </xsl:variable>
3397
+ <xsl:variable name="ns">
3398
+ <xsl:choose>
3399
+ <xsl:when test="normalize-space($doc_ns) != ''">
3400
+ <xsl:value-of select="normalize-space($doc_ns)"/>
3401
+ </xsl:when>
3402
+ <xsl:otherwise>
3403
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
3404
+ </xsl:otherwise>
3405
+ </xsl:choose>
3406
+ </xsl:variable> -->
3407
+
3408
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
3409
+ <tbody>
3410
+ <xsl:apply-templates mode="dl"/>
3411
+ </tbody>
3412
+ </xsl:for-each>
3413
+ </xsl:variable>
3414
+
3415
+ <xsl:call-template name="calculate-column-widths">
3416
+ <xsl:with-param name="cols-count" select="2"/>
3417
+ <xsl:with-param name="table" select="$simple-table"/>
3418
+ </xsl:call-template>
3419
+
3420
+ </xsl:if>
3348
3421
  </xsl:variable>
3349
- <xsl:variable name="ns">
3422
+
3423
+ <xsl:variable name="maxlength_dt">
3424
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
3425
+ <xsl:call-template name="getMaxLength_dt"/>
3426
+ </xsl:for-each>
3427
+ </xsl:variable>
3428
+
3429
+ <fo:table width="95%" table-layout="fixed">
3430
+ <xsl:if test="normalize-space($key_iso) = 'true'">
3431
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
3432
+
3433
+ </xsl:if>
3350
3434
  <xsl:choose>
3351
- <xsl:when test="normalize-space($doc_ns) != ''">
3352
- <xsl:value-of select="normalize-space($doc_ns)"/>
3435
+ <!-- if there 'dl', then set same columns width -->
3436
+ <xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
3437
+ <xsl:call-template name="setColumnWidth_dl">
3438
+ <xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
3439
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
3440
+ </xsl:call-template>
3353
3441
  </xsl:when>
3354
3442
  <xsl:otherwise>
3355
- <xsl:value-of select="substring-before(name(/*), '-')"/>
3443
+ <fo:table-column column-width="5%"/>
3444
+ <fo:table-column column-width="95%"/>
3356
3445
  </xsl:otherwise>
3357
3446
  </xsl:choose>
3358
- </xsl:variable> -->
3359
-
3360
- <xsl:for-each select="*[local-name() = 'dl'][1]">
3361
- <tbody>
3362
- <xsl:apply-templates mode="dl"/>
3363
- </tbody>
3364
- </xsl:for-each>
3365
- </xsl:variable>
3366
-
3367
- <xsl:call-template name="calculate-column-widths">
3368
- <xsl:with-param name="cols-count" select="2"/>
3369
- <xsl:with-param name="table" select="$simple-table"/>
3370
- </xsl:call-template>
3371
-
3372
- </xsl:if>
3373
- </xsl:variable>
3374
-
3375
- <xsl:variable name="maxlength_dt">
3376
- <xsl:for-each select="*[local-name() = 'dl'][1]">
3377
- <xsl:call-template name="getMaxLength_dt"/>
3378
- </xsl:for-each>
3379
- </xsl:variable>
3447
+ <fo:table-body>
3448
+ <xsl:for-each select="xalan:nodeset($references)//fn">
3449
+ <xsl:variable name="reference" select="@reference"/>
3450
+ <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
3451
+ <fo:table-row>
3452
+ <fo:table-cell>
3453
+ <fo:block>
3454
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
3455
+ <xsl:value-of select="@reference"/>
3456
+ </fo:inline>
3457
+ </fo:block>
3458
+ </fo:table-cell>
3459
+ <fo:table-cell>
3460
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
3461
+ <xsl:if test="normalize-space($key_iso) = 'true'">
3380
3462
 
3381
- <fo:block>
3382
- <fo:table width="95%" table-layout="fixed">
3383
- <xsl:if test="normalize-space($key_iso) = 'true'">
3384
- <xsl:attribute name="font-size">10pt</xsl:attribute>
3463
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
3385
3464
 
3386
- </xsl:if>
3387
- <xsl:choose>
3388
- <!-- if there 'dl', then set same columns width -->
3389
- <xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
3390
- <xsl:call-template name="setColumnWidth_dl">
3391
- <xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
3392
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
3393
- </xsl:call-template>
3394
- </xsl:when>
3395
- <xsl:otherwise>
3396
- <fo:table-column column-width="15%"/>
3397
- <fo:table-column column-width="85%"/>
3398
- </xsl:otherwise>
3399
- </xsl:choose>
3400
- <fo:table-body>
3401
- <xsl:for-each select="xalan:nodeset($references)//fn">
3402
- <xsl:variable name="reference" select="@reference"/>
3403
- <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
3404
- <fo:table-row>
3405
- <fo:table-cell>
3406
- <fo:block>
3407
- <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
3408
- <xsl:value-of select="@reference"/>
3409
- </fo:inline>
3410
- </fo:block>
3411
- </fo:table-cell>
3412
- <fo:table-cell>
3413
- <fo:block xsl:use-attribute-sets="figure-fn-body-style">
3414
- <xsl:if test="normalize-space($key_iso) = 'true'">
3415
-
3416
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
3465
+ </xsl:if>
3466
+ <xsl:copy-of select="./node()"/>
3467
+ </fo:block>
3468
+ </fo:table-cell>
3469
+ </fo:table-row>
3470
+ </xsl:if>
3471
+ </xsl:for-each>
3472
+ </fo:table-body>
3473
+ </fo:table>
3417
3474
 
3418
- </xsl:if>
3419
- <xsl:copy-of select="./node()"/>
3420
- </fo:block>
3421
- </fo:table-cell>
3422
- </fo:table-row>
3423
- </xsl:if>
3424
- </xsl:for-each>
3425
- </fo:table-body>
3426
- </fo:table>
3427
3475
  </fo:block>
3428
3476
  </xsl:if>
3429
3477
 
@@ -3499,12 +3547,14 @@
3499
3547
 
3500
3548
  <fo:block margin-bottom="12pt" text-align="left">
3501
3549
 
3502
- <xsl:variable name="title-where">
3550
+ <!-- <xsl:variable name="title-where">
3503
3551
  <xsl:call-template name="getLocalizedString">
3504
3552
  <xsl:with-param name="key">where</xsl:with-param>
3505
3553
  </xsl:call-template>
3506
3554
  </xsl:variable>
3507
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
3555
+ <xsl:value-of select="$title-where"/> -->
3556
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
3557
+ <xsl:text> </xsl:text>
3508
3558
  <xsl:apply-templates select="*[local-name()='dt']/*"/>
3509
3559
  <xsl:text/>
3510
3560
  <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
@@ -3514,12 +3564,14 @@
3514
3564
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
3515
3565
  <fo:block margin-bottom="12pt" text-align="left">
3516
3566
 
3517
- <xsl:variable name="title-where">
3567
+ <!-- <xsl:variable name="title-where">
3518
3568
  <xsl:call-template name="getLocalizedString">
3519
3569
  <xsl:with-param name="key">where</xsl:with-param>
3520
3570
  </xsl:call-template>
3521
3571
  </xsl:variable>
3522
- <xsl:value-of select="$title-where"/>
3572
+ <xsl:value-of select="$title-where"/><xsl:if test="$namespace = 'bsi' or $namespace = 'itu'">:</xsl:if> -->
3573
+ <!-- preceding 'p' with word 'where' -->
3574
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
3523
3575
  </fo:block>
3524
3576
  </xsl:when> <!-- END: a few components -->
3525
3577
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
@@ -3702,6 +3754,9 @@
3702
3754
 
3703
3755
  </xsl:template> <!-- END: dl -->
3704
3756
 
3757
+ <!-- ignore 'p' with 'where' in formula, before 'dl' -->
3758
+ <xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
3759
+
3705
3760
  <xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
3706
3761
  <xsl:param name="process">false</xsl:param>
3707
3762
  <xsl:if test="$process = 'true'">
@@ -4528,20 +4583,34 @@
4528
4583
 
4529
4584
  <xsl:template name="add-zero-spaces-java">
4530
4585
  <xsl:param name="text" select="."/>
4531
- <!-- add zero-width space (#x200B) after characters: dash, dot, equal, underscore, em dash, thin space, arrow right -->
4532
- <xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|=|_|—| |→)','$1​')"/>
4586
+
4587
+ <!-- add zero-width space (#x200B) after dot with next non-digit -->
4588
+ <xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(\.)([^\d\s])','$1​$2')"/>
4589
+ <!-- add zero-width space (#x200B) after characters: dash, equal, underscore, em dash, thin space, arrow right, ; -->
4590
+ <xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1),'(-|=|_|—| |→|;)','$1​')"/>
4533
4591
  <!-- add zero-width space (#x200B) after characters: colon, if there aren't digits after -->
4534
- <xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1),'(:)(\D)','$1​$2')"/>
4592
+ <xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2),'(:)(\D)','$1​$2')"/>
4535
4593
  <!-- add zero-width space (#x200B) after characters: 'great than' -->
4536
- <xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2), '(\u003e)(?!\u003e)', '$1​')"/><!-- negative lookahead: 'great than' not followed by 'great than' -->
4594
+ <xsl:variable name="text4" select="java:replaceAll(java:java.lang.String.new($text3), '(\u003e)(?!\u003e)', '$1​')"/><!-- negative lookahead: 'great than' not followed by 'great than' -->
4537
4595
  <!-- add zero-width space (#x200B) before characters: 'less than' -->
4538
- <xsl:variable name="text4" select="java:replaceAll(java:java.lang.String.new($text3), '(?&lt;!\u003c)(\u003c)', '​$1')"/> <!-- (?<!\u003c)(\u003c) --> <!-- negative lookbehind: 'less than' not preceeded by 'less than' -->
4596
+ <xsl:variable name="text5" select="java:replaceAll(java:java.lang.String.new($text4), '(?&lt;!\u003c)(\u003c)', '​$1')"/> <!-- (?<!\u003c)(\u003c) --> <!-- negative lookbehind: 'less than' not preceeded by 'less than' -->
4539
4597
  <!-- add zero-width space (#x200B) before character: { -->
4540
- <xsl:variable name="text5" select="java:replaceAll(java:java.lang.String.new($text4), '(?&lt;!\W)(\{)', '​$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
4598
+ <xsl:variable name="text6" select="java:replaceAll(java:java.lang.String.new($text5), '(?&lt;!\W)(\{)', '​$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
4541
4599
  <!-- add zero-width space (#x200B) after character: , -->
4542
- <xsl:variable name="text6" select="java:replaceAll(java:java.lang.String.new($text5), '(\,)(?!\d)', '$1​')"/> <!-- negative lookahead: ',' not followed by digit -->
4600
+ <xsl:variable name="text7" select="java:replaceAll(java:java.lang.String.new($text6), '(\,)(?!\d)', '$1​')"/> <!-- negative lookahead: ',' not followed by digit -->
4601
+ <!-- add zero-width space (#x200B) after character: '/' -->
4602
+ <xsl:variable name="text8" select="java:replaceAll(java:java.lang.String.new($text7), '(\u002f)(?!\u002f)', '$1​')"/><!-- negative lookahead: '/' not followed by '/' -->
4543
4603
 
4544
- <xsl:value-of select="$text6"/>
4604
+ <xsl:variable name="text9">
4605
+ <xsl:choose>
4606
+ <xsl:when test="$isGenerateTableIF = 'true'">
4607
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text8), '([\u3000-\u9FFF])', '$1​')"/> <!-- 3000 - CJK Symbols and Punctuation ... 9FFF CJK Unified Ideographs-->
4608
+ </xsl:when>
4609
+ <xsl:otherwise><xsl:value-of select="$text8"/></xsl:otherwise>
4610
+ </xsl:choose>
4611
+ </xsl:variable>
4612
+
4613
+ <xsl:value-of select="$text9"/>
4545
4614
  </xsl:template>
4546
4615
 
4547
4616
  <xsl:template name="add-zero-spaces-link-java">
@@ -4549,8 +4618,8 @@
4549
4618
 
4550
4619
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
4551
4620
  <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
4552
- <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
4553
- <xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
4621
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
4622
+ <xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1​')"/>
4554
4623
  <!-- remove zero-width space at the end -->
4555
4624
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '​$', '')"/>
4556
4625
  </xsl:template>
@@ -4905,9 +4974,28 @@
4905
4974
  </xsl:variable>
4906
4975
  <xsl:copy-of select="$newRow"/>
4907
4976
 
4908
- <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
4909
- <xsl:with-param name="previousRow" select="$newRow"/>
4910
- </xsl:apply-templates>
4977
+ <!-- optimize to prevent StackOverflowError, just copy next 'tr' -->
4978
+ <xsl:variable name="currrow_num" select="count(preceding-sibling::tr) + 1"/>
4979
+ <xsl:variable name="nextrow_without_rowspan_" select="count(following-sibling::tr[*[@rowspan and @rowspan != 1]][1]/preceding-sibling::tr) + 1"/>
4980
+ <xsl:variable name="nextrow_without_rowspan" select="$nextrow_without_rowspan_ - $currrow_num"/>
4981
+ <xsl:choose>
4982
+ <xsl:when test="not(xalan:nodeset($newRow)/*/*[@rowspan and @rowspan != 1]) and $nextrow_without_rowspan &lt;= 0">
4983
+ <xsl:copy-of select="following-sibling::tr"/>
4984
+ </xsl:when>
4985
+ <!-- <xsl:when test="xalan:nodeset($newRow)/*[not(@rowspan) or (@rowspan = 1)] and $nextrow_without_rowspan &gt; 0">
4986
+ <xsl:copy-of select="following-sibling::tr[position() &lt;= $nextrow_without_rowspan]"/>
4987
+
4988
+ <xsl:copy-of select="following-sibling::tr[$nextrow_without_rowspan + 1]"/>
4989
+ <xsl:apply-templates select="following-sibling::tr[$nextrow_without_rowspan + 2]" mode="simple-table-rowspan">
4990
+ <xsl:with-param name="previousRow" select="following-sibling::tr[$nextrow_without_rowspan + 1]"/>
4991
+ </xsl:apply-templates>
4992
+ </xsl:when> -->
4993
+ <xsl:otherwise>
4994
+ <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
4995
+ <xsl:with-param name="previousRow" select="$newRow"/>
4996
+ </xsl:apply-templates>
4997
+ </xsl:otherwise>
4998
+ </xsl:choose>
4911
4999
  </xsl:template>
4912
5000
  <!-- End mode simple-table-rowspan -->
4913
5001
 
@@ -5070,6 +5158,27 @@
5070
5158
  </xsl:call-template>
5071
5159
  </xsl:template>
5072
5160
 
5161
+ <xsl:template match="*[local-name() = 'link'][normalize-space() = '']" mode="td_text_with_formatting">
5162
+ <xsl:variable name="link">
5163
+ <link_updated>
5164
+ <xsl:variable name="target_text">
5165
+ <xsl:choose>
5166
+ <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
5167
+ <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
5168
+ </xsl:when>
5169
+ <xsl:otherwise>
5170
+ <xsl:value-of select="normalize-space(@target)"/>
5171
+ </xsl:otherwise>
5172
+ </xsl:choose>
5173
+ </xsl:variable>
5174
+ <xsl:value-of select="$target_text"/>
5175
+ </link_updated>
5176
+ </xsl:variable>
5177
+ <xsl:for-each select="xalan:nodeset($link)/*">
5178
+ <xsl:apply-templates mode="td_text_with_formatting"/>
5179
+ </xsl:for-each>
5180
+ </xsl:template>
5181
+
5073
5182
  <xsl:template name="getFormattingTags">
5074
5183
  <tags>
5075
5184
  <xsl:if test="ancestor::*[local-name() = 'strong']"><tag>strong</tag></xsl:if>
@@ -5411,7 +5520,7 @@
5411
5520
  </xsl:variable>
5412
5521
  <fo:inline xsl:use-attribute-sets="link-style">
5413
5522
 
5414
- <xsl:if test="starts-with(normalize-space(@target), 'mailto:')">
5523
+ <xsl:if test="starts-with(normalize-space(@target), 'mailto:') and not(ancestor::*[local-name() = 'td'])">
5415
5524
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5416
5525
  </xsl:if>
5417
5526
 
@@ -5770,10 +5879,10 @@
5770
5879
  <fo:block xsl:use-attribute-sets="figure-style">
5771
5880
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
5772
5881
  </fo:block>
5773
- <xsl:call-template name="fn_display_figure"/>
5774
5882
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
5775
5883
  <xsl:call-template name="note"/>
5776
5884
  </xsl:for-each>
5885
+ <xsl:call-template name="fn_display_figure"/>
5777
5886
 
5778
5887
  <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
5779
5888
 
@@ -5836,7 +5945,13 @@
5836
5945
  </xsl:choose>
5837
5946
  </xsl:variable>
5838
5947
 
5839
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
5948
+ <xsl:variable name="image_width_effective">
5949
+
5950
+ <xsl:value-of select="$width_effective"/>
5951
+
5952
+ </xsl:variable>
5953
+
5954
+ <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
5840
5955
  <xsl:if test="number($scale) &lt; 100">
5841
5956
 
5842
5957
  <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
@@ -6423,6 +6538,13 @@
6423
6538
  <xsl:when test="$contents_nodes/doc">
6424
6539
  <xsl:choose>
6425
6540
  <xsl:when test="count($contents_nodes/doc) &gt; 1">
6541
+
6542
+ <xsl:if test="$contents_nodes/collection">
6543
+ <fo:bookmark internal-destination="{$contents/collection/@firstpage_id}">
6544
+ <fo:bookmark-title>collection.pdf</fo:bookmark-title>
6545
+ </fo:bookmark>
6546
+ </xsl:if>
6547
+
6426
6548
  <xsl:for-each select="$contents_nodes/doc">
6427
6549
  <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
6428
6550
  <xsl:if test="@bundle = 'true'">
@@ -8299,6 +8421,44 @@
8299
8421
 
8300
8422
  <fo:list-block xsl:use-attribute-sets="list-style">
8301
8423
 
8424
+ <xsl:variable name="provisional_distance_between_starts_">
8425
+ <attributes xsl:use-attribute-sets="list-style">
8426
+
8427
+ </attributes>
8428
+ </xsl:variable>
8429
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space(xalan:nodeset($provisional_distance_between_starts_)/attributes/@provisional-distance-between-starts)"/>
8430
+ <xsl:if test="$provisional_distance_between_starts != ''">
8431
+ <xsl:attribute name="provisional-distance-between-starts"><xsl:value-of select="$provisional_distance_between_starts"/></xsl:attribute>
8432
+ </xsl:if>
8433
+ <xsl:variable name="provisional_distance_between_starts_value" select="substring-before($provisional_distance_between_starts, 'mm')"/>
8434
+
8435
+ <!-- increase provisional-distance-between-starts for long lists -->
8436
+ <xsl:if test="local-name() = 'ol'">
8437
+ <!-- Examples: xiii), xviii), xxviii) -->
8438
+ <xsl:variable name="item_numbers">
8439
+ <xsl:for-each select="*[local-name() = 'li']">
8440
+ <item><xsl:call-template name="getListItemFormat"/></item>
8441
+ </xsl:for-each>
8442
+ </xsl:variable>
8443
+
8444
+ <xsl:variable name="max_length">
8445
+ <xsl:for-each select="xalan:nodeset($item_numbers)/item">
8446
+ <xsl:sort select="string-length(.)" data-type="number" order="descending"/>
8447
+ <xsl:if test="position() = 1"><xsl:value-of select="string-length(.)"/></xsl:if>
8448
+ </xsl:for-each>
8449
+ </xsl:variable>
8450
+
8451
+ <!-- base width (provisional-distance-between-starts) for 4 chars -->
8452
+ <xsl:variable name="addon" select="$max_length - 4"/>
8453
+ <xsl:if test="$addon &gt; 0">
8454
+ <xsl:attribute name="provisional-distance-between-starts"><xsl:value-of select="$provisional_distance_between_starts_value + $addon * 2"/>mm</xsl:attribute>
8455
+ </xsl:if>
8456
+ <!-- DEBUG -->
8457
+ <!-- <xsl:copy-of select="$item_numbers"/>
8458
+ <max_length><xsl:value-of select="$max_length"/></max_length>
8459
+ <addon><xsl:value-of select="$addon"/></addon> -->
8460
+ </xsl:if>
8461
+
8302
8462
  <xsl:if test="*[local-name() = 'name']">
8303
8463
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
8304
8464
  </xsl:if>
@@ -9230,7 +9390,7 @@
9230
9390
  <!-- \S matches any non-whitespace character (equivalent to [^\r\n\t\f\v ]) -->
9231
9391
  <!-- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable> -->
9232
9392
  <!-- add &lt; and &gt; to \S -->
9233
- <xsl:variable name="regex_S">[^\r\n\t\f\v \&lt;&gt;]</xsl:variable>
9393
+ <xsl:variable name="regex_S">[^\r\n\t\f\v \&lt;&gt;\u3000-\u9FFF]</xsl:variable>
9234
9394
  <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>
9235
9395
  <xsl:variable name="text3">
9236
9396
  <text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
@@ -9252,7 +9412,8 @@
9252
9412
  <xsl:choose>
9253
9413
  <xsl:when test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
9254
9414
  <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
9255
- <xsl:variable name="regex_dots_units">((\b((\S{1,3}\.\S+)|(\S+\.\S{1,3}))\b)|(\.\S{1,3})\b)</xsl:variable>
9415
+ <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
9416
+ <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>
9256
9417
  <xsl:for-each select="xalan:nodeset($text3)/text/node()">
9257
9418
  <xsl:choose>
9258
9419
  <xsl:when test="self::text()">
@@ -9855,6 +10016,23 @@
9855
10016
  </xsl:if>
9856
10017
  </xsl:template>
9857
10018
 
10019
+ <xsl:template name="setBlockAttributes">
10020
+ <xsl:param name="text_align_default">left</xsl:param>
10021
+ <xsl:call-template name="setTextAlignment">
10022
+ <xsl:with-param name="default" select="$text_align_default"/>
10023
+ </xsl:call-template>
10024
+
10025
+ <!-- https://www.metanorma.org/author/topics/document-format/text/#avoiding-page-breaks -->
10026
+ <!-- Example: keep-lines-together="true" -->
10027
+ <xsl:if test="@keep-lines-together = 'true'">
10028
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
10029
+ </xsl:if>
10030
+ <!-- Example: keep-with-next="true" -->
10031
+ <xsl:if test="@keep-with-next = 'true'">
10032
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
10033
+ </xsl:if>
10034
+ </xsl:template>
10035
+
9858
10036
  <xsl:template name="number-to-words">
9859
10037
  <xsl:param name="number"/>
9860
10038
  <xsl:param name="first"/>
@@ -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
 
@@ -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 Csa
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-csa
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