metanorma-m3aawg 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: c0620cdfbacc7ea4f843d6ffe268294b19d4fbc1e921e1ef81c184179b15e62a
4
- data.tar.gz: 536e34a6324a2a8642658fc416a372704744059b8b2e5182edf9f5f4f980ce0a
3
+ metadata.gz: e2f1a62b0aec0cdc45192bc463609681e558434c21cdb6efd85c49dd43ad2c33
4
+ data.tar.gz: 8d8276c4993447085ee923cbfcea22289c81674344075afea0eed819b9836005
5
5
  SHA512:
6
- metadata.gz: 2eb6c8b36ad2a9ac3b4f0eddfc9481ecd2c5ff02c0acc64a8d9c78952e1db989648a5063c9dc48e0d8f3163588cc6c7cea53e7fca3401a7c8100d995f756c1a6
7
- data.tar.gz: eaa162deba516bbfad812e406dff21b222d4b9531c315c5c422785773e01f5ec0f8ddf45c90d46a1caf2c1a1d917dbdb0fbe37f1e7d6f12696514bbcb929a659
6
+ metadata.gz: b8ddda824e38ab0650c5ec31c4f01caceb5f16e4d811956a69afdec968b010cbded99e7b699509d3683c0d608fa46f9a0aef0ca236738793f7080b4f73ced082
7
+ data.tar.gz: 4affbd460cf4649b900ef71ea11b7f68169282e3003be9aea1f23ee577b6739c31d5d3f4b5eae333502a461e66a200002e791d6b5b2e3429e150fb1e7621077d
@@ -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
+
@@ -673,8 +673,18 @@
673
673
 
674
674
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
675
675
 
676
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">
677
+ true
678
+ </xsl:variable>
679
+ <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
680
+
676
681
  <xsl:variable name="isGenerateTableIF_">
677
- false
682
+ <xsl:choose>
683
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
684
+ <xsl:value-of select="normalize-space($table_if) = 'true'"/>
685
+ </xsl:when>
686
+ <xsl:otherwise>false</xsl:otherwise>
687
+ </xsl:choose>
678
688
  </xsl:variable>
679
689
  <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
680
690
 
@@ -1272,7 +1282,7 @@
1272
1282
  </xsl:attribute-set>
1273
1283
 
1274
1284
  <xsl:attribute-set name="dt-block-style">
1275
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
1285
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
1276
1286
 
1277
1287
  </xsl:attribute-set>
1278
1288
 
@@ -2232,6 +2242,7 @@
2232
2242
 
2233
2243
  <xsl:variable name="margin-side">
2234
2244
  <xsl:choose>
2245
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">0</xsl:when>
2235
2246
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
2236
2247
  <xsl:otherwise>0</xsl:otherwise>
2237
2248
  </xsl:choose>
@@ -2300,6 +2311,7 @@
2300
2311
  </td>
2301
2312
  </tr>
2302
2313
  -->
2314
+ <!-- Simple_table=<xsl:copy-of select="$simple-table"/> -->
2303
2315
  <xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
2304
2316
 
2305
2317
  </xsl:when>
@@ -2434,12 +2446,17 @@
2434
2446
  <xsl:template name="calculate-column-widths">
2435
2447
  <xsl:param name="table"/>
2436
2448
  <xsl:param name="cols-count"/>
2437
-
2449
+ <xsl:choose>
2450
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
2451
+ <xsl:call-template name="get-calculated-column-widths-autolayout-algorithm"/>
2452
+ </xsl:when>
2453
+ <xsl:otherwise>
2438
2454
  <xsl:call-template name="calculate-column-widths-proportional">
2439
2455
  <xsl:with-param name="cols-count" select="$cols-count"/>
2440
2456
  <xsl:with-param name="table" select="$table"/>
2441
2457
  </xsl:call-template>
2442
-
2458
+ </xsl:otherwise>
2459
+ </xsl:choose>
2443
2460
  </xsl:template>
2444
2461
 
2445
2462
  <!-- ================================================== -->
@@ -2617,6 +2634,7 @@
2617
2634
  <!-- (https://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2) -->
2618
2635
  <!-- ================================================== -->
2619
2636
 
2637
+ <!-- INPUT: table with columns widths, generated by table_if.xsl -->
2620
2638
  <xsl:template name="calculate-column-widths-autolayout-algorithm">
2621
2639
  <xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
2622
2640
 
@@ -2628,67 +2646,6 @@
2628
2646
 
2629
2647
  <!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
2630
2648
 
2631
- <!-- get current table id -->
2632
- <xsl:variable name="table_id" select="@id"/>
2633
- <!-- find table by id in the file 'table_widths' -->
2634
- <!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
2635
- <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
2636
-
2637
- <!-- table='<xsl:copy-of select="$table"/>' -->
2638
- <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
2639
- <!-- table-if='<xsl:copy-of select="$table-if"/>' -->
2640
- <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
2641
-
2642
- <xsl:variable name="table_with_cell_widths_">
2643
- <xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
2644
- </xsl:variable>
2645
- <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
2646
-
2647
- <!-- <xsl:if test="$table_if_debug = 'true'">
2648
- <xsl:copy-of select="$table_with_cell_widths"/>
2649
- </xsl:if> -->
2650
-
2651
- <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
2652
-
2653
- <xsl:variable name="column_widths_">
2654
- <!-- iteration of columns -->
2655
- <xsl:for-each select="$table_with_cell_widths//tr[1]/td">
2656
- <xsl:variable name="pos" select="position()"/>
2657
- <column>
2658
- <xsl:attribute name="width_max">
2659
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
2660
- <xsl:sort select="." data-type="number" order="descending"/>
2661
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
2662
- </xsl:for-each>
2663
- </xsl:attribute>
2664
- <xsl:attribute name="width_min">
2665
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
2666
- <xsl:sort select="." data-type="number" order="descending"/>
2667
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
2668
- </xsl:for-each>
2669
- </xsl:attribute>
2670
- </column>
2671
- </xsl:for-each>
2672
- </xsl:variable>
2673
- <xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
2674
-
2675
- <!-- <column_widths>
2676
- <xsl:copy-of select="$column_widths"/>
2677
- </column_widths> -->
2678
-
2679
- <!-- These in turn, are used to find the minimum and maximum width for the table. -->
2680
- <xsl:variable name="table_widths_">
2681
- <table>
2682
- <xsl:attribute name="width_max">
2683
- <xsl:value-of select="sum($column_widths/column/@width_max)"/>
2684
- </xsl:attribute>
2685
- <xsl:attribute name="width_min">
2686
- <xsl:value-of select="sum($column_widths/column/@width_min)"/>
2687
- </xsl:attribute>
2688
- </table>
2689
- </xsl:variable>
2690
- <xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
2691
-
2692
2649
  <xsl:variable name="page_width">
2693
2650
  <xsl:choose>
2694
2651
  <xsl:when test="$parent_table_page-width != ''">
@@ -2701,16 +2658,13 @@
2701
2658
  </xsl:variable>
2702
2659
 
2703
2660
  <xsl:if test="$table_if_debug = 'true'">
2704
- <table_width>
2705
- <xsl:copy-of select="$table_widths"/>
2706
- </table_width>
2707
- <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
2661
+ <page_width><xsl:value-of select="$page_width"/></page_width>
2708
2662
  </xsl:if>
2709
2663
 
2710
2664
  <!-- There are three cases: -->
2711
2665
  <xsl:choose>
2712
2666
  <!-- 1. The minimum table width is equal to or wider than the available space -->
2713
- <xsl:when test="$table_widths/table/@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
2667
+ <xsl:when test="@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
2714
2668
  <!-- call old algorithm -->
2715
2669
  <case1/>
2716
2670
  <!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
@@ -2720,10 +2674,10 @@
2720
2674
  </xsl:call-template> -->
2721
2675
  </xsl:when>
2722
2676
  <!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
2723
- <xsl:when test="$table_widths/table/@width_max &lt;= $page_width">
2677
+ <xsl:when test="@width_max &lt;= $page_width">
2724
2678
  <case2/>
2725
2679
  <autolayout/>
2726
- <xsl:for-each select="$column_widths/column/@width_max">
2680
+ <xsl:for-each select="column/@width_max">
2727
2681
  <column divider="100"><xsl:value-of select="."/></column>
2728
2682
  </xsl:for-each>
2729
2683
  </xsl:when>
@@ -2733,19 +2687,19 @@
2733
2687
  For each column, let d be the difference between maximum and minimum width of that column.
2734
2688
  Now set the column's width to the minimum width plus d times W over D.
2735
2689
  This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
2736
- <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)">
2690
+ <xsl:when test="(@width_max &gt; $page_width and @width_min &lt; $page_width) or (@width_min &gt;= $page_width)">
2737
2691
  <!-- difference between the available space and the minimum table width -->
2738
- <xsl:variable name="W" select="$page_width - $table_widths/table/@width_min"/>
2692
+ <xsl:variable name="W" select="$page_width - @width_min"/>
2739
2693
  <W><xsl:value-of select="$W"/></W>
2740
2694
  <!-- difference between maximum and minimum width of the table -->
2741
- <xsl:variable name="D" select="$table_widths/table/@width_max - $table_widths/table/@width_min"/>
2695
+ <xsl:variable name="D" select="@width_max - @width_min"/>
2742
2696
  <D><xsl:value-of select="$D"/></D>
2743
2697
  <case3/>
2744
2698
  <autolayout/>
2745
- <xsl:if test="$table_widths/table/@width_min &gt;= $page_width">
2699
+ <xsl:if test="@width_min &gt;= $page_width">
2746
2700
  <split_keep-within-line>true</split_keep-within-line>
2747
2701
  </xsl:if>
2748
- <xsl:for-each select="$column_widths/column">
2702
+ <xsl:for-each select="column">
2749
2703
  <!-- difference between maximum and minimum width of that column. -->
2750
2704
  <xsl:variable name="d" select="@width_max - @width_min"/>
2751
2705
  <d><xsl:value-of select="$d"/></d>
@@ -2771,23 +2725,39 @@
2771
2725
 
2772
2726
  <parent_element><xsl:value-of select="local-name(..)"/></parent_element>
2773
2727
 
2728
+ <ancestor_tree>
2729
+ <xsl:for-each select="ancestor::*">
2730
+ <ancestor><xsl:value-of select="local-name()"/></ancestor>
2731
+ </xsl:for-each>
2732
+ </ancestor_tree>
2733
+
2774
2734
  <xsl:variable name="parent_table_page-width_">
2775
2735
  <xsl:if test="$parent_table_id != ''">
2776
2736
  <!-- determine column number in the parent table -->
2777
2737
  <xsl:variable name="parent_table_column_number">
2778
2738
  <xsl:choose>
2779
- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
2739
+ <!-- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when> -->
2740
+ <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>
2780
2741
  <xsl:otherwise> <!-- parent is table -->
2781
2742
  <xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
2782
2743
  </xsl:otherwise>
2783
2744
  </xsl:choose>
2784
2745
  </xsl:variable>
2785
2746
  <!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
2786
- <xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
2747
+
2748
+ <xsl:variable name="parent_table_column_" select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
2749
+ <xsl:variable name="parent_table_column" select="xalan:nodeset($parent_table_column_)"/>
2750
+ <!-- <xsl:variable name="divider">
2751
+ <xsl:value-of select="$parent_table_column/@divider"/>
2752
+ <xsl:if test="not($parent_table_column/@divider)">1</xsl:if>
2753
+ </xsl:variable> -->
2754
+ <xsl:value-of select="$parent_table_column/text()"/> <!-- * 10 -->
2787
2755
  </xsl:if>
2788
2756
  </xsl:variable>
2789
2757
  <xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
2790
2758
 
2759
+ <parent_table_page-width><xsl:value-of select="$parent_table_page-width"/></parent_table_page-width>
2760
+
2791
2761
  <!-- get current table id -->
2792
2762
  <xsl:variable name="table_id" select="@id"/>
2793
2763
 
@@ -2808,50 +2778,6 @@
2808
2778
 
2809
2779
  </xsl:template> <!-- get-calculated-column-widths-autolayout-algorithm -->
2810
2780
 
2811
- <!-- ============================= -->
2812
- <!-- mode: determine_cell_widths-if -->
2813
- <!-- ============================= -->
2814
- <xsl:template match="@*|node()" mode="determine_cell_widths-if">
2815
- <xsl:copy>
2816
- <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
2817
- </xsl:copy>
2818
- </xsl:template>
2819
-
2820
- <xsl:template match="td | th" mode="determine_cell_widths-if">
2821
- <xsl:copy>
2822
- <xsl:copy-of select="@*"/>
2823
-
2824
- <!-- The maximum width is given by the widest line. -->
2825
- <xsl:attribute name="width_max">
2826
- <xsl:for-each select="p_len">
2827
- <xsl:sort select="." data-type="number" order="descending"/>
2828
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
2829
- </xsl:for-each>
2830
- </xsl:attribute>
2831
-
2832
- <!-- The minimum width is given by the widest text element (word, image, etc.) -->
2833
- <xsl:variable name="width_min">
2834
- <xsl:for-each select="word_len">
2835
- <xsl:sort select="." data-type="number" order="descending"/>
2836
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
2837
- </xsl:for-each>
2838
- </xsl:variable>
2839
- <xsl:attribute name="width_min">
2840
- <xsl:value-of select="$width_min"/>
2841
- </xsl:attribute>
2842
-
2843
- <xsl:if test="$width_min = 0">
2844
- <xsl:attribute name="width_min">1</xsl:attribute>
2845
- </xsl:if>
2846
-
2847
- <xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
2848
-
2849
- </xsl:copy>
2850
- </xsl:template>
2851
- <!-- ============================= -->
2852
- <!-- END mode: determine_cell_widths-if -->
2853
- <!-- ============================= -->
2854
-
2855
2781
  <!-- ================================================== -->
2856
2782
  <!-- Calculate column's width based on HTML4 algorithm -->
2857
2783
  <!-- ================================================== -->
@@ -3042,6 +2968,7 @@
3042
2968
  <xsl:when test="$table_or_dl = 'table'">
3043
2969
  <xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
3044
2970
  <fo:table-row number-columns-spanned="{$col_count}">
2971
+ <xsl:copy-of select="../@font-weight"/>
3045
2972
  <!-- <test_table><xsl:copy-of select="."/></test_table> -->
3046
2973
  <xsl:call-template name="td"/>
3047
2974
  </fo:table-row>
@@ -3188,7 +3115,7 @@
3188
3115
 
3189
3116
  <xsl:apply-templates/>
3190
3117
 
3191
- <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"/> -->
3118
+ <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"/> -->
3192
3119
 
3193
3120
  </fo:block>
3194
3121
  </fo:table-cell>
@@ -3514,6 +3441,7 @@
3514
3441
  <xsl:template match="*[local-name()='dl']">
3515
3442
  <xsl:variable name="isAdded" select="@added"/>
3516
3443
  <xsl:variable name="isDeleted" select="@deleted"/>
3444
+ <!-- <dl><xsl:copy-of select="."/></dl> -->
3517
3445
  <fo:block-container>
3518
3446
 
3519
3447
  <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
@@ -4047,21 +3975,16 @@
4047
3975
  <!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
4048
3976
  <xsl:template match="*[local-name()='dt']" mode="dl_if">
4049
3977
  <xsl:param name="id"/>
4050
- <xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
4051
3978
  <tr>
4052
3979
  <td>
4053
3980
  <xsl:copy-of select="node()"/>
4054
3981
  </td>
4055
3982
  <td>
4056
-
4057
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
4058
-
4059
- <!-- get paragraphs from nested 'dl' -->
4060
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
4061
-
3983
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
3984
+ <!-- get paragraphs from nested 'dl' -->
3985
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
4062
3986
  </td>
4063
3987
  </tr>
4064
-
4065
3988
  </xsl:template>
4066
3989
  <xsl:template match="*[local-name()='dd']" mode="dl_if"/>
4067
3990
 
@@ -4717,6 +4640,9 @@
4717
4640
  <xsl:variable name="td">
4718
4641
  <xsl:element name="td">
4719
4642
  <xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
4643
+ <xsl:if test="local-name()='th'">
4644
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4645
+ </xsl:if>
4720
4646
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
4721
4647
  <xsl:apply-templates mode="simple-table-colspan"/>
4722
4648
  </xsl:element>
@@ -4729,6 +4655,9 @@
4729
4655
  <xsl:otherwise>
4730
4656
  <xsl:element name="td">
4731
4657
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
4658
+ <xsl:if test="local-name()='th'">
4659
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4660
+ </xsl:if>
4732
4661
  <xsl:apply-templates mode="simple-table-colspan"/>
4733
4662
  </xsl:element>
4734
4663
  </xsl:otherwise>
@@ -4858,8 +4787,14 @@
4858
4787
  <xsl:copy-of select="@*"/>
4859
4788
  <xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
4860
4789
  <xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
4790
+ <xsl:variable name="divide">
4791
+ <xsl:choose>
4792
+ <xsl:when test="@divide"><xsl:value-of select="@divide"/></xsl:when>
4793
+ <xsl:otherwise>1</xsl:otherwise>
4794
+ </xsl:choose>
4795
+ </xsl:variable>
4861
4796
  <xsl:attribute name="id">
4862
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
4797
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
4863
4798
  </xsl:attribute>
4864
4799
 
4865
4800
  <xsl:for-each select="*[local-name() = 'p']">
@@ -4867,10 +4802,12 @@
4867
4802
  <xsl:copy-of select="@*"/>
4868
4803
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
4869
4804
  <xsl:attribute name="id">
4870
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
4805
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
4871
4806
  </xsl:attribute>
4872
4807
 
4873
- <xsl:copy-of select="node()"/>
4808
+ <!-- <xsl:copy-of select="node()" /> -->
4809
+ <xsl:apply-templates mode="simple-table-noid"/>
4810
+
4874
4811
  </xsl:copy>
4875
4812
  </xsl:for-each>
4876
4813
 
@@ -4899,7 +4836,7 @@
4899
4836
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
4900
4837
  <xsl:copy>
4901
4838
  <xsl:attribute name="id">
4902
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
4839
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
4903
4840
  </xsl:attribute>
4904
4841
  <xsl:copy-of select="node()"/>
4905
4842
  </xsl:copy>
@@ -4908,6 +4845,24 @@
4908
4845
  </xsl:copy>
4909
4846
 
4910
4847
  </xsl:template>
4848
+
4849
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p']//*" mode="simple-table-noid">
4850
+ <xsl:copy>
4851
+ <xsl:choose>
4852
+ <xsl:when test="$isGenerateTableIF = 'true'">
4853
+ <xsl:copy-of select="@*[local-name() != 'id']"/> <!-- to prevent repeat id in colspan/rowspan cells -->
4854
+ <!-- <xsl:if test="local-name() = 'dl' or local-name() = 'table'">
4855
+ <xsl:copy-of select="@id"/>
4856
+ </xsl:if> -->
4857
+ </xsl:when>
4858
+ <xsl:otherwise>
4859
+ <xsl:copy-of select="@*"/>
4860
+ </xsl:otherwise>
4861
+ </xsl:choose>
4862
+ <xsl:apply-templates select="node()" mode="simple-table-noid"/>
4863
+ </xsl:copy>
4864
+ </xsl:template>
4865
+
4911
4866
  <!-- End mode: simple-table-id -->
4912
4867
  <!-- ===================== -->
4913
4868
  <!-- ===================== -->
@@ -4917,7 +4872,7 @@
4917
4872
  <!-- =============================== -->
4918
4873
  <xsl:template match="@*|node()" mode="td_text_with_formatting">
4919
4874
  <xsl:copy>
4920
- <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
4875
+ <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
4921
4876
  </xsl:copy>
4922
4877
  </xsl:template>
4923
4878
 
@@ -5031,6 +4986,10 @@
5031
4986
 
5032
4987
  <fo:inline xsl:use-attribute-sets="mathml-style">
5033
4988
 
4989
+ <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 -->
4990
+ <!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
4991
+ </xsl:if>
4992
+
5034
4993
  <xsl:call-template name="setTrackChangesStyles">
5035
4994
  <xsl:with-param name="isAdded" select="$isAdded"/>
5036
4995
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
@@ -7007,15 +6966,12 @@
7007
6966
 
7008
6967
  <xsl:template match="*[local-name()='tr']" mode="requirement">
7009
6968
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
7010
- <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
7011
- <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
7012
- </xsl:if>
7013
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
7014
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
7015
- </xsl:if>
7016
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
7017
- <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
6969
+
6970
+ <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 ')">
6971
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6972
+
7018
6973
  </xsl:if>
6974
+
7019
6975
  <xsl:apply-templates mode="requirement"/>
7020
6976
  </fo:table-row>
7021
6977
  </xsl:template>
@@ -8539,7 +8495,7 @@
8539
8495
  </tbody>
8540
8496
  </xsl:variable>
8541
8497
  <xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
8542
- <xsl:call-template name="calculate-column-widths">
8498
+ <xsl:call-template name="calculate-column-widths-proportional">
8543
8499
  <xsl:with-param name="cols-count" select="$cols-count"/>
8544
8500
  <xsl:with-param name="table" select="$toc_table_simple"/>
8545
8501
  </xsl:call-template>