metanorma-un 0.9.7 → 0.9.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: 29292d69fa96f3e607e00ff39abf3787ce5f27d5bdb65141b8030acbc01f7b9e
4
- data.tar.gz: 8cea34c39e5970e4f03f8cae444170a7ae249ad01fffae7a798648524df70e99
3
+ metadata.gz: e0ae564e3f603f4faa74044e2a42834d8d15a65806ff966eab37fa7770e9b1b7
4
+ data.tar.gz: bac395b53dadcb245c2e84829e15786c7daad9cf8ad04e8b61e428d56f06c8dc
5
5
  SHA512:
6
- metadata.gz: e93209ba3a682e76208c79a94f93f7ec6f8e8076013ed81f60a22dc35110ed9c1cc62a6527f8b728ef139536b161df6aed667847eff02a045949d066239f7c96
7
- data.tar.gz: a7b55069b5727c72ac572ea4a17606b816e5f8fb5d8f6dd070c75ac2abf92c2e743d2e7f8a59617c28edd3d5951b971228b1f0d9669cf9f4293e88ed05ecb9e9
6
+ metadata.gz: 6ddb21f1c554708486a8bbd25672609c966fd319ec3c673855ca53091e5b8a9d3672239875b825bb9bff5af01fe6fe4c98d50efbd6c6eee4ae544625ee37cd08
7
+ data.tar.gz: 13c7a17aeb5d7d57747c8ba650a6201461124b2a7f54d500c9326771a0d16c1eb88bc21afe78d1f29598992883b204cf1ce6734fbb76fc09d02b196f134eb1b7
@@ -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
+
@@ -91,7 +91,7 @@
91
91
  <div class="info-section">
92
92
  <div class="copyright">
93
93
  <p class="year">
94
- &copy; {{ docyear }} United Nations.
94
+ &#xa9; {{ docyear }} United Nations.
95
95
  </p>
96
96
 
97
97
  <div class="message">
@@ -80,7 +80,7 @@
80
80
  <div class="info-section">
81
81
  <div class="copyright">
82
82
  <p class="year">
83
- &copy; {{ docyear }} United Nations.
83
+ &#xa9; {{ docyear }} United Nations.
84
84
  </p>
85
85
 
86
86
  <div class="message">
@@ -774,8 +774,18 @@
774
774
 
775
775
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
776
776
 
777
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">
778
+ true
779
+ </xsl:variable>
780
+ <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
781
+
777
782
  <xsl:variable name="isGenerateTableIF_">
778
- false
783
+ <xsl:choose>
784
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
785
+ <xsl:value-of select="normalize-space($table_if) = 'true'"/>
786
+ </xsl:when>
787
+ <xsl:otherwise>false</xsl:otherwise>
788
+ </xsl:choose>
779
789
  </xsl:variable>
780
790
  <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
781
791
 
@@ -1391,7 +1401,7 @@
1391
1401
  </xsl:attribute-set>
1392
1402
 
1393
1403
  <xsl:attribute-set name="dt-block-style">
1394
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
1404
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
1395
1405
 
1396
1406
  </xsl:attribute-set>
1397
1407
 
@@ -2335,6 +2345,7 @@
2335
2345
 
2336
2346
  <xsl:variable name="margin-side">
2337
2347
  <xsl:choose>
2348
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">0</xsl:when>
2338
2349
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
2339
2350
  <xsl:otherwise>0</xsl:otherwise>
2340
2351
  </xsl:choose>
@@ -2408,6 +2419,7 @@
2408
2419
  </td>
2409
2420
  </tr>
2410
2421
  -->
2422
+ <!-- Simple_table=<xsl:copy-of select="$simple-table"/> -->
2411
2423
  <xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
2412
2424
 
2413
2425
  </xsl:when>
@@ -2539,12 +2551,17 @@
2539
2551
  <xsl:template name="calculate-column-widths">
2540
2552
  <xsl:param name="table"/>
2541
2553
  <xsl:param name="cols-count"/>
2542
-
2554
+ <xsl:choose>
2555
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
2556
+ <xsl:call-template name="get-calculated-column-widths-autolayout-algorithm"/>
2557
+ </xsl:when>
2558
+ <xsl:otherwise>
2543
2559
  <xsl:call-template name="calculate-column-widths-proportional">
2544
2560
  <xsl:with-param name="cols-count" select="$cols-count"/>
2545
2561
  <xsl:with-param name="table" select="$table"/>
2546
2562
  </xsl:call-template>
2547
-
2563
+ </xsl:otherwise>
2564
+ </xsl:choose>
2548
2565
  </xsl:template>
2549
2566
 
2550
2567
  <!-- ================================================== -->
@@ -2722,6 +2739,7 @@
2722
2739
  <!-- (https://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2) -->
2723
2740
  <!-- ================================================== -->
2724
2741
 
2742
+ <!-- INPUT: table with columns widths, generated by table_if.xsl -->
2725
2743
  <xsl:template name="calculate-column-widths-autolayout-algorithm">
2726
2744
  <xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
2727
2745
 
@@ -2733,67 +2751,6 @@
2733
2751
 
2734
2752
  <!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
2735
2753
 
2736
- <!-- get current table id -->
2737
- <xsl:variable name="table_id" select="@id"/>
2738
- <!-- find table by id in the file 'table_widths' -->
2739
- <!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
2740
- <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
2741
-
2742
- <!-- table='<xsl:copy-of select="$table"/>' -->
2743
- <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
2744
- <!-- table-if='<xsl:copy-of select="$table-if"/>' -->
2745
- <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
2746
-
2747
- <xsl:variable name="table_with_cell_widths_">
2748
- <xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
2749
- </xsl:variable>
2750
- <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
2751
-
2752
- <!-- <xsl:if test="$table_if_debug = 'true'">
2753
- <xsl:copy-of select="$table_with_cell_widths"/>
2754
- </xsl:if> -->
2755
-
2756
- <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
2757
-
2758
- <xsl:variable name="column_widths_">
2759
- <!-- iteration of columns -->
2760
- <xsl:for-each select="$table_with_cell_widths//tr[1]/td">
2761
- <xsl:variable name="pos" select="position()"/>
2762
- <column>
2763
- <xsl:attribute name="width_max">
2764
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
2765
- <xsl:sort select="." data-type="number" order="descending"/>
2766
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
2767
- </xsl:for-each>
2768
- </xsl:attribute>
2769
- <xsl:attribute name="width_min">
2770
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
2771
- <xsl:sort select="." data-type="number" order="descending"/>
2772
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
2773
- </xsl:for-each>
2774
- </xsl:attribute>
2775
- </column>
2776
- </xsl:for-each>
2777
- </xsl:variable>
2778
- <xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
2779
-
2780
- <!-- <column_widths>
2781
- <xsl:copy-of select="$column_widths"/>
2782
- </column_widths> -->
2783
-
2784
- <!-- These in turn, are used to find the minimum and maximum width for the table. -->
2785
- <xsl:variable name="table_widths_">
2786
- <table>
2787
- <xsl:attribute name="width_max">
2788
- <xsl:value-of select="sum($column_widths/column/@width_max)"/>
2789
- </xsl:attribute>
2790
- <xsl:attribute name="width_min">
2791
- <xsl:value-of select="sum($column_widths/column/@width_min)"/>
2792
- </xsl:attribute>
2793
- </table>
2794
- </xsl:variable>
2795
- <xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
2796
-
2797
2754
  <xsl:variable name="page_width">
2798
2755
  <xsl:choose>
2799
2756
  <xsl:when test="$parent_table_page-width != ''">
@@ -2806,16 +2763,13 @@
2806
2763
  </xsl:variable>
2807
2764
 
2808
2765
  <xsl:if test="$table_if_debug = 'true'">
2809
- <table_width>
2810
- <xsl:copy-of select="$table_widths"/>
2811
- </table_width>
2812
- <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
2766
+ <page_width><xsl:value-of select="$page_width"/></page_width>
2813
2767
  </xsl:if>
2814
2768
 
2815
2769
  <!-- There are three cases: -->
2816
2770
  <xsl:choose>
2817
2771
  <!-- 1. The minimum table width is equal to or wider than the available space -->
2818
- <xsl:when test="$table_widths/table/@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
2772
+ <xsl:when test="@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
2819
2773
  <!-- call old algorithm -->
2820
2774
  <case1/>
2821
2775
  <!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
@@ -2825,10 +2779,10 @@
2825
2779
  </xsl:call-template> -->
2826
2780
  </xsl:when>
2827
2781
  <!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
2828
- <xsl:when test="$table_widths/table/@width_max &lt;= $page_width">
2782
+ <xsl:when test="@width_max &lt;= $page_width">
2829
2783
  <case2/>
2830
2784
  <autolayout/>
2831
- <xsl:for-each select="$column_widths/column/@width_max">
2785
+ <xsl:for-each select="column/@width_max">
2832
2786
  <column divider="100"><xsl:value-of select="."/></column>
2833
2787
  </xsl:for-each>
2834
2788
  </xsl:when>
@@ -2838,19 +2792,19 @@
2838
2792
  For each column, let d be the difference between maximum and minimum width of that column.
2839
2793
  Now set the column's width to the minimum width plus d times W over D.
2840
2794
  This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
2841
- <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)">
2795
+ <xsl:when test="(@width_max &gt; $page_width and @width_min &lt; $page_width) or (@width_min &gt;= $page_width)">
2842
2796
  <!-- difference between the available space and the minimum table width -->
2843
- <xsl:variable name="W" select="$page_width - $table_widths/table/@width_min"/>
2797
+ <xsl:variable name="W" select="$page_width - @width_min"/>
2844
2798
  <W><xsl:value-of select="$W"/></W>
2845
2799
  <!-- difference between maximum and minimum width of the table -->
2846
- <xsl:variable name="D" select="$table_widths/table/@width_max - $table_widths/table/@width_min"/>
2800
+ <xsl:variable name="D" select="@width_max - @width_min"/>
2847
2801
  <D><xsl:value-of select="$D"/></D>
2848
2802
  <case3/>
2849
2803
  <autolayout/>
2850
- <xsl:if test="$table_widths/table/@width_min &gt;= $page_width">
2804
+ <xsl:if test="@width_min &gt;= $page_width">
2851
2805
  <split_keep-within-line>true</split_keep-within-line>
2852
2806
  </xsl:if>
2853
- <xsl:for-each select="$column_widths/column">
2807
+ <xsl:for-each select="column">
2854
2808
  <!-- difference between maximum and minimum width of that column. -->
2855
2809
  <xsl:variable name="d" select="@width_max - @width_min"/>
2856
2810
  <d><xsl:value-of select="$d"/></d>
@@ -2876,23 +2830,39 @@
2876
2830
 
2877
2831
  <parent_element><xsl:value-of select="local-name(..)"/></parent_element>
2878
2832
 
2833
+ <ancestor_tree>
2834
+ <xsl:for-each select="ancestor::*">
2835
+ <ancestor><xsl:value-of select="local-name()"/></ancestor>
2836
+ </xsl:for-each>
2837
+ </ancestor_tree>
2838
+
2879
2839
  <xsl:variable name="parent_table_page-width_">
2880
2840
  <xsl:if test="$parent_table_id != ''">
2881
2841
  <!-- determine column number in the parent table -->
2882
2842
  <xsl:variable name="parent_table_column_number">
2883
2843
  <xsl:choose>
2884
- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
2844
+ <!-- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when> -->
2845
+ <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>
2885
2846
  <xsl:otherwise> <!-- parent is table -->
2886
2847
  <xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
2887
2848
  </xsl:otherwise>
2888
2849
  </xsl:choose>
2889
2850
  </xsl:variable>
2890
2851
  <!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
2891
- <xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
2852
+
2853
+ <xsl:variable name="parent_table_column_" select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
2854
+ <xsl:variable name="parent_table_column" select="xalan:nodeset($parent_table_column_)"/>
2855
+ <!-- <xsl:variable name="divider">
2856
+ <xsl:value-of select="$parent_table_column/@divider"/>
2857
+ <xsl:if test="not($parent_table_column/@divider)">1</xsl:if>
2858
+ </xsl:variable> -->
2859
+ <xsl:value-of select="$parent_table_column/text()"/> <!-- * 10 -->
2892
2860
  </xsl:if>
2893
2861
  </xsl:variable>
2894
2862
  <xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
2895
2863
 
2864
+ <parent_table_page-width><xsl:value-of select="$parent_table_page-width"/></parent_table_page-width>
2865
+
2896
2866
  <!-- get current table id -->
2897
2867
  <xsl:variable name="table_id" select="@id"/>
2898
2868
 
@@ -2913,50 +2883,6 @@
2913
2883
 
2914
2884
  </xsl:template> <!-- get-calculated-column-widths-autolayout-algorithm -->
2915
2885
 
2916
- <!-- ============================= -->
2917
- <!-- mode: determine_cell_widths-if -->
2918
- <!-- ============================= -->
2919
- <xsl:template match="@*|node()" mode="determine_cell_widths-if">
2920
- <xsl:copy>
2921
- <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
2922
- </xsl:copy>
2923
- </xsl:template>
2924
-
2925
- <xsl:template match="td | th" mode="determine_cell_widths-if">
2926
- <xsl:copy>
2927
- <xsl:copy-of select="@*"/>
2928
-
2929
- <!-- The maximum width is given by the widest line. -->
2930
- <xsl:attribute name="width_max">
2931
- <xsl:for-each select="p_len">
2932
- <xsl:sort select="." data-type="number" order="descending"/>
2933
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
2934
- </xsl:for-each>
2935
- </xsl:attribute>
2936
-
2937
- <!-- The minimum width is given by the widest text element (word, image, etc.) -->
2938
- <xsl:variable name="width_min">
2939
- <xsl:for-each select="word_len">
2940
- <xsl:sort select="." data-type="number" order="descending"/>
2941
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
2942
- </xsl:for-each>
2943
- </xsl:variable>
2944
- <xsl:attribute name="width_min">
2945
- <xsl:value-of select="$width_min"/>
2946
- </xsl:attribute>
2947
-
2948
- <xsl:if test="$width_min = 0">
2949
- <xsl:attribute name="width_min">1</xsl:attribute>
2950
- </xsl:if>
2951
-
2952
- <xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
2953
-
2954
- </xsl:copy>
2955
- </xsl:template>
2956
- <!-- ============================= -->
2957
- <!-- END mode: determine_cell_widths-if -->
2958
- <!-- ============================= -->
2959
-
2960
2886
  <!-- ================================================== -->
2961
2887
  <!-- Calculate column's width based on HTML4 algorithm -->
2962
2888
  <!-- ================================================== -->
@@ -3147,6 +3073,7 @@
3147
3073
  <xsl:when test="$table_or_dl = 'table'">
3148
3074
  <xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
3149
3075
  <fo:table-row number-columns-spanned="{$col_count}">
3076
+ <xsl:copy-of select="../@font-weight"/>
3150
3077
  <!-- <test_table><xsl:copy-of select="."/></test_table> -->
3151
3078
  <xsl:call-template name="td"/>
3152
3079
  </fo:table-row>
@@ -3297,7 +3224,7 @@
3297
3224
 
3298
3225
  <xsl:apply-templates/>
3299
3226
 
3300
- <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"/> -->
3227
+ <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"/> -->
3301
3228
 
3302
3229
  </fo:block>
3303
3230
  </fo:table-cell>
@@ -3627,6 +3554,7 @@
3627
3554
  <xsl:template match="*[local-name()='dl']">
3628
3555
  <xsl:variable name="isAdded" select="@added"/>
3629
3556
  <xsl:variable name="isDeleted" select="@deleted"/>
3557
+ <!-- <dl><xsl:copy-of select="."/></dl> -->
3630
3558
  <fo:block-container>
3631
3559
 
3632
3560
  <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
@@ -4160,21 +4088,16 @@
4160
4088
  <!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
4161
4089
  <xsl:template match="*[local-name()='dt']" mode="dl_if">
4162
4090
  <xsl:param name="id"/>
4163
- <xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
4164
4091
  <tr>
4165
4092
  <td>
4166
4093
  <xsl:copy-of select="node()"/>
4167
4094
  </td>
4168
4095
  <td>
4169
-
4170
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
4171
-
4172
- <!-- get paragraphs from nested 'dl' -->
4173
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
4174
-
4096
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
4097
+ <!-- get paragraphs from nested 'dl' -->
4098
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
4175
4099
  </td>
4176
4100
  </tr>
4177
-
4178
4101
  </xsl:template>
4179
4102
  <xsl:template match="*[local-name()='dd']" mode="dl_if"/>
4180
4103
 
@@ -4825,6 +4748,9 @@
4825
4748
  <xsl:variable name="td">
4826
4749
  <xsl:element name="td">
4827
4750
  <xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
4751
+ <xsl:if test="local-name()='th'">
4752
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4753
+ </xsl:if>
4828
4754
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
4829
4755
  <xsl:apply-templates mode="simple-table-colspan"/>
4830
4756
  </xsl:element>
@@ -4837,6 +4763,9 @@
4837
4763
  <xsl:otherwise>
4838
4764
  <xsl:element name="td">
4839
4765
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
4766
+ <xsl:if test="local-name()='th'">
4767
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4768
+ </xsl:if>
4840
4769
  <xsl:apply-templates mode="simple-table-colspan"/>
4841
4770
  </xsl:element>
4842
4771
  </xsl:otherwise>
@@ -4966,8 +4895,14 @@
4966
4895
  <xsl:copy-of select="@*"/>
4967
4896
  <xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
4968
4897
  <xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
4898
+ <xsl:variable name="divide">
4899
+ <xsl:choose>
4900
+ <xsl:when test="@divide"><xsl:value-of select="@divide"/></xsl:when>
4901
+ <xsl:otherwise>1</xsl:otherwise>
4902
+ </xsl:choose>
4903
+ </xsl:variable>
4969
4904
  <xsl:attribute name="id">
4970
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
4905
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
4971
4906
  </xsl:attribute>
4972
4907
 
4973
4908
  <xsl:for-each select="*[local-name() = 'p']">
@@ -4975,10 +4910,12 @@
4975
4910
  <xsl:copy-of select="@*"/>
4976
4911
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
4977
4912
  <xsl:attribute name="id">
4978
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
4913
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
4979
4914
  </xsl:attribute>
4980
4915
 
4981
- <xsl:copy-of select="node()"/>
4916
+ <!-- <xsl:copy-of select="node()" /> -->
4917
+ <xsl:apply-templates mode="simple-table-noid"/>
4918
+
4982
4919
  </xsl:copy>
4983
4920
  </xsl:for-each>
4984
4921
 
@@ -5007,7 +4944,7 @@
5007
4944
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
5008
4945
  <xsl:copy>
5009
4946
  <xsl:attribute name="id">
5010
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
4947
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
5011
4948
  </xsl:attribute>
5012
4949
  <xsl:copy-of select="node()"/>
5013
4950
  </xsl:copy>
@@ -5016,6 +4953,24 @@
5016
4953
  </xsl:copy>
5017
4954
 
5018
4955
  </xsl:template>
4956
+
4957
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p']//*" mode="simple-table-noid">
4958
+ <xsl:copy>
4959
+ <xsl:choose>
4960
+ <xsl:when test="$isGenerateTableIF = 'true'">
4961
+ <xsl:copy-of select="@*[local-name() != 'id']"/> <!-- to prevent repeat id in colspan/rowspan cells -->
4962
+ <!-- <xsl:if test="local-name() = 'dl' or local-name() = 'table'">
4963
+ <xsl:copy-of select="@id"/>
4964
+ </xsl:if> -->
4965
+ </xsl:when>
4966
+ <xsl:otherwise>
4967
+ <xsl:copy-of select="@*"/>
4968
+ </xsl:otherwise>
4969
+ </xsl:choose>
4970
+ <xsl:apply-templates select="node()" mode="simple-table-noid"/>
4971
+ </xsl:copy>
4972
+ </xsl:template>
4973
+
5019
4974
  <!-- End mode: simple-table-id -->
5020
4975
  <!-- ===================== -->
5021
4976
  <!-- ===================== -->
@@ -5025,7 +4980,7 @@
5025
4980
  <!-- =============================== -->
5026
4981
  <xsl:template match="@*|node()" mode="td_text_with_formatting">
5027
4982
  <xsl:copy>
5028
- <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
4983
+ <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
5029
4984
  </xsl:copy>
5030
4985
  </xsl:template>
5031
4986
 
@@ -5139,6 +5094,10 @@
5139
5094
 
5140
5095
  <fo:inline xsl:use-attribute-sets="mathml-style">
5141
5096
 
5097
+ <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 -->
5098
+ <!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
5099
+ </xsl:if>
5100
+
5142
5101
  <xsl:call-template name="setTrackChangesStyles">
5143
5102
  <xsl:with-param name="isAdded" select="$isAdded"/>
5144
5103
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
@@ -7128,15 +7087,12 @@
7128
7087
 
7129
7088
  <xsl:template match="*[local-name()='tr']" mode="requirement">
7130
7089
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
7131
- <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
7132
- <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
7133
- </xsl:if>
7134
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
7135
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
7136
- </xsl:if>
7137
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
7138
- <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
7090
+
7091
+ <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 ')">
7092
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
7093
+
7139
7094
  </xsl:if>
7095
+
7140
7096
  <xsl:apply-templates mode="requirement"/>
7141
7097
  </fo:table-row>
7142
7098
  </xsl:template>
@@ -8614,7 +8570,7 @@
8614
8570
  </tbody>
8615
8571
  </xsl:variable>
8616
8572
  <xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
8617
- <xsl:call-template name="calculate-column-widths">
8573
+ <xsl:call-template name="calculate-column-widths-proportional">
8618
8574
  <xsl:with-param name="cols-count" select="$cols-count"/>
8619
8575
  <xsl:with-param name="table" select="$toc_table_simple"/>
8620
8576
  </xsl:call-template>