metanorma-itu 2.1.7 → 2.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 832bd24769ff2d7dd5198f17d9ca253956ca8ad5cd8910ed2b8ae50f70b3d31e
4
- data.tar.gz: 0fcc8da6ca3c528299d3398b75a82e609f43a34c17433a214f58679f6731a247
3
+ metadata.gz: 06cc25df293386857bc3dbd56099b8a6d49a9b127930663a8be41b6adef7cfed
4
+ data.tar.gz: 15a2e93bcda942bb9d8437d1eaf02f4c49f24a689a86f9b3ad3bcc20cddee3cf
5
5
  SHA512:
6
- metadata.gz: 59ad2edd160f124b6b9e6819157d704b5ef0516f74463c3ca56295b7050d344ef5072ea6d63ec9f6b563d0e2fa4e192f6122d9795fbdb8ade280a09c3518b7a4
7
- data.tar.gz: 929ad93dd821801a65f85fb9288bb99b1aa0aa18f4647e65b368e2c2fd297a1580a71c9e82fd89e13470dd6844dcf1bc870dc40ea6a5fd7200624da14b988870
6
+ metadata.gz: 3d4c6089e9f9c104ad5110cd161490a994942930e555bc53734c5b8ab03d4a3c7a5eef1766c51839087a01c01db4b90084f92667673b0240997818d3ec684e2e
7
+ data.tar.gz: 3024821f8158b6a5bfffa3c3c1f0b11f84e12761540200d6b5ef29d5e9a0c4f33842867ff131c75319030a23063cc7291b2c09eadc89902aca857a168b3cbcbd
@@ -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
+
@@ -68,7 +68,7 @@
68
68
  {% endif %}
69
69
  {% if series1 %}
70
70
  <span class="doc-subSeries">
71
- {{ series1 }} {% if series2 %}&mdash; {{ series2 }}{% endif %}
71
+ {{ series1 }} {% if series2 %}&#x2014; {{ series2 }}{% endif %}
72
72
  </span>
73
73
  {% endif %}
74
74
  {% if meeting %}
@@ -1599,7 +1599,10 @@
1599
1599
  </xsl:if>
1600
1600
  <xsl:if test="following-sibling::itu:definition/node()">
1601
1601
  <xsl:text>: </xsl:text>
1602
- <xsl:apply-templates select="following-sibling::itu:definition/node()" mode="process"/>
1602
+ <!-- <xsl:apply-templates select="following-sibling::itu:definition/node()" mode="process"/> -->
1603
+ <xsl:apply-templates select="following-sibling::itu:definition">
1604
+ <xsl:with-param name="process">true</xsl:with-param>
1605
+ </xsl:apply-templates>
1603
1606
  </xsl:if>
1604
1607
  </fo:block>
1605
1608
  <!-- <xsl:if test="following-sibling::itu:table">
@@ -1609,10 +1612,18 @@
1609
1612
 
1610
1613
  <xsl:template match="itu:term[itu:preferred]/itu:termsource" priority="2"/>
1611
1614
 
1612
- <xsl:template match="itu:definition/itu:p" priority="2"/>
1613
- <xsl:template match="itu:definition/itu:formula" priority="2"/>
1615
+ <xsl:template match="itu:term[itu:preferred]/itu:definition" priority="2">
1616
+ <xsl:param name="process">false</xsl:param>
1617
+ <xsl:if test="$process = 'true'">
1618
+ <xsl:apply-templates/>
1619
+ </xsl:if>
1620
+ </xsl:template>
1621
+
1622
+ <!-- <xsl:template match="itu:definition/itu:p" priority="2"/>
1623
+ <xsl:template match="itu:definition/itu:formula" priority="2"/> -->
1614
1624
 
1615
- <xsl:template match="itu:definition/itu:p" mode="process" priority="2">
1625
+ <!-- <xsl:template match="itu:definition/itu:p" mode="process" priority="2"> -->
1626
+ <xsl:template match="itu:definition/itu:p" priority="2">
1616
1627
  <xsl:choose>
1617
1628
  <xsl:when test="position() = 1">
1618
1629
  <fo:inline>
@@ -1627,9 +1638,9 @@
1627
1638
  </xsl:choose>
1628
1639
  </xsl:template>
1629
1640
 
1630
- <xsl:template match="itu:definition/*" mode="process">
1641
+ <!-- <xsl:template match="itu:definition/*" mode="process">
1631
1642
  <xsl:apply-templates select="."/>
1632
- </xsl:template>
1643
+ </xsl:template> -->
1633
1644
 
1634
1645
  <!-- footnotes for title -->
1635
1646
  <xsl:template match="itu:bibdata/itu:note[@type = 'title-footnote']" mode="title_footnote">
@@ -1655,6 +1666,7 @@
1655
1666
  <xsl:template match="*[local-name()='tt']" priority="2">
1656
1667
  <xsl:variable name="element-name">
1657
1668
  <xsl:choose>
1669
+ <xsl:when test="$isGenerateTableIF = 'true'">fo:inline</xsl:when>
1658
1670
  <xsl:when test="ancestor::itu:dd">fo:inline</xsl:when>
1659
1671
  <xsl:when test="ancestor::itu:title">fo:inline</xsl:when>
1660
1672
  <xsl:when test="normalize-space(ancestor::itu:p[1]//text()[not(parent::itu:tt)]) != ''">fo:inline</xsl:when>
@@ -1664,7 +1676,7 @@
1664
1676
  <xsl:element name="{$element-name}">
1665
1677
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1666
1678
  <xsl:attribute name="font-size">10pt</xsl:attribute>
1667
- <xsl:if test="local-name(..) != 'dt' and not(ancestor::itu:dd) and not(ancestor::itu:title)">
1679
+ <xsl:if test="local-name(..) != 'dt' and not(ancestor::itu:dd) and not(ancestor::itu:title) and $isGenerateTableIF = 'false'">
1668
1680
  <xsl:attribute name="text-align">center</xsl:attribute>
1669
1681
  </xsl:if>
1670
1682
  <xsl:if test="ancestor::itu:title">
@@ -2056,8 +2068,18 @@
2056
2068
 
2057
2069
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
2058
2070
 
2071
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">
2072
+ true
2073
+ </xsl:variable>
2074
+ <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
2075
+
2059
2076
  <xsl:variable name="isGenerateTableIF_">
2060
- false
2077
+ <xsl:choose>
2078
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
2079
+ <xsl:value-of select="normalize-space($table_if) = 'true'"/>
2080
+ </xsl:when>
2081
+ <xsl:otherwise>false</xsl:otherwise>
2082
+ </xsl:choose>
2061
2083
  </xsl:variable>
2062
2084
  <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
2063
2085
 
@@ -2663,7 +2685,9 @@
2663
2685
  </xsl:attribute-set>
2664
2686
 
2665
2687
  <xsl:attribute-set name="dt-block-style">
2666
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
2688
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
2689
+
2690
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
2667
2691
 
2668
2692
  </xsl:attribute-set>
2669
2693
 
@@ -3632,6 +3656,7 @@
3632
3656
 
3633
3657
  <xsl:variable name="margin-side">
3634
3658
  <xsl:choose>
3659
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">0</xsl:when>
3635
3660
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
3636
3661
  <xsl:otherwise>0</xsl:otherwise>
3637
3662
  </xsl:choose>
@@ -3702,6 +3727,7 @@
3702
3727
  </td>
3703
3728
  </tr>
3704
3729
  -->
3730
+ <!-- Simple_table=<xsl:copy-of select="$simple-table"/> -->
3705
3731
  <xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
3706
3732
 
3707
3733
  </xsl:when>
@@ -3836,12 +3862,17 @@
3836
3862
  <xsl:template name="calculate-column-widths">
3837
3863
  <xsl:param name="table"/>
3838
3864
  <xsl:param name="cols-count"/>
3839
-
3865
+ <xsl:choose>
3866
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
3867
+ <xsl:call-template name="get-calculated-column-widths-autolayout-algorithm"/>
3868
+ </xsl:when>
3869
+ <xsl:otherwise>
3840
3870
  <xsl:call-template name="calculate-column-widths-proportional">
3841
3871
  <xsl:with-param name="cols-count" select="$cols-count"/>
3842
3872
  <xsl:with-param name="table" select="$table"/>
3843
3873
  </xsl:call-template>
3844
-
3874
+ </xsl:otherwise>
3875
+ </xsl:choose>
3845
3876
  </xsl:template>
3846
3877
 
3847
3878
  <!-- ================================================== -->
@@ -4019,6 +4050,7 @@
4019
4050
  <!-- (https://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2) -->
4020
4051
  <!-- ================================================== -->
4021
4052
 
4053
+ <!-- INPUT: table with columns widths, generated by table_if.xsl -->
4022
4054
  <xsl:template name="calculate-column-widths-autolayout-algorithm">
4023
4055
  <xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
4024
4056
 
@@ -4030,67 +4062,6 @@
4030
4062
 
4031
4063
  <!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
4032
4064
 
4033
- <!-- get current table id -->
4034
- <xsl:variable name="table_id" select="@id"/>
4035
- <!-- find table by id in the file 'table_widths' -->
4036
- <!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
4037
- <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
4038
-
4039
- <!-- table='<xsl:copy-of select="$table"/>' -->
4040
- <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
4041
- <!-- table-if='<xsl:copy-of select="$table-if"/>' -->
4042
- <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
4043
-
4044
- <xsl:variable name="table_with_cell_widths_">
4045
- <xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
4046
- </xsl:variable>
4047
- <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
4048
-
4049
- <!-- <xsl:if test="$table_if_debug = 'true'">
4050
- <xsl:copy-of select="$table_with_cell_widths"/>
4051
- </xsl:if> -->
4052
-
4053
- <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
4054
-
4055
- <xsl:variable name="column_widths_">
4056
- <!-- iteration of columns -->
4057
- <xsl:for-each select="$table_with_cell_widths//tr[1]/td">
4058
- <xsl:variable name="pos" select="position()"/>
4059
- <column>
4060
- <xsl:attribute name="width_max">
4061
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
4062
- <xsl:sort select="." data-type="number" order="descending"/>
4063
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
4064
- </xsl:for-each>
4065
- </xsl:attribute>
4066
- <xsl:attribute name="width_min">
4067
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
4068
- <xsl:sort select="." data-type="number" order="descending"/>
4069
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
4070
- </xsl:for-each>
4071
- </xsl:attribute>
4072
- </column>
4073
- </xsl:for-each>
4074
- </xsl:variable>
4075
- <xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
4076
-
4077
- <!-- <column_widths>
4078
- <xsl:copy-of select="$column_widths"/>
4079
- </column_widths> -->
4080
-
4081
- <!-- These in turn, are used to find the minimum and maximum width for the table. -->
4082
- <xsl:variable name="table_widths_">
4083
- <table>
4084
- <xsl:attribute name="width_max">
4085
- <xsl:value-of select="sum($column_widths/column/@width_max)"/>
4086
- </xsl:attribute>
4087
- <xsl:attribute name="width_min">
4088
- <xsl:value-of select="sum($column_widths/column/@width_min)"/>
4089
- </xsl:attribute>
4090
- </table>
4091
- </xsl:variable>
4092
- <xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
4093
-
4094
4065
  <xsl:variable name="page_width">
4095
4066
  <xsl:choose>
4096
4067
  <xsl:when test="$parent_table_page-width != ''">
@@ -4103,16 +4074,13 @@
4103
4074
  </xsl:variable>
4104
4075
 
4105
4076
  <xsl:if test="$table_if_debug = 'true'">
4106
- <table_width>
4107
- <xsl:copy-of select="$table_widths"/>
4108
- </table_width>
4109
- <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
4077
+ <page_width><xsl:value-of select="$page_width"/></page_width>
4110
4078
  </xsl:if>
4111
4079
 
4112
4080
  <!-- There are three cases: -->
4113
4081
  <xsl:choose>
4114
4082
  <!-- 1. The minimum table width is equal to or wider than the available space -->
4115
- <xsl:when test="$table_widths/table/@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
4083
+ <xsl:when test="@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
4116
4084
  <!-- call old algorithm -->
4117
4085
  <case1/>
4118
4086
  <!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
@@ -4122,10 +4090,10 @@
4122
4090
  </xsl:call-template> -->
4123
4091
  </xsl:when>
4124
4092
  <!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
4125
- <xsl:when test="$table_widths/table/@width_max &lt;= $page_width">
4093
+ <xsl:when test="@width_max &lt;= $page_width">
4126
4094
  <case2/>
4127
4095
  <autolayout/>
4128
- <xsl:for-each select="$column_widths/column/@width_max">
4096
+ <xsl:for-each select="column/@width_max">
4129
4097
  <column divider="100"><xsl:value-of select="."/></column>
4130
4098
  </xsl:for-each>
4131
4099
  </xsl:when>
@@ -4135,19 +4103,19 @@
4135
4103
  For each column, let d be the difference between maximum and minimum width of that column.
4136
4104
  Now set the column's width to the minimum width plus d times W over D.
4137
4105
  This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
4138
- <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)">
4106
+ <xsl:when test="(@width_max &gt; $page_width and @width_min &lt; $page_width) or (@width_min &gt;= $page_width)">
4139
4107
  <!-- difference between the available space and the minimum table width -->
4140
- <xsl:variable name="W" select="$page_width - $table_widths/table/@width_min"/>
4108
+ <xsl:variable name="W" select="$page_width - @width_min"/>
4141
4109
  <W><xsl:value-of select="$W"/></W>
4142
4110
  <!-- difference between maximum and minimum width of the table -->
4143
- <xsl:variable name="D" select="$table_widths/table/@width_max - $table_widths/table/@width_min"/>
4111
+ <xsl:variable name="D" select="@width_max - @width_min"/>
4144
4112
  <D><xsl:value-of select="$D"/></D>
4145
4113
  <case3/>
4146
4114
  <autolayout/>
4147
- <xsl:if test="$table_widths/table/@width_min &gt;= $page_width">
4115
+ <xsl:if test="@width_min &gt;= $page_width">
4148
4116
  <split_keep-within-line>true</split_keep-within-line>
4149
4117
  </xsl:if>
4150
- <xsl:for-each select="$column_widths/column">
4118
+ <xsl:for-each select="column">
4151
4119
  <!-- difference between maximum and minimum width of that column. -->
4152
4120
  <xsl:variable name="d" select="@width_max - @width_min"/>
4153
4121
  <d><xsl:value-of select="$d"/></d>
@@ -4173,23 +4141,39 @@
4173
4141
 
4174
4142
  <parent_element><xsl:value-of select="local-name(..)"/></parent_element>
4175
4143
 
4144
+ <ancestor_tree>
4145
+ <xsl:for-each select="ancestor::*">
4146
+ <ancestor><xsl:value-of select="local-name()"/></ancestor>
4147
+ </xsl:for-each>
4148
+ </ancestor_tree>
4149
+
4176
4150
  <xsl:variable name="parent_table_page-width_">
4177
4151
  <xsl:if test="$parent_table_id != ''">
4178
4152
  <!-- determine column number in the parent table -->
4179
4153
  <xsl:variable name="parent_table_column_number">
4180
4154
  <xsl:choose>
4181
- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
4155
+ <!-- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when> -->
4156
+ <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>
4182
4157
  <xsl:otherwise> <!-- parent is table -->
4183
4158
  <xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
4184
4159
  </xsl:otherwise>
4185
4160
  </xsl:choose>
4186
4161
  </xsl:variable>
4187
4162
  <!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
4188
- <xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
4163
+
4164
+ <xsl:variable name="parent_table_column_" select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
4165
+ <xsl:variable name="parent_table_column" select="xalan:nodeset($parent_table_column_)"/>
4166
+ <!-- <xsl:variable name="divider">
4167
+ <xsl:value-of select="$parent_table_column/@divider"/>
4168
+ <xsl:if test="not($parent_table_column/@divider)">1</xsl:if>
4169
+ </xsl:variable> -->
4170
+ <xsl:value-of select="$parent_table_column/text()"/> <!-- * 10 -->
4189
4171
  </xsl:if>
4190
4172
  </xsl:variable>
4191
4173
  <xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
4192
4174
 
4175
+ <parent_table_page-width><xsl:value-of select="$parent_table_page-width"/></parent_table_page-width>
4176
+
4193
4177
  <!-- get current table id -->
4194
4178
  <xsl:variable name="table_id" select="@id"/>
4195
4179
 
@@ -4210,50 +4194,6 @@
4210
4194
 
4211
4195
  </xsl:template> <!-- get-calculated-column-widths-autolayout-algorithm -->
4212
4196
 
4213
- <!-- ============================= -->
4214
- <!-- mode: determine_cell_widths-if -->
4215
- <!-- ============================= -->
4216
- <xsl:template match="@*|node()" mode="determine_cell_widths-if">
4217
- <xsl:copy>
4218
- <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
4219
- </xsl:copy>
4220
- </xsl:template>
4221
-
4222
- <xsl:template match="td | th" mode="determine_cell_widths-if">
4223
- <xsl:copy>
4224
- <xsl:copy-of select="@*"/>
4225
-
4226
- <!-- The maximum width is given by the widest line. -->
4227
- <xsl:attribute name="width_max">
4228
- <xsl:for-each select="p_len">
4229
- <xsl:sort select="." data-type="number" order="descending"/>
4230
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
4231
- </xsl:for-each>
4232
- </xsl:attribute>
4233
-
4234
- <!-- The minimum width is given by the widest text element (word, image, etc.) -->
4235
- <xsl:variable name="width_min">
4236
- <xsl:for-each select="word_len">
4237
- <xsl:sort select="." data-type="number" order="descending"/>
4238
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
4239
- </xsl:for-each>
4240
- </xsl:variable>
4241
- <xsl:attribute name="width_min">
4242
- <xsl:value-of select="$width_min"/>
4243
- </xsl:attribute>
4244
-
4245
- <xsl:if test="$width_min = 0">
4246
- <xsl:attribute name="width_min">1</xsl:attribute>
4247
- </xsl:if>
4248
-
4249
- <xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
4250
-
4251
- </xsl:copy>
4252
- </xsl:template>
4253
- <!-- ============================= -->
4254
- <!-- END mode: determine_cell_widths-if -->
4255
- <!-- ============================= -->
4256
-
4257
4197
  <!-- ================================================== -->
4258
4198
  <!-- Calculate column's width based on HTML4 algorithm -->
4259
4199
  <!-- ================================================== -->
@@ -4463,6 +4403,7 @@
4463
4403
  <xsl:when test="$table_or_dl = 'table'">
4464
4404
  <xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
4465
4405
  <fo:table-row number-columns-spanned="{$col_count}">
4406
+ <xsl:copy-of select="../@font-weight"/>
4466
4407
  <!-- <test_table><xsl:copy-of select="."/></test_table> -->
4467
4408
  <xsl:call-template name="td"/>
4468
4409
  </fo:table-row>
@@ -4636,7 +4577,7 @@
4636
4577
 
4637
4578
  <xsl:apply-templates/>
4638
4579
 
4639
- <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"/> -->
4580
+ <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"/> -->
4640
4581
 
4641
4582
  </fo:block>
4642
4583
  </fo:table-cell>
@@ -4972,6 +4913,7 @@
4972
4913
  <xsl:template match="*[local-name()='dl']">
4973
4914
  <xsl:variable name="isAdded" select="@added"/>
4974
4915
  <xsl:variable name="isDeleted" select="@deleted"/>
4916
+ <!-- <dl><xsl:copy-of select="."/></dl> -->
4975
4917
  <fo:block-container>
4976
4918
 
4977
4919
  <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
@@ -5521,21 +5463,16 @@
5521
5463
  <!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
5522
5464
  <xsl:template match="*[local-name()='dt']" mode="dl_if">
5523
5465
  <xsl:param name="id"/>
5524
- <xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
5525
5466
  <tr>
5526
5467
  <td>
5527
5468
  <xsl:copy-of select="node()"/>
5528
5469
  </td>
5529
5470
  <td>
5530
-
5531
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
5532
-
5533
- <!-- get paragraphs from nested 'dl' -->
5534
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
5535
-
5471
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
5472
+ <!-- get paragraphs from nested 'dl' -->
5473
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
5536
5474
  </td>
5537
5475
  </tr>
5538
-
5539
5476
  </xsl:template>
5540
5477
  <xsl:template match="*[local-name()='dd']" mode="dl_if"/>
5541
5478
 
@@ -6186,6 +6123,9 @@
6186
6123
  <xsl:variable name="td">
6187
6124
  <xsl:element name="td">
6188
6125
  <xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
6126
+ <xsl:if test="local-name()='th'">
6127
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6128
+ </xsl:if>
6189
6129
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
6190
6130
  <xsl:apply-templates mode="simple-table-colspan"/>
6191
6131
  </xsl:element>
@@ -6198,6 +6138,9 @@
6198
6138
  <xsl:otherwise>
6199
6139
  <xsl:element name="td">
6200
6140
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
6141
+ <xsl:if test="local-name()='th'">
6142
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6143
+ </xsl:if>
6201
6144
  <xsl:apply-templates mode="simple-table-colspan"/>
6202
6145
  </xsl:element>
6203
6146
  </xsl:otherwise>
@@ -6327,8 +6270,14 @@
6327
6270
  <xsl:copy-of select="@*"/>
6328
6271
  <xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
6329
6272
  <xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
6273
+ <xsl:variable name="divide">
6274
+ <xsl:choose>
6275
+ <xsl:when test="@divide"><xsl:value-of select="@divide"/></xsl:when>
6276
+ <xsl:otherwise>1</xsl:otherwise>
6277
+ </xsl:choose>
6278
+ </xsl:variable>
6330
6279
  <xsl:attribute name="id">
6331
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
6280
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
6332
6281
  </xsl:attribute>
6333
6282
 
6334
6283
  <xsl:for-each select="*[local-name() = 'p']">
@@ -6336,10 +6285,12 @@
6336
6285
  <xsl:copy-of select="@*"/>
6337
6286
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
6338
6287
  <xsl:attribute name="id">
6339
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
6288
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
6340
6289
  </xsl:attribute>
6341
6290
 
6342
- <xsl:copy-of select="node()"/>
6291
+ <!-- <xsl:copy-of select="node()" /> -->
6292
+ <xsl:apply-templates mode="simple-table-noid"/>
6293
+
6343
6294
  </xsl:copy>
6344
6295
  </xsl:for-each>
6345
6296
 
@@ -6368,7 +6319,7 @@
6368
6319
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
6369
6320
  <xsl:copy>
6370
6321
  <xsl:attribute name="id">
6371
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
6322
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
6372
6323
  </xsl:attribute>
6373
6324
  <xsl:copy-of select="node()"/>
6374
6325
  </xsl:copy>
@@ -6377,6 +6328,24 @@
6377
6328
  </xsl:copy>
6378
6329
 
6379
6330
  </xsl:template>
6331
+
6332
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p']//*" mode="simple-table-noid">
6333
+ <xsl:copy>
6334
+ <xsl:choose>
6335
+ <xsl:when test="$isGenerateTableIF = 'true'">
6336
+ <xsl:copy-of select="@*[local-name() != 'id']"/> <!-- to prevent repeat id in colspan/rowspan cells -->
6337
+ <!-- <xsl:if test="local-name() = 'dl' or local-name() = 'table'">
6338
+ <xsl:copy-of select="@id"/>
6339
+ </xsl:if> -->
6340
+ </xsl:when>
6341
+ <xsl:otherwise>
6342
+ <xsl:copy-of select="@*"/>
6343
+ </xsl:otherwise>
6344
+ </xsl:choose>
6345
+ <xsl:apply-templates select="node()" mode="simple-table-noid"/>
6346
+ </xsl:copy>
6347
+ </xsl:template>
6348
+
6380
6349
  <!-- End mode: simple-table-id -->
6381
6350
  <!-- ===================== -->
6382
6351
  <!-- ===================== -->
@@ -6386,7 +6355,7 @@
6386
6355
  <!-- =============================== -->
6387
6356
  <xsl:template match="@*|node()" mode="td_text_with_formatting">
6388
6357
  <xsl:copy>
6389
- <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
6358
+ <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
6390
6359
  </xsl:copy>
6391
6360
  </xsl:template>
6392
6361
 
@@ -6500,6 +6469,10 @@
6500
6469
 
6501
6470
  <fo:inline xsl:use-attribute-sets="mathml-style">
6502
6471
 
6472
+ <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 -->
6473
+ <!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
6474
+ </xsl:if>
6475
+
6503
6476
  <xsl:call-template name="setTrackChangesStyles">
6504
6477
  <xsl:with-param name="isAdded" select="$isAdded"/>
6505
6478
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
@@ -8480,15 +8453,12 @@
8480
8453
 
8481
8454
  <xsl:template match="*[local-name()='tr']" mode="requirement">
8482
8455
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
8483
- <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
8484
- <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
8485
- </xsl:if>
8486
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
8487
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
8488
- </xsl:if>
8489
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
8490
- <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
8456
+
8457
+ <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 ')">
8458
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
8459
+
8491
8460
  </xsl:if>
8461
+
8492
8462
  <xsl:apply-templates mode="requirement"/>
8493
8463
  </fo:table-row>
8494
8464
  </xsl:template>
@@ -10010,7 +9980,7 @@
10010
9980
  </tbody>
10011
9981
  </xsl:variable>
10012
9982
  <xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
10013
- <xsl:call-template name="calculate-column-widths">
9983
+ <xsl:call-template name="calculate-column-widths-proportional">
10014
9984
  <xsl:with-param name="cols-count" select="$cols-count"/>
10015
9985
  <xsl:with-param name="table" select="$toc_table_simple"/>
10016
9986
  </xsl:call-template>