metanorma-ogc 2.2.1 → 2.2.2.1

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: 90753d8edec30ec4c7b5be4a9ff9393ef1aaf64576b4b2a1b6790e20b049b571
4
- data.tar.gz: a641975e74d070b22a75e5f881703195d4d28d32ae58436662d7b8887f2c0ee6
3
+ metadata.gz: 5e546f954086e227735140f0c7245ee638359603e9bec1776a324f94566db19c
4
+ data.tar.gz: 423f04cb56a487c996c0826bd295b68b04a9e01aa113017efba964084522e49d
5
5
  SHA512:
6
- metadata.gz: bd386438528b7966e9e1236a8b1198287639c6c150a2ef894ed1c361c9f60c128eadb15be7888a166de7d4de2145ddc7d33ff0d894a531f387f61f1f54d868aa
7
- data.tar.gz: 0c913f5326402b52cb1a33df542c18d4227e2ba0d9a206654b1a9d8f321ab2c4869a99b55e66c067466c069ff0b17fb3d716938b4ce7b16b551e2af89c37185f
6
+ metadata.gz: 4229b734fefcd69256163c47cdb9bec463182e1bb43f8dd72edd5844476350b496598413cf6b237b651d3157cfb9e5a76ed1f964d57acf3b41efc3c3108f704a
7
+ data.tar.gz: 25f4d09692d6548e65cd1391357c1334f609b4c2749bcd65d15727e509551045f868deab227f6e02b0f8ac1769610c5abd8c3f2e16b0e751602839eec1d2eee9
@@ -10,6 +10,6 @@ on:
10
10
 
11
11
  jobs:
12
12
  notify:
13
- uses: metanorma/metanorma-build-scripts/.github/workflows/mn-processor-rake.yml@main
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
+
@@ -846,7 +846,7 @@ table {
846
846
  .docstage-box table td {
847
847
  border: none; }
848
848
 
849
- table.recommendtest {
849
+ table.modspec {
850
850
  width: 100%;
851
851
  font-weight: 300;
852
852
  margin: 1em 0 2em 0;
@@ -854,22 +854,22 @@ table.recommendtest {
854
854
  margin-right: auto;
855
855
  padding-right: 2em;
856
856
  color: #010d16; }
857
- table.recommendtest, table.recommendtest th, table.recommendtest td {
857
+ table.modspec, table.modspec th, table.modspec td {
858
858
  border: none !important;
859
859
  font-size: 0.95em; }
860
- table.recommendtest th, table.recommendtest td {
860
+ table.modspec th, table.modspec td {
861
861
  padding: 1em; }
862
- table.recommendtest td.header {
862
+ table.modspec td.header {
863
863
  font-weigth: 400; }
864
- table.recommendtest tr:nth-child(even) {
864
+ table.modspec tr:nth-child(even) {
865
865
  background: #ffffff; }
866
- table.recommendtest tr:nth-child(odd) {
866
+ table.modspec tr:nth-child(odd) {
867
867
  background: #ffffff; }
868
- table.recommendtest thead tr th {
868
+ table.modspec thead tr th {
869
869
  background-color: #5d99d6; }
870
- table.recommendtest td, table.recommendtest th {
870
+ table.modspec td, table.modspec th {
871
871
  padding: 1em; }
872
- table.recommendtest td.header {
872
+ table.modspec td.header {
873
873
  font-weight: 400; }
874
874
 
875
875
  td > p:first-child, th > p:first-child {
@@ -321,7 +321,7 @@ table {
321
321
  }
322
322
  }
323
323
 
324
- table.recommendtest {
324
+ table.modspec {
325
325
  @include table($border: none !important);
326
326
 
327
327
  color: #010d16;
@@ -1480,8 +1480,18 @@
1480
1480
 
1481
1481
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
1482
1482
 
1483
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">
1484
+ true
1485
+ </xsl:variable>
1486
+ <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
1487
+
1483
1488
  <xsl:variable name="isGenerateTableIF_">
1484
- false
1489
+ <xsl:choose>
1490
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
1491
+ <xsl:value-of select="normalize-space($table_if) = 'true'"/>
1492
+ </xsl:when>
1493
+ <xsl:otherwise>false</xsl:otherwise>
1494
+ </xsl:choose>
1485
1495
  </xsl:variable>
1486
1496
  <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
1487
1497
 
@@ -2157,9 +2167,8 @@
2157
2167
  </xsl:attribute-set>
2158
2168
 
2159
2169
  <xsl:attribute-set name="dt-block-style">
2160
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
2170
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
2161
2171
 
2162
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
2163
2172
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2164
2173
 
2165
2174
  </xsl:attribute-set>
@@ -3167,6 +3176,7 @@
3167
3176
 
3168
3177
  <xsl:variable name="margin-side">
3169
3178
  <xsl:choose>
3179
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">0</xsl:when>
3170
3180
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
3171
3181
  <xsl:otherwise>0</xsl:otherwise>
3172
3182
  </xsl:choose>
@@ -3238,6 +3248,7 @@
3238
3248
  </td>
3239
3249
  </tr>
3240
3250
  -->
3251
+ <!-- Simple_table=<xsl:copy-of select="$simple-table"/> -->
3241
3252
  <xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
3242
3253
 
3243
3254
  </xsl:when>
@@ -3369,12 +3380,17 @@
3369
3380
  <xsl:template name="calculate-column-widths">
3370
3381
  <xsl:param name="table"/>
3371
3382
  <xsl:param name="cols-count"/>
3372
-
3383
+ <xsl:choose>
3384
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
3385
+ <xsl:call-template name="get-calculated-column-widths-autolayout-algorithm"/>
3386
+ </xsl:when>
3387
+ <xsl:otherwise>
3373
3388
  <xsl:call-template name="calculate-column-widths-proportional">
3374
3389
  <xsl:with-param name="cols-count" select="$cols-count"/>
3375
3390
  <xsl:with-param name="table" select="$table"/>
3376
3391
  </xsl:call-template>
3377
-
3392
+ </xsl:otherwise>
3393
+ </xsl:choose>
3378
3394
  </xsl:template>
3379
3395
 
3380
3396
  <!-- ================================================== -->
@@ -3552,6 +3568,7 @@
3552
3568
  <!-- (https://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2) -->
3553
3569
  <!-- ================================================== -->
3554
3570
 
3571
+ <!-- INPUT: table with columns widths, generated by table_if.xsl -->
3555
3572
  <xsl:template name="calculate-column-widths-autolayout-algorithm">
3556
3573
  <xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
3557
3574
 
@@ -3563,67 +3580,6 @@
3563
3580
 
3564
3581
  <!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
3565
3582
 
3566
- <!-- get current table id -->
3567
- <xsl:variable name="table_id" select="@id"/>
3568
- <!-- find table by id in the file 'table_widths' -->
3569
- <!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
3570
- <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
3571
-
3572
- <!-- table='<xsl:copy-of select="$table"/>' -->
3573
- <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
3574
- <!-- table-if='<xsl:copy-of select="$table-if"/>' -->
3575
- <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
3576
-
3577
- <xsl:variable name="table_with_cell_widths_">
3578
- <xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
3579
- </xsl:variable>
3580
- <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
3581
-
3582
- <!-- <xsl:if test="$table_if_debug = 'true'">
3583
- <xsl:copy-of select="$table_with_cell_widths"/>
3584
- </xsl:if> -->
3585
-
3586
- <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
3587
-
3588
- <xsl:variable name="column_widths_">
3589
- <!-- iteration of columns -->
3590
- <xsl:for-each select="$table_with_cell_widths//tr[1]/td">
3591
- <xsl:variable name="pos" select="position()"/>
3592
- <column>
3593
- <xsl:attribute name="width_max">
3594
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
3595
- <xsl:sort select="." data-type="number" order="descending"/>
3596
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3597
- </xsl:for-each>
3598
- </xsl:attribute>
3599
- <xsl:attribute name="width_min">
3600
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
3601
- <xsl:sort select="." data-type="number" order="descending"/>
3602
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3603
- </xsl:for-each>
3604
- </xsl:attribute>
3605
- </column>
3606
- </xsl:for-each>
3607
- </xsl:variable>
3608
- <xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
3609
-
3610
- <!-- <column_widths>
3611
- <xsl:copy-of select="$column_widths"/>
3612
- </column_widths> -->
3613
-
3614
- <!-- These in turn, are used to find the minimum and maximum width for the table. -->
3615
- <xsl:variable name="table_widths_">
3616
- <table>
3617
- <xsl:attribute name="width_max">
3618
- <xsl:value-of select="sum($column_widths/column/@width_max)"/>
3619
- </xsl:attribute>
3620
- <xsl:attribute name="width_min">
3621
- <xsl:value-of select="sum($column_widths/column/@width_min)"/>
3622
- </xsl:attribute>
3623
- </table>
3624
- </xsl:variable>
3625
- <xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
3626
-
3627
3583
  <xsl:variable name="page_width">
3628
3584
  <xsl:choose>
3629
3585
  <xsl:when test="$parent_table_page-width != ''">
@@ -3636,16 +3592,13 @@
3636
3592
  </xsl:variable>
3637
3593
 
3638
3594
  <xsl:if test="$table_if_debug = 'true'">
3639
- <table_width>
3640
- <xsl:copy-of select="$table_widths"/>
3641
- </table_width>
3642
- <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
3595
+ <page_width><xsl:value-of select="$page_width"/></page_width>
3643
3596
  </xsl:if>
3644
3597
 
3645
3598
  <!-- There are three cases: -->
3646
3599
  <xsl:choose>
3647
3600
  <!-- 1. The minimum table width is equal to or wider than the available space -->
3648
- <xsl:when test="$table_widths/table/@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
3601
+ <xsl:when test="@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
3649
3602
  <!-- call old algorithm -->
3650
3603
  <case1/>
3651
3604
  <!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
@@ -3655,10 +3608,10 @@
3655
3608
  </xsl:call-template> -->
3656
3609
  </xsl:when>
3657
3610
  <!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
3658
- <xsl:when test="$table_widths/table/@width_max &lt;= $page_width">
3611
+ <xsl:when test="@width_max &lt;= $page_width">
3659
3612
  <case2/>
3660
3613
  <autolayout/>
3661
- <xsl:for-each select="$column_widths/column/@width_max">
3614
+ <xsl:for-each select="column/@width_max">
3662
3615
  <column divider="100"><xsl:value-of select="."/></column>
3663
3616
  </xsl:for-each>
3664
3617
  </xsl:when>
@@ -3668,19 +3621,19 @@
3668
3621
  For each column, let d be the difference between maximum and minimum width of that column.
3669
3622
  Now set the column's width to the minimum width plus d times W over D.
3670
3623
  This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
3671
- <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)">
3624
+ <xsl:when test="(@width_max &gt; $page_width and @width_min &lt; $page_width) or (@width_min &gt;= $page_width)">
3672
3625
  <!-- difference between the available space and the minimum table width -->
3673
- <xsl:variable name="W" select="$page_width - $table_widths/table/@width_min"/>
3626
+ <xsl:variable name="W" select="$page_width - @width_min"/>
3674
3627
  <W><xsl:value-of select="$W"/></W>
3675
3628
  <!-- difference between maximum and minimum width of the table -->
3676
- <xsl:variable name="D" select="$table_widths/table/@width_max - $table_widths/table/@width_min"/>
3629
+ <xsl:variable name="D" select="@width_max - @width_min"/>
3677
3630
  <D><xsl:value-of select="$D"/></D>
3678
3631
  <case3/>
3679
3632
  <autolayout/>
3680
- <xsl:if test="$table_widths/table/@width_min &gt;= $page_width">
3633
+ <xsl:if test="@width_min &gt;= $page_width">
3681
3634
  <split_keep-within-line>true</split_keep-within-line>
3682
3635
  </xsl:if>
3683
- <xsl:for-each select="$column_widths/column">
3636
+ <xsl:for-each select="column">
3684
3637
  <!-- difference between maximum and minimum width of that column. -->
3685
3638
  <xsl:variable name="d" select="@width_max - @width_min"/>
3686
3639
  <d><xsl:value-of select="$d"/></d>
@@ -3706,23 +3659,39 @@
3706
3659
 
3707
3660
  <parent_element><xsl:value-of select="local-name(..)"/></parent_element>
3708
3661
 
3662
+ <ancestor_tree>
3663
+ <xsl:for-each select="ancestor::*">
3664
+ <ancestor><xsl:value-of select="local-name()"/></ancestor>
3665
+ </xsl:for-each>
3666
+ </ancestor_tree>
3667
+
3709
3668
  <xsl:variable name="parent_table_page-width_">
3710
3669
  <xsl:if test="$parent_table_id != ''">
3711
3670
  <!-- determine column number in the parent table -->
3712
3671
  <xsl:variable name="parent_table_column_number">
3713
3672
  <xsl:choose>
3714
- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
3673
+ <!-- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when> -->
3674
+ <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>
3715
3675
  <xsl:otherwise> <!-- parent is table -->
3716
3676
  <xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
3717
3677
  </xsl:otherwise>
3718
3678
  </xsl:choose>
3719
3679
  </xsl:variable>
3720
3680
  <!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
3721
- <xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
3681
+
3682
+ <xsl:variable name="parent_table_column_" select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
3683
+ <xsl:variable name="parent_table_column" select="xalan:nodeset($parent_table_column_)"/>
3684
+ <!-- <xsl:variable name="divider">
3685
+ <xsl:value-of select="$parent_table_column/@divider"/>
3686
+ <xsl:if test="not($parent_table_column/@divider)">1</xsl:if>
3687
+ </xsl:variable> -->
3688
+ <xsl:value-of select="$parent_table_column/text()"/> <!-- * 10 -->
3722
3689
  </xsl:if>
3723
3690
  </xsl:variable>
3724
3691
  <xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
3725
3692
 
3693
+ <parent_table_page-width><xsl:value-of select="$parent_table_page-width"/></parent_table_page-width>
3694
+
3726
3695
  <!-- get current table id -->
3727
3696
  <xsl:variable name="table_id" select="@id"/>
3728
3697
 
@@ -3743,50 +3712,6 @@
3743
3712
 
3744
3713
  </xsl:template> <!-- get-calculated-column-widths-autolayout-algorithm -->
3745
3714
 
3746
- <!-- ============================= -->
3747
- <!-- mode: determine_cell_widths-if -->
3748
- <!-- ============================= -->
3749
- <xsl:template match="@*|node()" mode="determine_cell_widths-if">
3750
- <xsl:copy>
3751
- <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
3752
- </xsl:copy>
3753
- </xsl:template>
3754
-
3755
- <xsl:template match="td | th" mode="determine_cell_widths-if">
3756
- <xsl:copy>
3757
- <xsl:copy-of select="@*"/>
3758
-
3759
- <!-- The maximum width is given by the widest line. -->
3760
- <xsl:attribute name="width_max">
3761
- <xsl:for-each select="p_len">
3762
- <xsl:sort select="." data-type="number" order="descending"/>
3763
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3764
- </xsl:for-each>
3765
- </xsl:attribute>
3766
-
3767
- <!-- The minimum width is given by the widest text element (word, image, etc.) -->
3768
- <xsl:variable name="width_min">
3769
- <xsl:for-each select="word_len">
3770
- <xsl:sort select="." data-type="number" order="descending"/>
3771
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3772
- </xsl:for-each>
3773
- </xsl:variable>
3774
- <xsl:attribute name="width_min">
3775
- <xsl:value-of select="$width_min"/>
3776
- </xsl:attribute>
3777
-
3778
- <xsl:if test="$width_min = 0">
3779
- <xsl:attribute name="width_min">1</xsl:attribute>
3780
- </xsl:if>
3781
-
3782
- <xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
3783
-
3784
- </xsl:copy>
3785
- </xsl:template>
3786
- <!-- ============================= -->
3787
- <!-- END mode: determine_cell_widths-if -->
3788
- <!-- ============================= -->
3789
-
3790
3715
  <!-- ================================================== -->
3791
3716
  <!-- Calculate column's width based on HTML4 algorithm -->
3792
3717
  <!-- ================================================== -->
@@ -3977,6 +3902,7 @@
3977
3902
  <xsl:when test="$table_or_dl = 'table'">
3978
3903
  <xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
3979
3904
  <fo:table-row number-columns-spanned="{$col_count}">
3905
+ <xsl:copy-of select="../@font-weight"/>
3980
3906
  <!-- <test_table><xsl:copy-of select="."/></test_table> -->
3981
3907
  <xsl:call-template name="td"/>
3982
3908
  </fo:table-row>
@@ -4128,7 +4054,7 @@
4128
4054
 
4129
4055
  <xsl:apply-templates/>
4130
4056
 
4131
- <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"/> -->
4057
+ <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"/> -->
4132
4058
 
4133
4059
  </fo:block>
4134
4060
  </fo:table-cell>
@@ -4465,6 +4391,7 @@
4465
4391
  <xsl:template match="*[local-name()='dl']">
4466
4392
  <xsl:variable name="isAdded" select="@added"/>
4467
4393
  <xsl:variable name="isDeleted" select="@deleted"/>
4394
+ <!-- <dl><xsl:copy-of select="."/></dl> -->
4468
4395
  <fo:block-container>
4469
4396
 
4470
4397
  <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
@@ -4998,21 +4925,16 @@
4998
4925
  <!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
4999
4926
  <xsl:template match="*[local-name()='dt']" mode="dl_if">
5000
4927
  <xsl:param name="id"/>
5001
- <xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
5002
4928
  <tr>
5003
4929
  <td>
5004
4930
  <xsl:copy-of select="node()"/>
5005
4931
  </td>
5006
4932
  <td>
5007
-
5008
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
5009
-
5010
- <!-- get paragraphs from nested 'dl' -->
5011
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
5012
-
4933
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
4934
+ <!-- get paragraphs from nested 'dl' -->
4935
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
5013
4936
  </td>
5014
4937
  </tr>
5015
-
5016
4938
  </xsl:template>
5017
4939
  <xsl:template match="*[local-name()='dd']" mode="dl_if"/>
5018
4940
 
@@ -5666,6 +5588,9 @@
5666
5588
  <xsl:variable name="td">
5667
5589
  <xsl:element name="td">
5668
5590
  <xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
5591
+ <xsl:if test="local-name()='th'">
5592
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
5593
+ </xsl:if>
5669
5594
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
5670
5595
  <xsl:apply-templates mode="simple-table-colspan"/>
5671
5596
  </xsl:element>
@@ -5678,6 +5603,9 @@
5678
5603
  <xsl:otherwise>
5679
5604
  <xsl:element name="td">
5680
5605
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
5606
+ <xsl:if test="local-name()='th'">
5607
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
5608
+ </xsl:if>
5681
5609
  <xsl:apply-templates mode="simple-table-colspan"/>
5682
5610
  </xsl:element>
5683
5611
  </xsl:otherwise>
@@ -5807,8 +5735,14 @@
5807
5735
  <xsl:copy-of select="@*"/>
5808
5736
  <xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
5809
5737
  <xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
5738
+ <xsl:variable name="divide">
5739
+ <xsl:choose>
5740
+ <xsl:when test="@divide"><xsl:value-of select="@divide"/></xsl:when>
5741
+ <xsl:otherwise>1</xsl:otherwise>
5742
+ </xsl:choose>
5743
+ </xsl:variable>
5810
5744
  <xsl:attribute name="id">
5811
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
5745
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
5812
5746
  </xsl:attribute>
5813
5747
 
5814
5748
  <xsl:for-each select="*[local-name() = 'p']">
@@ -5816,10 +5750,12 @@
5816
5750
  <xsl:copy-of select="@*"/>
5817
5751
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
5818
5752
  <xsl:attribute name="id">
5819
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
5753
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
5820
5754
  </xsl:attribute>
5821
5755
 
5822
- <xsl:copy-of select="node()"/>
5756
+ <!-- <xsl:copy-of select="node()" /> -->
5757
+ <xsl:apply-templates mode="simple-table-noid"/>
5758
+
5823
5759
  </xsl:copy>
5824
5760
  </xsl:for-each>
5825
5761
 
@@ -5848,7 +5784,7 @@
5848
5784
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
5849
5785
  <xsl:copy>
5850
5786
  <xsl:attribute name="id">
5851
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
5787
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
5852
5788
  </xsl:attribute>
5853
5789
  <xsl:copy-of select="node()"/>
5854
5790
  </xsl:copy>
@@ -5857,6 +5793,24 @@
5857
5793
  </xsl:copy>
5858
5794
 
5859
5795
  </xsl:template>
5796
+
5797
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p']//*" mode="simple-table-noid">
5798
+ <xsl:copy>
5799
+ <xsl:choose>
5800
+ <xsl:when test="$isGenerateTableIF = 'true'">
5801
+ <xsl:copy-of select="@*[local-name() != 'id']"/> <!-- to prevent repeat id in colspan/rowspan cells -->
5802
+ <!-- <xsl:if test="local-name() = 'dl' or local-name() = 'table'">
5803
+ <xsl:copy-of select="@id"/>
5804
+ </xsl:if> -->
5805
+ </xsl:when>
5806
+ <xsl:otherwise>
5807
+ <xsl:copy-of select="@*"/>
5808
+ </xsl:otherwise>
5809
+ </xsl:choose>
5810
+ <xsl:apply-templates select="node()" mode="simple-table-noid"/>
5811
+ </xsl:copy>
5812
+ </xsl:template>
5813
+
5860
5814
  <!-- End mode: simple-table-id -->
5861
5815
  <!-- ===================== -->
5862
5816
  <!-- ===================== -->
@@ -5866,7 +5820,7 @@
5866
5820
  <!-- =============================== -->
5867
5821
  <xsl:template match="@*|node()" mode="td_text_with_formatting">
5868
5822
  <xsl:copy>
5869
- <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
5823
+ <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
5870
5824
  </xsl:copy>
5871
5825
  </xsl:template>
5872
5826
 
@@ -5980,6 +5934,10 @@
5980
5934
 
5981
5935
  <fo:inline xsl:use-attribute-sets="mathml-style">
5982
5936
 
5937
+ <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 -->
5938
+ <!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
5939
+ </xsl:if>
5940
+
5983
5941
  <xsl:call-template name="setTrackChangesStyles">
5984
5942
  <xsl:with-param name="isAdded" select="$isAdded"/>
5985
5943
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
@@ -8001,15 +7959,23 @@
8001
7959
 
8002
7960
  <xsl:template match="*[local-name()='tr']" mode="requirement">
8003
7961
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
8004
- <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
8005
- <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
8006
- </xsl:if>
8007
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
8008
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
8009
- </xsl:if>
8010
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
8011
- <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
7962
+
7963
+ <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 ')">
7964
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
7965
+
7966
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
7967
+ <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
7968
+ <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
7969
+ </xsl:if>
7970
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
7971
+ <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
7972
+ </xsl:if>
7973
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
7974
+ <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
7975
+ </xsl:if>
7976
+
8012
7977
  </xsl:if>
7978
+
8013
7979
  <xsl:apply-templates mode="requirement"/>
8014
7980
  </fo:table-row>
8015
7981
  </xsl:template>
@@ -9512,7 +9478,7 @@
9512
9478
  </tbody>
9513
9479
  </xsl:variable>
9514
9480
  <xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
9515
- <xsl:call-template name="calculate-column-widths">
9481
+ <xsl:call-template name="calculate-column-widths-proportional">
9516
9482
  <xsl:with-param name="cols-count" select="$cols-count"/>
9517
9483
  <xsl:with-param name="table" select="$toc_table_simple"/>
9518
9484
  </xsl:call-template>