metanorma-ribose 2.1.7 → 2.1.8

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: 6c1b24dece446288c1fc3107f0435bfe944ce86194510176f30195e8b53bad8c
4
- data.tar.gz: 62175ae256a81816f870fe2035f2d480387a4f8ef149af3e1ec35017d9aea534
3
+ metadata.gz: '02806954f01375bf0d716d5dd91c1353ab4d69526d49f19272b90aecb77159c8'
4
+ data.tar.gz: 5144b26500d73efc983995aee9b65bd79bab3c1ef040ad7f9530042b4313adfc
5
5
  SHA512:
6
- metadata.gz: 398637b24fae005be588c7c6cb400a6740f41fadf96943a50bb4c0e436943b11482a430ce85bc542561390681607258db657a8ee25c391c6692b402ef4349e96
7
- data.tar.gz: 462f520a6a0a6dab5f9bf0041a8d07fca7b8f9caf3a04c2c2c9c05258b32ed8c37add4e01cc1c1ab3e824f82e0856312f13d9b63e9891a65d761ec002009ede5
6
+ metadata.gz: c54c7909e991ca0a0c7dcc9a67656ccf9e5055be7159a54289d79705a9e85be79b0c2de2118d273d1185e8c29d5507a50738cb1fddbd9e692c842dbac3b981a4
7
+ data.tar.gz: fb60da53e4c8dc9dbc75c0c1ce63bd150ee8a85f5f314080fb2aa3e0ecabf4965f6bbfbf61b42d0f8a6a3928b70ad539e7573ed8606151504c4ca97ae6ec8ed3
@@ -9,7 +9,7 @@ on:
9
9
  pull_request:
10
10
 
11
11
  jobs:
12
- rake:
13
- uses: metanorma/metanorma-build-scripts/.github/workflows/plantuml-rake.yml@main
12
+ notify:
13
+ uses: metanorma/ci/.github/workflows/mn-processor-rake.yml@main
14
14
  secrets:
15
15
  pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
@@ -0,0 +1,24 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: release
4
+
5
+ on:
6
+ workflow_dispatch:
7
+ inputs:
8
+ next_version:
9
+ description: |
10
+ Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
11
+ required: true
12
+ default: 'skip'
13
+ push:
14
+ tags: [ v* ]
15
+
16
+ jobs:
17
+ release:
18
+ uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
19
+ with:
20
+ next_version: ${{ github.event.inputs.next_version }}
21
+ secrets:
22
+ rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
23
+ pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
24
+
@@ -1229,8 +1229,18 @@
1229
1229
 
1230
1230
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
1231
1231
 
1232
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">
1233
+ true
1234
+ </xsl:variable>
1235
+ <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
1236
+
1232
1237
  <xsl:variable name="isGenerateTableIF_">
1233
- false
1238
+ <xsl:choose>
1239
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
1240
+ <xsl:value-of select="normalize-space($table_if) = 'true'"/>
1241
+ </xsl:when>
1242
+ <xsl:otherwise>false</xsl:otherwise>
1243
+ </xsl:choose>
1234
1244
  </xsl:variable>
1235
1245
  <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
1236
1246
 
@@ -1860,9 +1870,8 @@
1860
1870
  </xsl:attribute-set>
1861
1871
 
1862
1872
  <xsl:attribute-set name="dt-block-style">
1863
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
1873
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
1864
1874
 
1865
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
1866
1875
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1867
1876
  <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1868
1877
 
@@ -2887,6 +2896,7 @@
2887
2896
 
2888
2897
  <xsl:variable name="margin-side">
2889
2898
  <xsl:choose>
2899
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">0</xsl:when>
2890
2900
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
2891
2901
  <xsl:otherwise>0</xsl:otherwise>
2892
2902
  </xsl:choose>
@@ -2949,6 +2959,7 @@
2949
2959
  </td>
2950
2960
  </tr>
2951
2961
  -->
2962
+ <!-- Simple_table=<xsl:copy-of select="$simple-table"/> -->
2952
2963
  <xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
2953
2964
 
2954
2965
  </xsl:when>
@@ -3083,12 +3094,17 @@
3083
3094
  <xsl:template name="calculate-column-widths">
3084
3095
  <xsl:param name="table"/>
3085
3096
  <xsl:param name="cols-count"/>
3086
-
3097
+ <xsl:choose>
3098
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
3099
+ <xsl:call-template name="get-calculated-column-widths-autolayout-algorithm"/>
3100
+ </xsl:when>
3101
+ <xsl:otherwise>
3087
3102
  <xsl:call-template name="calculate-column-widths-proportional">
3088
3103
  <xsl:with-param name="cols-count" select="$cols-count"/>
3089
3104
  <xsl:with-param name="table" select="$table"/>
3090
3105
  </xsl:call-template>
3091
-
3106
+ </xsl:otherwise>
3107
+ </xsl:choose>
3092
3108
  </xsl:template>
3093
3109
 
3094
3110
  <!-- ================================================== -->
@@ -3266,6 +3282,7 @@
3266
3282
  <!-- (https://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2) -->
3267
3283
  <!-- ================================================== -->
3268
3284
 
3285
+ <!-- INPUT: table with columns widths, generated by table_if.xsl -->
3269
3286
  <xsl:template name="calculate-column-widths-autolayout-algorithm">
3270
3287
  <xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
3271
3288
 
@@ -3277,67 +3294,6 @@
3277
3294
 
3278
3295
  <!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
3279
3296
 
3280
- <!-- get current table id -->
3281
- <xsl:variable name="table_id" select="@id"/>
3282
- <!-- find table by id in the file 'table_widths' -->
3283
- <!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
3284
- <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
3285
-
3286
- <!-- table='<xsl:copy-of select="$table"/>' -->
3287
- <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
3288
- <!-- table-if='<xsl:copy-of select="$table-if"/>' -->
3289
- <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
3290
-
3291
- <xsl:variable name="table_with_cell_widths_">
3292
- <xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
3293
- </xsl:variable>
3294
- <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
3295
-
3296
- <!-- <xsl:if test="$table_if_debug = 'true'">
3297
- <xsl:copy-of select="$table_with_cell_widths"/>
3298
- </xsl:if> -->
3299
-
3300
- <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
3301
-
3302
- <xsl:variable name="column_widths_">
3303
- <!-- iteration of columns -->
3304
- <xsl:for-each select="$table_with_cell_widths//tr[1]/td">
3305
- <xsl:variable name="pos" select="position()"/>
3306
- <column>
3307
- <xsl:attribute name="width_max">
3308
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
3309
- <xsl:sort select="." data-type="number" order="descending"/>
3310
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3311
- </xsl:for-each>
3312
- </xsl:attribute>
3313
- <xsl:attribute name="width_min">
3314
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
3315
- <xsl:sort select="." data-type="number" order="descending"/>
3316
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3317
- </xsl:for-each>
3318
- </xsl:attribute>
3319
- </column>
3320
- </xsl:for-each>
3321
- </xsl:variable>
3322
- <xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
3323
-
3324
- <!-- <column_widths>
3325
- <xsl:copy-of select="$column_widths"/>
3326
- </column_widths> -->
3327
-
3328
- <!-- These in turn, are used to find the minimum and maximum width for the table. -->
3329
- <xsl:variable name="table_widths_">
3330
- <table>
3331
- <xsl:attribute name="width_max">
3332
- <xsl:value-of select="sum($column_widths/column/@width_max)"/>
3333
- </xsl:attribute>
3334
- <xsl:attribute name="width_min">
3335
- <xsl:value-of select="sum($column_widths/column/@width_min)"/>
3336
- </xsl:attribute>
3337
- </table>
3338
- </xsl:variable>
3339
- <xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
3340
-
3341
3297
  <xsl:variable name="page_width">
3342
3298
  <xsl:choose>
3343
3299
  <xsl:when test="$parent_table_page-width != ''">
@@ -3350,16 +3306,13 @@
3350
3306
  </xsl:variable>
3351
3307
 
3352
3308
  <xsl:if test="$table_if_debug = 'true'">
3353
- <table_width>
3354
- <xsl:copy-of select="$table_widths"/>
3355
- </table_width>
3356
- <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
3309
+ <page_width><xsl:value-of select="$page_width"/></page_width>
3357
3310
  </xsl:if>
3358
3311
 
3359
3312
  <!-- There are three cases: -->
3360
3313
  <xsl:choose>
3361
3314
  <!-- 1. The minimum table width is equal to or wider than the available space -->
3362
- <xsl:when test="$table_widths/table/@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
3315
+ <xsl:when test="@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
3363
3316
  <!-- call old algorithm -->
3364
3317
  <case1/>
3365
3318
  <!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
@@ -3369,10 +3322,10 @@
3369
3322
  </xsl:call-template> -->
3370
3323
  </xsl:when>
3371
3324
  <!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
3372
- <xsl:when test="$table_widths/table/@width_max &lt;= $page_width">
3325
+ <xsl:when test="@width_max &lt;= $page_width">
3373
3326
  <case2/>
3374
3327
  <autolayout/>
3375
- <xsl:for-each select="$column_widths/column/@width_max">
3328
+ <xsl:for-each select="column/@width_max">
3376
3329
  <column divider="100"><xsl:value-of select="."/></column>
3377
3330
  </xsl:for-each>
3378
3331
  </xsl:when>
@@ -3382,19 +3335,19 @@
3382
3335
  For each column, let d be the difference between maximum and minimum width of that column.
3383
3336
  Now set the column's width to the minimum width plus d times W over D.
3384
3337
  This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
3385
- <xsl:when test="($table_widths/table/@width_max &gt; $page_width and $table_widths/table/@width_min &lt; $page_width) or ($table_widths/table/@width_min &gt;= $page_width)">
3338
+ <xsl:when test="(@width_max &gt; $page_width and @width_min &lt; $page_width) or (@width_min &gt;= $page_width)">
3386
3339
  <!-- difference between the available space and the minimum table width -->
3387
- <xsl:variable name="W" select="$page_width - $table_widths/table/@width_min"/>
3340
+ <xsl:variable name="W" select="$page_width - @width_min"/>
3388
3341
  <W><xsl:value-of select="$W"/></W>
3389
3342
  <!-- difference between maximum and minimum width of the table -->
3390
- <xsl:variable name="D" select="$table_widths/table/@width_max - $table_widths/table/@width_min"/>
3343
+ <xsl:variable name="D" select="@width_max - @width_min"/>
3391
3344
  <D><xsl:value-of select="$D"/></D>
3392
3345
  <case3/>
3393
3346
  <autolayout/>
3394
- <xsl:if test="$table_widths/table/@width_min &gt;= $page_width">
3347
+ <xsl:if test="@width_min &gt;= $page_width">
3395
3348
  <split_keep-within-line>true</split_keep-within-line>
3396
3349
  </xsl:if>
3397
- <xsl:for-each select="$column_widths/column">
3350
+ <xsl:for-each select="column">
3398
3351
  <!-- difference between maximum and minimum width of that column. -->
3399
3352
  <xsl:variable name="d" select="@width_max - @width_min"/>
3400
3353
  <d><xsl:value-of select="$d"/></d>
@@ -3420,23 +3373,39 @@
3420
3373
 
3421
3374
  <parent_element><xsl:value-of select="local-name(..)"/></parent_element>
3422
3375
 
3376
+ <ancestor_tree>
3377
+ <xsl:for-each select="ancestor::*">
3378
+ <ancestor><xsl:value-of select="local-name()"/></ancestor>
3379
+ </xsl:for-each>
3380
+ </ancestor_tree>
3381
+
3423
3382
  <xsl:variable name="parent_table_page-width_">
3424
3383
  <xsl:if test="$parent_table_id != ''">
3425
3384
  <!-- determine column number in the parent table -->
3426
3385
  <xsl:variable name="parent_table_column_number">
3427
3386
  <xsl:choose>
3428
- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
3387
+ <!-- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when> -->
3388
+ <xsl:when test="(ancestor::*[local-name() = 'dd' or local-name() = 'table' or local-name() = 'dl'])[last()][local-name() = 'dd' or local-name() = 'dl']">2</xsl:when>
3429
3389
  <xsl:otherwise> <!-- parent is table -->
3430
3390
  <xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
3431
3391
  </xsl:otherwise>
3432
3392
  </xsl:choose>
3433
3393
  </xsl:variable>
3434
3394
  <!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
3435
- <xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
3395
+
3396
+ <xsl:variable name="parent_table_column_" select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
3397
+ <xsl:variable name="parent_table_column" select="xalan:nodeset($parent_table_column_)"/>
3398
+ <!-- <xsl:variable name="divider">
3399
+ <xsl:value-of select="$parent_table_column/@divider"/>
3400
+ <xsl:if test="not($parent_table_column/@divider)">1</xsl:if>
3401
+ </xsl:variable> -->
3402
+ <xsl:value-of select="$parent_table_column/text()"/> <!-- * 10 -->
3436
3403
  </xsl:if>
3437
3404
  </xsl:variable>
3438
3405
  <xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
3439
3406
 
3407
+ <parent_table_page-width><xsl:value-of select="$parent_table_page-width"/></parent_table_page-width>
3408
+
3440
3409
  <!-- get current table id -->
3441
3410
  <xsl:variable name="table_id" select="@id"/>
3442
3411
 
@@ -3457,50 +3426,6 @@
3457
3426
 
3458
3427
  </xsl:template> <!-- get-calculated-column-widths-autolayout-algorithm -->
3459
3428
 
3460
- <!-- ============================= -->
3461
- <!-- mode: determine_cell_widths-if -->
3462
- <!-- ============================= -->
3463
- <xsl:template match="@*|node()" mode="determine_cell_widths-if">
3464
- <xsl:copy>
3465
- <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
3466
- </xsl:copy>
3467
- </xsl:template>
3468
-
3469
- <xsl:template match="td | th" mode="determine_cell_widths-if">
3470
- <xsl:copy>
3471
- <xsl:copy-of select="@*"/>
3472
-
3473
- <!-- The maximum width is given by the widest line. -->
3474
- <xsl:attribute name="width_max">
3475
- <xsl:for-each select="p_len">
3476
- <xsl:sort select="." data-type="number" order="descending"/>
3477
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3478
- </xsl:for-each>
3479
- </xsl:attribute>
3480
-
3481
- <!-- The minimum width is given by the widest text element (word, image, etc.) -->
3482
- <xsl:variable name="width_min">
3483
- <xsl:for-each select="word_len">
3484
- <xsl:sort select="." data-type="number" order="descending"/>
3485
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3486
- </xsl:for-each>
3487
- </xsl:variable>
3488
- <xsl:attribute name="width_min">
3489
- <xsl:value-of select="$width_min"/>
3490
- </xsl:attribute>
3491
-
3492
- <xsl:if test="$width_min = 0">
3493
- <xsl:attribute name="width_min">1</xsl:attribute>
3494
- </xsl:if>
3495
-
3496
- <xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
3497
-
3498
- </xsl:copy>
3499
- </xsl:template>
3500
- <!-- ============================= -->
3501
- <!-- END mode: determine_cell_widths-if -->
3502
- <!-- ============================= -->
3503
-
3504
3429
  <!-- ================================================== -->
3505
3430
  <!-- Calculate column's width based on HTML4 algorithm -->
3506
3431
  <!-- ================================================== -->
@@ -3691,6 +3616,7 @@
3691
3616
  <xsl:when test="$table_or_dl = 'table'">
3692
3617
  <xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
3693
3618
  <fo:table-row number-columns-spanned="{$col_count}">
3619
+ <xsl:copy-of select="../@font-weight"/>
3694
3620
  <!-- <test_table><xsl:copy-of select="."/></test_table> -->
3695
3621
  <xsl:call-template name="td"/>
3696
3622
  </fo:table-row>
@@ -3842,7 +3768,7 @@
3842
3768
 
3843
3769
  <xsl:apply-templates/>
3844
3770
 
3845
- <xsl:if test="$isGenerateTableIF = 'true'"><fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
3771
+ <xsl:if test="$isGenerateTableIF = 'true'"> <fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
3846
3772
 
3847
3773
  </fo:block>
3848
3774
  </fo:table-cell>
@@ -4168,6 +4094,7 @@
4168
4094
  <xsl:template match="*[local-name()='dl']">
4169
4095
  <xsl:variable name="isAdded" select="@added"/>
4170
4096
  <xsl:variable name="isDeleted" select="@deleted"/>
4097
+ <!-- <dl><xsl:copy-of select="."/></dl> -->
4171
4098
  <fo:block-container>
4172
4099
 
4173
4100
  <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
@@ -4704,21 +4631,16 @@
4704
4631
  <!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
4705
4632
  <xsl:template match="*[local-name()='dt']" mode="dl_if">
4706
4633
  <xsl:param name="id"/>
4707
- <xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
4708
4634
  <tr>
4709
4635
  <td>
4710
4636
  <xsl:copy-of select="node()"/>
4711
4637
  </td>
4712
4638
  <td>
4713
-
4714
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
4715
-
4716
- <!-- get paragraphs from nested 'dl' -->
4717
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
4718
-
4639
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
4640
+ <!-- get paragraphs from nested 'dl' -->
4641
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
4719
4642
  </td>
4720
4643
  </tr>
4721
-
4722
4644
  </xsl:template>
4723
4645
  <xsl:template match="*[local-name()='dd']" mode="dl_if"/>
4724
4646
 
@@ -5379,6 +5301,9 @@
5379
5301
  <xsl:variable name="td">
5380
5302
  <xsl:element name="td">
5381
5303
  <xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
5304
+ <xsl:if test="local-name()='th'">
5305
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
5306
+ </xsl:if>
5382
5307
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
5383
5308
  <xsl:apply-templates mode="simple-table-colspan"/>
5384
5309
  </xsl:element>
@@ -5391,6 +5316,9 @@
5391
5316
  <xsl:otherwise>
5392
5317
  <xsl:element name="td">
5393
5318
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
5319
+ <xsl:if test="local-name()='th'">
5320
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
5321
+ </xsl:if>
5394
5322
  <xsl:apply-templates mode="simple-table-colspan"/>
5395
5323
  </xsl:element>
5396
5324
  </xsl:otherwise>
@@ -5520,8 +5448,14 @@
5520
5448
  <xsl:copy-of select="@*"/>
5521
5449
  <xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
5522
5450
  <xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
5451
+ <xsl:variable name="divide">
5452
+ <xsl:choose>
5453
+ <xsl:when test="@divide"><xsl:value-of select="@divide"/></xsl:when>
5454
+ <xsl:otherwise>1</xsl:otherwise>
5455
+ </xsl:choose>
5456
+ </xsl:variable>
5523
5457
  <xsl:attribute name="id">
5524
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
5458
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
5525
5459
  </xsl:attribute>
5526
5460
 
5527
5461
  <xsl:for-each select="*[local-name() = 'p']">
@@ -5529,10 +5463,12 @@
5529
5463
  <xsl:copy-of select="@*"/>
5530
5464
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
5531
5465
  <xsl:attribute name="id">
5532
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
5466
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
5533
5467
  </xsl:attribute>
5534
5468
 
5535
- <xsl:copy-of select="node()"/>
5469
+ <!-- <xsl:copy-of select="node()" /> -->
5470
+ <xsl:apply-templates mode="simple-table-noid"/>
5471
+
5536
5472
  </xsl:copy>
5537
5473
  </xsl:for-each>
5538
5474
 
@@ -5561,7 +5497,7 @@
5561
5497
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
5562
5498
  <xsl:copy>
5563
5499
  <xsl:attribute name="id">
5564
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
5500
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
5565
5501
  </xsl:attribute>
5566
5502
  <xsl:copy-of select="node()"/>
5567
5503
  </xsl:copy>
@@ -5570,6 +5506,24 @@
5570
5506
  </xsl:copy>
5571
5507
 
5572
5508
  </xsl:template>
5509
+
5510
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p']//*" mode="simple-table-noid">
5511
+ <xsl:copy>
5512
+ <xsl:choose>
5513
+ <xsl:when test="$isGenerateTableIF = 'true'">
5514
+ <xsl:copy-of select="@*[local-name() != 'id']"/> <!-- to prevent repeat id in colspan/rowspan cells -->
5515
+ <!-- <xsl:if test="local-name() = 'dl' or local-name() = 'table'">
5516
+ <xsl:copy-of select="@id"/>
5517
+ </xsl:if> -->
5518
+ </xsl:when>
5519
+ <xsl:otherwise>
5520
+ <xsl:copy-of select="@*"/>
5521
+ </xsl:otherwise>
5522
+ </xsl:choose>
5523
+ <xsl:apply-templates select="node()" mode="simple-table-noid"/>
5524
+ </xsl:copy>
5525
+ </xsl:template>
5526
+
5573
5527
  <!-- End mode: simple-table-id -->
5574
5528
  <!-- ===================== -->
5575
5529
  <!-- ===================== -->
@@ -5579,7 +5533,7 @@
5579
5533
  <!-- =============================== -->
5580
5534
  <xsl:template match="@*|node()" mode="td_text_with_formatting">
5581
5535
  <xsl:copy>
5582
- <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
5536
+ <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
5583
5537
  </xsl:copy>
5584
5538
  </xsl:template>
5585
5539
 
@@ -5693,6 +5647,10 @@
5693
5647
 
5694
5648
  <fo:inline xsl:use-attribute-sets="mathml-style">
5695
5649
 
5650
+ <xsl:if test="$isGenerateTableIF = 'true' and ancestor::*[local-name() = 'td' or local-name() = 'th' or local-name() = 'dl'] and not(following-sibling::node()[not(self::comment())][normalize-space() != ''])"> <!-- math in table cell, and math is last element -->
5651
+ <!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
5652
+ </xsl:if>
5653
+
5696
5654
  <xsl:call-template name="setTrackChangesStyles">
5697
5655
  <xsl:with-param name="isAdded" select="$isAdded"/>
5698
5656
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
@@ -7698,15 +7656,12 @@
7698
7656
 
7699
7657
  <xsl:template match="*[local-name()='tr']" mode="requirement">
7700
7658
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
7701
- <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
7702
- <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
7703
- </xsl:if>
7704
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
7705
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
7706
- </xsl:if>
7707
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
7708
- <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
7659
+
7660
+ <xsl:if test="parent::*[local-name()='thead'] or starts-with(*[local-name()='td' or local-name()='th'][1], 'Requirement ') or starts-with(*[local-name()='td' or local-name()='th'][1], 'Recommendation ')">
7661
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
7662
+
7709
7663
  </xsl:if>
7664
+
7710
7665
  <xsl:apply-templates mode="requirement"/>
7711
7666
  </fo:table-row>
7712
7667
  </xsl:template>
@@ -9223,7 +9178,7 @@
9223
9178
  </tbody>
9224
9179
  </xsl:variable>
9225
9180
  <xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
9226
- <xsl:call-template name="calculate-column-widths">
9181
+ <xsl:call-template name="calculate-column-widths-proportional">
9227
9182
  <xsl:with-param name="cols-count" select="$cols-count"/>
9228
9183
  <xsl:with-param name="table" select="$toc_table_simple"/>
9229
9184
  </xsl:call-template>
@@ -225,9 +225,9 @@
225
225
  <zeroOrMore>
226
226
  <ref name="forename"/>
227
227
  </zeroOrMore>
228
- <zeroOrMore>
229
- <ref name="initial"/>
230
- </zeroOrMore>
228
+ <optional>
229
+ <ref name="formatted-initials"/>
230
+ </optional>
231
231
  <ref name="surname"/>
232
232
  <zeroOrMore>
233
233
  <ref name="addition"/>
@@ -247,8 +247,8 @@
247
247
  <ref name="LocalizedString"/>
248
248
  </element>
249
249
  </define>
250
- <define name="initial">
251
- <element name="initial">
250
+ <define name="formatted-initials">
251
+ <element name="formatted-initials">
252
252
  <ref name="LocalizedString"/>
253
253
  </element>
254
254
  </define>
@@ -264,6 +264,9 @@
264
264
  </define>
265
265
  <define name="forename">
266
266
  <element name="forename">
267
+ <optional>
268
+ <attribute name="initial"/>
269
+ </optional>
267
270
  <ref name="LocalizedString"/>
268
271
  </element>
269
272
  </define>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.1.7".freeze
3
+ VERSION = "2.1.8".freeze
4
4
  end
5
5
  end
@@ -7,8 +7,9 @@ require_relative "isodoc/ribose/pdf_convert"
7
7
  require_relative "isodoc/ribose/presentation_xml_convert"
8
8
  require_relative "isodoc/ribose/xref"
9
9
  require_relative "metanorma/ribose/version"
10
+ require "metanorma"
10
11
 
11
- if defined? Metanorma
12
+ if defined? Metanorma::Registry
12
13
  require_relative "metanorma/ribose"
13
14
  Metanorma::Registry.instance.register(Metanorma::Ribose::Processor)
14
15
  end
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.1.7
4
+ version: 2.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-24 00:00:00.000000000 Z
11
+ date: 2022-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic
@@ -177,6 +177,7 @@ extensions: []
177
177
  extra_rdoc_files: []
178
178
  files:
179
179
  - ".github/workflows/rake.yml"
180
+ - ".github/workflows/release.yml"
180
181
  - ".gitignore"
181
182
  - ".hound.yml"
182
183
  - ".rubocop.yml"
@@ -192,16 +193,13 @@ files:
192
193
  - lib/isodoc/ribose/html/header.html
193
194
  - lib/isodoc/ribose/html/html_rsd_intro.html
194
195
  - lib/isodoc/ribose/html/html_rsd_titlepage.html
195
- - lib/isodoc/ribose/html/htmlstyle.css
196
196
  - lib/isodoc/ribose/html/htmlstyle.scss
197
197
  - lib/isodoc/ribose/html/logo.png
198
198
  - lib/isodoc/ribose/html/logo.svg
199
- - lib/isodoc/ribose/html/rsd.css
200
199
  - lib/isodoc/ribose/html/rsd.scss
201
200
  - lib/isodoc/ribose/html/scripts.html
202
201
  - lib/isodoc/ribose/html/word_rsd_intro.html
203
202
  - lib/isodoc/ribose/html/word_rsd_titlepage.html
204
- - lib/isodoc/ribose/html/wordstyle.css
205
203
  - lib/isodoc/ribose/html/wordstyle.scss
206
204
  - lib/isodoc/ribose/html_convert.rb
207
205
  - lib/isodoc/ribose/i18n-en.yaml
@@ -229,7 +227,7 @@ homepage: https://github.com/metanorma/metanorma-ribose
229
227
  licenses:
230
228
  - BSD-2-Clause
231
229
  metadata: {}
232
- post_install_message:
230
+ post_install_message:
233
231
  rdoc_options: []
234
232
  require_paths:
235
233
  - lib
@@ -244,8 +242,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
242
  - !ruby/object:Gem::Version
245
243
  version: '0'
246
244
  requirements: []
247
- rubygems_version: 3.3.16
248
- signing_key:
245
+ rubygems_version: 3.1.6
246
+ signing_key:
249
247
  specification_version: 4
250
248
  summary: metanorma-ribose lets you write Ribose standards in AsciiDoc.
251
249
  test_files: []