metanorma-itu 2.1.6 → 2.1.8.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: 97dad9daf6f13024d9dba015fff377d431e36aca82452b9c5e4677cb2fcbe751
4
- data.tar.gz: 41c5437bac86059e0a9f9a3686172b604b64a10c4c2daeaec4eac121c6f91f14
3
+ metadata.gz: cc3399686f48e214718550368bb135a0bd7610505b58dd718302e6b102f3481f
4
+ data.tar.gz: ef00c2d8b32c81a5dff7b0e064dbfca1a39e5ce231349d58ed1dfff9b9260ec2
5
5
  SHA512:
6
- metadata.gz: 1dce95e28d86855f98ff200c77cbf61e63fc48f63d0f3eadd54290eaf2da4b4f445c4470db071d543a5e704ae65e9ac6435c12588ea9d0f2067d9fcc9b5afe8f
7
- data.tar.gz: b685b13ca5ee5a5d780c2c3a1fc275139d1f1e768ddd0d36e2a818e04871aab76998bcfc7e020769a3e8f8eed7d8a8f5e0685c2d7269aa04bec8e30a915174ad
6
+ metadata.gz: f0b46736932f751c01a8f81752eaec3a1369fef503364745467eb434df221a022697e83b9b5aa4218d66b81f539803fa17d0303331c4241a79591504f3ef6e5c
7
+ data.tar.gz: 731eab3ba5a12e8fac1c0b1d84dcdb7810a92ea450151578c6acf089330b0256951763633c190a64301bbbaa483c993ab6565fc330718f4544f9f06318368f56
@@ -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
 
@@ -2472,6 +2494,9 @@
2472
2494
  <xsl:attribute-set name="import-style">
2473
2495
  </xsl:attribute-set>
2474
2496
 
2497
+ <xsl:attribute-set name="component-style">
2498
+ </xsl:attribute-set>
2499
+
2475
2500
  <xsl:attribute-set name="recommendation-style">
2476
2501
 
2477
2502
  </xsl:attribute-set>
@@ -2660,7 +2685,9 @@
2660
2685
  </xsl:attribute-set>
2661
2686
 
2662
2687
  <xsl:attribute-set name="dt-block-style">
2663
- <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>
2664
2691
 
2665
2692
  </xsl:attribute-set>
2666
2693
 
@@ -3629,6 +3656,7 @@
3629
3656
 
3630
3657
  <xsl:variable name="margin-side">
3631
3658
  <xsl:choose>
3659
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">0</xsl:when>
3632
3660
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
3633
3661
  <xsl:otherwise>0</xsl:otherwise>
3634
3662
  </xsl:choose>
@@ -3699,6 +3727,7 @@
3699
3727
  </td>
3700
3728
  </tr>
3701
3729
  -->
3730
+ <!-- Simple_table=<xsl:copy-of select="$simple-table"/> -->
3702
3731
  <xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
3703
3732
 
3704
3733
  </xsl:when>
@@ -3833,12 +3862,17 @@
3833
3862
  <xsl:template name="calculate-column-widths">
3834
3863
  <xsl:param name="table"/>
3835
3864
  <xsl:param name="cols-count"/>
3836
-
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>
3837
3870
  <xsl:call-template name="calculate-column-widths-proportional">
3838
3871
  <xsl:with-param name="cols-count" select="$cols-count"/>
3839
3872
  <xsl:with-param name="table" select="$table"/>
3840
3873
  </xsl:call-template>
3841
-
3874
+ </xsl:otherwise>
3875
+ </xsl:choose>
3842
3876
  </xsl:template>
3843
3877
 
3844
3878
  <!-- ================================================== -->
@@ -4016,6 +4050,7 @@
4016
4050
  <!-- (https://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2) -->
4017
4051
  <!-- ================================================== -->
4018
4052
 
4053
+ <!-- INPUT: table with columns widths, generated by table_if.xsl -->
4019
4054
  <xsl:template name="calculate-column-widths-autolayout-algorithm">
4020
4055
  <xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
4021
4056
 
@@ -4027,67 +4062,6 @@
4027
4062
 
4028
4063
  <!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
4029
4064
 
4030
- <!-- get current table id -->
4031
- <xsl:variable name="table_id" select="@id"/>
4032
- <!-- find table by id in the file 'table_widths' -->
4033
- <!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
4034
- <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
4035
-
4036
- <!-- table='<xsl:copy-of select="$table"/>' -->
4037
- <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
4038
- <!-- table-if='<xsl:copy-of select="$table-if"/>' -->
4039
- <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
4040
-
4041
- <xsl:variable name="table_with_cell_widths_">
4042
- <xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
4043
- </xsl:variable>
4044
- <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
4045
-
4046
- <!-- <xsl:if test="$table_if_debug = 'true'">
4047
- <xsl:copy-of select="$table_with_cell_widths"/>
4048
- </xsl:if> -->
4049
-
4050
- <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
4051
-
4052
- <xsl:variable name="column_widths_">
4053
- <!-- iteration of columns -->
4054
- <xsl:for-each select="$table_with_cell_widths//tr[1]/td">
4055
- <xsl:variable name="pos" select="position()"/>
4056
- <column>
4057
- <xsl:attribute name="width_max">
4058
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
4059
- <xsl:sort select="." data-type="number" order="descending"/>
4060
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
4061
- </xsl:for-each>
4062
- </xsl:attribute>
4063
- <xsl:attribute name="width_min">
4064
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
4065
- <xsl:sort select="." data-type="number" order="descending"/>
4066
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
4067
- </xsl:for-each>
4068
- </xsl:attribute>
4069
- </column>
4070
- </xsl:for-each>
4071
- </xsl:variable>
4072
- <xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
4073
-
4074
- <!-- <column_widths>
4075
- <xsl:copy-of select="$column_widths"/>
4076
- </column_widths> -->
4077
-
4078
- <!-- These in turn, are used to find the minimum and maximum width for the table. -->
4079
- <xsl:variable name="table_widths_">
4080
- <table>
4081
- <xsl:attribute name="width_max">
4082
- <xsl:value-of select="sum($column_widths/column/@width_max)"/>
4083
- </xsl:attribute>
4084
- <xsl:attribute name="width_min">
4085
- <xsl:value-of select="sum($column_widths/column/@width_min)"/>
4086
- </xsl:attribute>
4087
- </table>
4088
- </xsl:variable>
4089
- <xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
4090
-
4091
4065
  <xsl:variable name="page_width">
4092
4066
  <xsl:choose>
4093
4067
  <xsl:when test="$parent_table_page-width != ''">
@@ -4100,16 +4074,13 @@
4100
4074
  </xsl:variable>
4101
4075
 
4102
4076
  <xsl:if test="$table_if_debug = 'true'">
4103
- <table_width>
4104
- <xsl:copy-of select="$table_widths"/>
4105
- </table_width>
4106
- <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
4077
+ <page_width><xsl:value-of select="$page_width"/></page_width>
4107
4078
  </xsl:if>
4108
4079
 
4109
4080
  <!-- There are three cases: -->
4110
4081
  <xsl:choose>
4111
4082
  <!-- 1. The minimum table width is equal to or wider than the available space -->
4112
- <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 -->
4113
4084
  <!-- call old algorithm -->
4114
4085
  <case1/>
4115
4086
  <!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
@@ -4119,10 +4090,10 @@
4119
4090
  </xsl:call-template> -->
4120
4091
  </xsl:when>
4121
4092
  <!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
4122
- <xsl:when test="$table_widths/table/@width_max &lt;= $page_width">
4093
+ <xsl:when test="@width_max &lt;= $page_width">
4123
4094
  <case2/>
4124
4095
  <autolayout/>
4125
- <xsl:for-each select="$column_widths/column/@width_max">
4096
+ <xsl:for-each select="column/@width_max">
4126
4097
  <column divider="100"><xsl:value-of select="."/></column>
4127
4098
  </xsl:for-each>
4128
4099
  </xsl:when>
@@ -4132,19 +4103,19 @@
4132
4103
  For each column, let d be the difference between maximum and minimum width of that column.
4133
4104
  Now set the column's width to the minimum width plus d times W over D.
4134
4105
  This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
4135
- <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)">
4136
4107
  <!-- difference between the available space and the minimum table width -->
4137
- <xsl:variable name="W" select="$page_width - $table_widths/table/@width_min"/>
4108
+ <xsl:variable name="W" select="$page_width - @width_min"/>
4138
4109
  <W><xsl:value-of select="$W"/></W>
4139
4110
  <!-- difference between maximum and minimum width of the table -->
4140
- <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"/>
4141
4112
  <D><xsl:value-of select="$D"/></D>
4142
4113
  <case3/>
4143
4114
  <autolayout/>
4144
- <xsl:if test="$table_widths/table/@width_min &gt;= $page_width">
4115
+ <xsl:if test="@width_min &gt;= $page_width">
4145
4116
  <split_keep-within-line>true</split_keep-within-line>
4146
4117
  </xsl:if>
4147
- <xsl:for-each select="$column_widths/column">
4118
+ <xsl:for-each select="column">
4148
4119
  <!-- difference between maximum and minimum width of that column. -->
4149
4120
  <xsl:variable name="d" select="@width_max - @width_min"/>
4150
4121
  <d><xsl:value-of select="$d"/></d>
@@ -4170,23 +4141,39 @@
4170
4141
 
4171
4142
  <parent_element><xsl:value-of select="local-name(..)"/></parent_element>
4172
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
+
4173
4150
  <xsl:variable name="parent_table_page-width_">
4174
4151
  <xsl:if test="$parent_table_id != ''">
4175
4152
  <!-- determine column number in the parent table -->
4176
4153
  <xsl:variable name="parent_table_column_number">
4177
4154
  <xsl:choose>
4178
- <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>
4179
4157
  <xsl:otherwise> <!-- parent is table -->
4180
4158
  <xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
4181
4159
  </xsl:otherwise>
4182
4160
  </xsl:choose>
4183
4161
  </xsl:variable>
4184
4162
  <!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
4185
- <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 -->
4186
4171
  </xsl:if>
4187
4172
  </xsl:variable>
4188
4173
  <xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
4189
4174
 
4175
+ <parent_table_page-width><xsl:value-of select="$parent_table_page-width"/></parent_table_page-width>
4176
+
4190
4177
  <!-- get current table id -->
4191
4178
  <xsl:variable name="table_id" select="@id"/>
4192
4179
 
@@ -4207,50 +4194,6 @@
4207
4194
 
4208
4195
  </xsl:template> <!-- get-calculated-column-widths-autolayout-algorithm -->
4209
4196
 
4210
- <!-- ============================= -->
4211
- <!-- mode: determine_cell_widths-if -->
4212
- <!-- ============================= -->
4213
- <xsl:template match="@*|node()" mode="determine_cell_widths-if">
4214
- <xsl:copy>
4215
- <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
4216
- </xsl:copy>
4217
- </xsl:template>
4218
-
4219
- <xsl:template match="td | th" mode="determine_cell_widths-if">
4220
- <xsl:copy>
4221
- <xsl:copy-of select="@*"/>
4222
-
4223
- <!-- The maximum width is given by the widest line. -->
4224
- <xsl:attribute name="width_max">
4225
- <xsl:for-each select="p_len">
4226
- <xsl:sort select="." data-type="number" order="descending"/>
4227
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
4228
- </xsl:for-each>
4229
- </xsl:attribute>
4230
-
4231
- <!-- The minimum width is given by the widest text element (word, image, etc.) -->
4232
- <xsl:variable name="width_min">
4233
- <xsl:for-each select="word_len">
4234
- <xsl:sort select="." data-type="number" order="descending"/>
4235
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
4236
- </xsl:for-each>
4237
- </xsl:variable>
4238
- <xsl:attribute name="width_min">
4239
- <xsl:value-of select="$width_min"/>
4240
- </xsl:attribute>
4241
-
4242
- <xsl:if test="$width_min = 0">
4243
- <xsl:attribute name="width_min">1</xsl:attribute>
4244
- </xsl:if>
4245
-
4246
- <xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
4247
-
4248
- </xsl:copy>
4249
- </xsl:template>
4250
- <!-- ============================= -->
4251
- <!-- END mode: determine_cell_widths-if -->
4252
- <!-- ============================= -->
4253
-
4254
4197
  <!-- ================================================== -->
4255
4198
  <!-- Calculate column's width based on HTML4 algorithm -->
4256
4199
  <!-- ================================================== -->
@@ -4460,6 +4403,7 @@
4460
4403
  <xsl:when test="$table_or_dl = 'table'">
4461
4404
  <xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
4462
4405
  <fo:table-row number-columns-spanned="{$col_count}">
4406
+ <xsl:copy-of select="../@font-weight"/>
4463
4407
  <!-- <test_table><xsl:copy-of select="."/></test_table> -->
4464
4408
  <xsl:call-template name="td"/>
4465
4409
  </fo:table-row>
@@ -4633,7 +4577,7 @@
4633
4577
 
4634
4578
  <xsl:apply-templates/>
4635
4579
 
4636
- <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"/> -->
4637
4581
 
4638
4582
  </fo:block>
4639
4583
  </fo:table-cell>
@@ -4969,6 +4913,7 @@
4969
4913
  <xsl:template match="*[local-name()='dl']">
4970
4914
  <xsl:variable name="isAdded" select="@added"/>
4971
4915
  <xsl:variable name="isDeleted" select="@deleted"/>
4916
+ <!-- <dl><xsl:copy-of select="."/></dl> -->
4972
4917
  <fo:block-container>
4973
4918
 
4974
4919
  <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
@@ -5518,21 +5463,16 @@
5518
5463
  <!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
5519
5464
  <xsl:template match="*[local-name()='dt']" mode="dl_if">
5520
5465
  <xsl:param name="id"/>
5521
- <xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
5522
5466
  <tr>
5523
5467
  <td>
5524
5468
  <xsl:copy-of select="node()"/>
5525
5469
  </td>
5526
5470
  <td>
5527
-
5528
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
5529
-
5530
- <!-- get paragraphs from nested 'dl' -->
5531
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
5532
-
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"/>
5533
5474
  </td>
5534
5475
  </tr>
5535
-
5536
5476
  </xsl:template>
5537
5477
  <xsl:template match="*[local-name()='dd']" mode="dl_if"/>
5538
5478
 
@@ -6183,6 +6123,9 @@
6183
6123
  <xsl:variable name="td">
6184
6124
  <xsl:element name="td">
6185
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>
6186
6129
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
6187
6130
  <xsl:apply-templates mode="simple-table-colspan"/>
6188
6131
  </xsl:element>
@@ -6195,6 +6138,9 @@
6195
6138
  <xsl:otherwise>
6196
6139
  <xsl:element name="td">
6197
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>
6198
6144
  <xsl:apply-templates mode="simple-table-colspan"/>
6199
6145
  </xsl:element>
6200
6146
  </xsl:otherwise>
@@ -6324,8 +6270,14 @@
6324
6270
  <xsl:copy-of select="@*"/>
6325
6271
  <xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
6326
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>
6327
6279
  <xsl:attribute name="id">
6328
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
6280
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
6329
6281
  </xsl:attribute>
6330
6282
 
6331
6283
  <xsl:for-each select="*[local-name() = 'p']">
@@ -6333,10 +6285,12 @@
6333
6285
  <xsl:copy-of select="@*"/>
6334
6286
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
6335
6287
  <xsl:attribute name="id">
6336
- <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)"/>
6337
6289
  </xsl:attribute>
6338
6290
 
6339
- <xsl:copy-of select="node()"/>
6291
+ <!-- <xsl:copy-of select="node()" /> -->
6292
+ <xsl:apply-templates mode="simple-table-noid"/>
6293
+
6340
6294
  </xsl:copy>
6341
6295
  </xsl:for-each>
6342
6296
 
@@ -6365,7 +6319,7 @@
6365
6319
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
6366
6320
  <xsl:copy>
6367
6321
  <xsl:attribute name="id">
6368
- <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)"/>
6369
6323
  </xsl:attribute>
6370
6324
  <xsl:copy-of select="node()"/>
6371
6325
  </xsl:copy>
@@ -6374,6 +6328,24 @@
6374
6328
  </xsl:copy>
6375
6329
 
6376
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
+
6377
6349
  <!-- End mode: simple-table-id -->
6378
6350
  <!-- ===================== -->
6379
6351
  <!-- ===================== -->
@@ -6383,7 +6355,7 @@
6383
6355
  <!-- =============================== -->
6384
6356
  <xsl:template match="@*|node()" mode="td_text_with_formatting">
6385
6357
  <xsl:copy>
6386
- <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
6358
+ <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
6387
6359
  </xsl:copy>
6388
6360
  </xsl:template>
6389
6361
 
@@ -6497,6 +6469,10 @@
6497
6469
 
6498
6470
  <fo:inline xsl:use-attribute-sets="mathml-style">
6499
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
+
6500
6476
  <xsl:call-template name="setTrackChangesStyles">
6501
6477
  <xsl:with-param name="isAdded" select="$isAdded"/>
6502
6478
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
@@ -8381,41 +8357,47 @@
8381
8357
  </fo:block>
8382
8358
  </xsl:template>
8383
8359
 
8384
- <xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
8360
+ <xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit'] | *[local-name() = 'div'][@type = 'requirement-inherit'] | *[local-name() = 'div'][@type = 'recommendation-inherit'] | *[local-name() = 'div'][@type = 'permission-inherit']">
8385
8361
  <fo:block xsl:use-attribute-sets="inherit-style">
8386
8362
  <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
8387
8363
  </fo:block>
8388
8364
  </xsl:template>
8389
8365
 
8390
- <xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
8366
+ <xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description'] | *[local-name() = 'div'][@type = 'requirement-description'] | *[local-name() = 'div'][@type = 'recommendation-description'] | *[local-name() = 'div'][@type = 'permission-description']">
8391
8367
  <fo:block xsl:use-attribute-sets="description-style">
8392
8368
  <xsl:apply-templates/>
8393
8369
  </fo:block>
8394
8370
  </xsl:template>
8395
8371
 
8396
- <xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
8372
+ <xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification'] | *[local-name() = 'div'][@type = 'requirement-specification'] | *[local-name() = 'div'][@type = 'recommendation-specification'] | *[local-name() = 'div'][@type = 'permission-specification']">
8397
8373
  <fo:block xsl:use-attribute-sets="specification-style">
8398
8374
  <xsl:apply-templates/>
8399
8375
  </fo:block>
8400
8376
  </xsl:template>
8401
8377
 
8402
- <xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
8378
+ <xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target'] | *[local-name() = 'div'][@type = 'requirement-measurement-target'] | *[local-name() = 'div'][@type = 'recommendation-measurement-target'] | *[local-name() = 'div'][@type = 'permission-measurement-target']">
8403
8379
  <fo:block xsl:use-attribute-sets="measurement-target-style">
8404
8380
  <xsl:apply-templates/>
8405
8381
  </fo:block>
8406
8382
  </xsl:template>
8407
8383
 
8408
- <xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
8384
+ <xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification'] | *[local-name() = 'div'][@type = 'requirement-verification'] | *[local-name() = 'div'][@type = 'recommendation-verification'] | *[local-name() = 'div'][@type = 'permission-verification']">
8409
8385
  <fo:block xsl:use-attribute-sets="verification-style">
8410
8386
  <xsl:apply-templates/>
8411
8387
  </fo:block>
8412
8388
  </xsl:template>
8413
8389
 
8414
- <xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
8390
+ <xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import'] | *[local-name() = 'div'][@type = 'requirement-import'] | *[local-name() = 'div'][@type = 'recommendation-import'] | *[local-name() = 'div'][@type = 'permission-import']">
8415
8391
  <fo:block xsl:use-attribute-sets="import-style">
8416
8392
  <xsl:apply-templates/>
8417
8393
  </fo:block>
8418
8394
  </xsl:template>
8395
+
8396
+ <xsl:template match="*[local-name() = 'div'][starts-with(@type, 'requirement-component')] | *[local-name() = 'div'][starts-with(@type, 'recommendation-component')] | *[local-name() = 'div'][starts-with(@type, 'permission-component')]">
8397
+ <fo:block xsl:use-attribute-sets="component-style">
8398
+ <xsl:apply-templates/>
8399
+ </fo:block>
8400
+ </xsl:template>
8419
8401
  <!-- ========== -->
8420
8402
  <!-- END -->
8421
8403
  <!-- ========== -->
@@ -8471,15 +8453,12 @@
8471
8453
 
8472
8454
  <xsl:template match="*[local-name()='tr']" mode="requirement">
8473
8455
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
8474
- <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
8475
- <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
8476
- </xsl:if>
8477
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
8478
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
8479
- </xsl:if>
8480
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
8481
- <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
+
8482
8460
  </xsl:if>
8461
+
8483
8462
  <xsl:apply-templates mode="requirement"/>
8484
8463
  </fo:table-row>
8485
8464
  </xsl:template>
@@ -10001,7 +9980,7 @@
10001
9980
  </tbody>
10002
9981
  </xsl:variable>
10003
9982
  <xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
10004
- <xsl:call-template name="calculate-column-widths">
9983
+ <xsl:call-template name="calculate-column-widths-proportional">
10005
9984
  <xsl:with-param name="cols-count" select="$cols-count"/>
10006
9985
  <xsl:with-param name="table" select="$toc_table_simple"/>
10007
9986
  </xsl:call-template>