metanorma-bipm 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: 2eaa8cfc70d8183ce34fdef96cb8ff4e75d414d9c7934c82a35f1a8223ea9e94
4
- data.tar.gz: 1a0fcfda81b1353fc0765c9868138d82bd4d35b699aa6d0e148ad70d1e94ba8c
3
+ metadata.gz: 8b23df94295951f1002e1675de50c1e53f915a6d5ec234d3d8675a5062689f23
4
+ data.tar.gz: 7086b6fa90413673e86c84b9abf40638d03a738610d0933232c65863641021fe
5
5
  SHA512:
6
- metadata.gz: bebb35ab586fb9e96c283ce235c24862405eef34a2cf1836dc75f6aa9ce64d616985dada6360e7354a3d22a9e0b17608d0a132bb4c0df257457adf9ed64f0fe4
7
- data.tar.gz: 59067db38c7248f52a4a2081ee6bcb7a975461a8ce7f0167ef6cfeb00c7d74960c5523d42dd6bbffc921ba7f9a3af4809f9bdc1c847a2e9b901684d3b9567547
6
+ metadata.gz: d7ea0fc8a9e3e6be89a3eb377baffaaaf2201e677ba01030ac10d2f2c6400daa1a1e33970a5acc9a1a7b6ecce60c3f40d0242a4925a8677d3d5183b002676afd
7
+ data.tar.gz: cb8cee58c632312841f699fc4dd5419743714751ff3c4b935f01acd478882fbd335afc4e302d7002ba29d3999ca1fd13be71602fc46c60efc7db52eae7b976c0
@@ -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
+
@@ -3142,7 +3142,7 @@
3142
3142
  </xsl:variable>
3143
3143
  <xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
3144
3144
  <xsl:variable name="colwidths">
3145
- <xsl:call-template name="calculate-column-widths">
3145
+ <xsl:call-template name="calculate-column-widths-proportional">
3146
3146
  <xsl:with-param name="cols-count" select="$cols-count"/>
3147
3147
  <xsl:with-param name="table" select="$toc_table_simple"/>
3148
3148
  </xsl:call-template>
@@ -3787,8 +3787,18 @@
3787
3787
 
3788
3788
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
3789
3789
 
3790
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">
3791
+ true
3792
+ </xsl:variable>
3793
+ <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
3794
+
3790
3795
  <xsl:variable name="isGenerateTableIF_">
3791
- false
3796
+ <xsl:choose>
3797
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
3798
+ <xsl:value-of select="normalize-space($table_if) = 'true'"/>
3799
+ </xsl:when>
3800
+ <xsl:otherwise>false</xsl:otherwise>
3801
+ </xsl:choose>
3792
3802
  </xsl:variable>
3793
3803
  <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
3794
3804
 
@@ -4212,6 +4222,9 @@
4212
4222
  <xsl:attribute-set name="import-style">
4213
4223
  </xsl:attribute-set>
4214
4224
 
4225
+ <xsl:attribute-set name="component-style">
4226
+ </xsl:attribute-set>
4227
+
4215
4228
  <xsl:attribute-set name="recommendation-style">
4216
4229
 
4217
4230
  </xsl:attribute-set>
@@ -4408,9 +4421,8 @@
4408
4421
  </xsl:attribute-set>
4409
4422
 
4410
4423
  <xsl:attribute-set name="dt-block-style">
4411
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4424
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
4412
4425
 
4413
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
4414
4426
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4415
4427
 
4416
4428
  </xsl:attribute-set>
@@ -5373,6 +5385,7 @@
5373
5385
 
5374
5386
  <xsl:variable name="margin-side">
5375
5387
  <xsl:choose>
5388
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">0</xsl:when>
5376
5389
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
5377
5390
  <xsl:otherwise>0</xsl:otherwise>
5378
5391
  </xsl:choose>
@@ -5453,6 +5466,7 @@
5453
5466
  </td>
5454
5467
  </tr>
5455
5468
  -->
5469
+ <!-- Simple_table=<xsl:copy-of select="$simple-table"/> -->
5456
5470
  <xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
5457
5471
 
5458
5472
  </xsl:when>
@@ -5591,12 +5605,17 @@
5591
5605
  <xsl:template name="calculate-column-widths">
5592
5606
  <xsl:param name="table"/>
5593
5607
  <xsl:param name="cols-count"/>
5594
-
5608
+ <xsl:choose>
5609
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
5610
+ <xsl:call-template name="get-calculated-column-widths-autolayout-algorithm"/>
5611
+ </xsl:when>
5612
+ <xsl:otherwise>
5595
5613
  <xsl:call-template name="calculate-column-widths-proportional">
5596
5614
  <xsl:with-param name="cols-count" select="$cols-count"/>
5597
5615
  <xsl:with-param name="table" select="$table"/>
5598
5616
  </xsl:call-template>
5599
-
5617
+ </xsl:otherwise>
5618
+ </xsl:choose>
5600
5619
  </xsl:template>
5601
5620
 
5602
5621
  <!-- ================================================== -->
@@ -5774,6 +5793,7 @@
5774
5793
  <!-- (https://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2) -->
5775
5794
  <!-- ================================================== -->
5776
5795
 
5796
+ <!-- INPUT: table with columns widths, generated by table_if.xsl -->
5777
5797
  <xsl:template name="calculate-column-widths-autolayout-algorithm">
5778
5798
  <xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
5779
5799
 
@@ -5785,67 +5805,6 @@
5785
5805
 
5786
5806
  <!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
5787
5807
 
5788
- <!-- get current table id -->
5789
- <xsl:variable name="table_id" select="@id"/>
5790
- <!-- find table by id in the file 'table_widths' -->
5791
- <!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
5792
- <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
5793
-
5794
- <!-- table='<xsl:copy-of select="$table"/>' -->
5795
- <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
5796
- <!-- table-if='<xsl:copy-of select="$table-if"/>' -->
5797
- <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
5798
-
5799
- <xsl:variable name="table_with_cell_widths_">
5800
- <xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
5801
- </xsl:variable>
5802
- <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
5803
-
5804
- <!-- <xsl:if test="$table_if_debug = 'true'">
5805
- <xsl:copy-of select="$table_with_cell_widths"/>
5806
- </xsl:if> -->
5807
-
5808
- <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
5809
-
5810
- <xsl:variable name="column_widths_">
5811
- <!-- iteration of columns -->
5812
- <xsl:for-each select="$table_with_cell_widths//tr[1]/td">
5813
- <xsl:variable name="pos" select="position()"/>
5814
- <column>
5815
- <xsl:attribute name="width_max">
5816
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
5817
- <xsl:sort select="." data-type="number" order="descending"/>
5818
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
5819
- </xsl:for-each>
5820
- </xsl:attribute>
5821
- <xsl:attribute name="width_min">
5822
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
5823
- <xsl:sort select="." data-type="number" order="descending"/>
5824
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
5825
- </xsl:for-each>
5826
- </xsl:attribute>
5827
- </column>
5828
- </xsl:for-each>
5829
- </xsl:variable>
5830
- <xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
5831
-
5832
- <!-- <column_widths>
5833
- <xsl:copy-of select="$column_widths"/>
5834
- </column_widths> -->
5835
-
5836
- <!-- These in turn, are used to find the minimum and maximum width for the table. -->
5837
- <xsl:variable name="table_widths_">
5838
- <table>
5839
- <xsl:attribute name="width_max">
5840
- <xsl:value-of select="sum($column_widths/column/@width_max)"/>
5841
- </xsl:attribute>
5842
- <xsl:attribute name="width_min">
5843
- <xsl:value-of select="sum($column_widths/column/@width_min)"/>
5844
- </xsl:attribute>
5845
- </table>
5846
- </xsl:variable>
5847
- <xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
5848
-
5849
5808
  <xsl:variable name="page_width">
5850
5809
  <xsl:choose>
5851
5810
  <xsl:when test="$parent_table_page-width != ''">
@@ -5858,16 +5817,13 @@
5858
5817
  </xsl:variable>
5859
5818
 
5860
5819
  <xsl:if test="$table_if_debug = 'true'">
5861
- <table_width>
5862
- <xsl:copy-of select="$table_widths"/>
5863
- </table_width>
5864
- <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
5820
+ <page_width><xsl:value-of select="$page_width"/></page_width>
5865
5821
  </xsl:if>
5866
5822
 
5867
5823
  <!-- There are three cases: -->
5868
5824
  <xsl:choose>
5869
5825
  <!-- 1. The minimum table width is equal to or wider than the available space -->
5870
- <xsl:when test="$table_widths/table/@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
5826
+ <xsl:when test="@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
5871
5827
  <!-- call old algorithm -->
5872
5828
  <case1/>
5873
5829
  <!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
@@ -5877,10 +5833,10 @@
5877
5833
  </xsl:call-template> -->
5878
5834
  </xsl:when>
5879
5835
  <!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
5880
- <xsl:when test="$table_widths/table/@width_max &lt;= $page_width">
5836
+ <xsl:when test="@width_max &lt;= $page_width">
5881
5837
  <case2/>
5882
5838
  <autolayout/>
5883
- <xsl:for-each select="$column_widths/column/@width_max">
5839
+ <xsl:for-each select="column/@width_max">
5884
5840
  <column divider="100"><xsl:value-of select="."/></column>
5885
5841
  </xsl:for-each>
5886
5842
  </xsl:when>
@@ -5890,19 +5846,19 @@
5890
5846
  For each column, let d be the difference between maximum and minimum width of that column.
5891
5847
  Now set the column's width to the minimum width plus d times W over D.
5892
5848
  This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
5893
- <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)">
5849
+ <xsl:when test="(@width_max &gt; $page_width and @width_min &lt; $page_width) or (@width_min &gt;= $page_width)">
5894
5850
  <!-- difference between the available space and the minimum table width -->
5895
- <xsl:variable name="W" select="$page_width - $table_widths/table/@width_min"/>
5851
+ <xsl:variable name="W" select="$page_width - @width_min"/>
5896
5852
  <W><xsl:value-of select="$W"/></W>
5897
5853
  <!-- difference between maximum and minimum width of the table -->
5898
- <xsl:variable name="D" select="$table_widths/table/@width_max - $table_widths/table/@width_min"/>
5854
+ <xsl:variable name="D" select="@width_max - @width_min"/>
5899
5855
  <D><xsl:value-of select="$D"/></D>
5900
5856
  <case3/>
5901
5857
  <autolayout/>
5902
- <xsl:if test="$table_widths/table/@width_min &gt;= $page_width">
5858
+ <xsl:if test="@width_min &gt;= $page_width">
5903
5859
  <split_keep-within-line>true</split_keep-within-line>
5904
5860
  </xsl:if>
5905
- <xsl:for-each select="$column_widths/column">
5861
+ <xsl:for-each select="column">
5906
5862
  <!-- difference between maximum and minimum width of that column. -->
5907
5863
  <xsl:variable name="d" select="@width_max - @width_min"/>
5908
5864
  <d><xsl:value-of select="$d"/></d>
@@ -5928,23 +5884,39 @@
5928
5884
 
5929
5885
  <parent_element><xsl:value-of select="local-name(..)"/></parent_element>
5930
5886
 
5887
+ <ancestor_tree>
5888
+ <xsl:for-each select="ancestor::*">
5889
+ <ancestor><xsl:value-of select="local-name()"/></ancestor>
5890
+ </xsl:for-each>
5891
+ </ancestor_tree>
5892
+
5931
5893
  <xsl:variable name="parent_table_page-width_">
5932
5894
  <xsl:if test="$parent_table_id != ''">
5933
5895
  <!-- determine column number in the parent table -->
5934
5896
  <xsl:variable name="parent_table_column_number">
5935
5897
  <xsl:choose>
5936
- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
5898
+ <!-- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when> -->
5899
+ <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>
5937
5900
  <xsl:otherwise> <!-- parent is table -->
5938
5901
  <xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
5939
5902
  </xsl:otherwise>
5940
5903
  </xsl:choose>
5941
5904
  </xsl:variable>
5942
5905
  <!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
5943
- <xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
5906
+
5907
+ <xsl:variable name="parent_table_column_" select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
5908
+ <xsl:variable name="parent_table_column" select="xalan:nodeset($parent_table_column_)"/>
5909
+ <!-- <xsl:variable name="divider">
5910
+ <xsl:value-of select="$parent_table_column/@divider"/>
5911
+ <xsl:if test="not($parent_table_column/@divider)">1</xsl:if>
5912
+ </xsl:variable> -->
5913
+ <xsl:value-of select="$parent_table_column/text()"/> <!-- * 10 -->
5944
5914
  </xsl:if>
5945
5915
  </xsl:variable>
5946
5916
  <xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
5947
5917
 
5918
+ <parent_table_page-width><xsl:value-of select="$parent_table_page-width"/></parent_table_page-width>
5919
+
5948
5920
  <!-- get current table id -->
5949
5921
  <xsl:variable name="table_id" select="@id"/>
5950
5922
 
@@ -5965,50 +5937,6 @@
5965
5937
 
5966
5938
  </xsl:template> <!-- get-calculated-column-widths-autolayout-algorithm -->
5967
5939
 
5968
- <!-- ============================= -->
5969
- <!-- mode: determine_cell_widths-if -->
5970
- <!-- ============================= -->
5971
- <xsl:template match="@*|node()" mode="determine_cell_widths-if">
5972
- <xsl:copy>
5973
- <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
5974
- </xsl:copy>
5975
- </xsl:template>
5976
-
5977
- <xsl:template match="td | th" mode="determine_cell_widths-if">
5978
- <xsl:copy>
5979
- <xsl:copy-of select="@*"/>
5980
-
5981
- <!-- The maximum width is given by the widest line. -->
5982
- <xsl:attribute name="width_max">
5983
- <xsl:for-each select="p_len">
5984
- <xsl:sort select="." data-type="number" order="descending"/>
5985
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
5986
- </xsl:for-each>
5987
- </xsl:attribute>
5988
-
5989
- <!-- The minimum width is given by the widest text element (word, image, etc.) -->
5990
- <xsl:variable name="width_min">
5991
- <xsl:for-each select="word_len">
5992
- <xsl:sort select="." data-type="number" order="descending"/>
5993
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
5994
- </xsl:for-each>
5995
- </xsl:variable>
5996
- <xsl:attribute name="width_min">
5997
- <xsl:value-of select="$width_min"/>
5998
- </xsl:attribute>
5999
-
6000
- <xsl:if test="$width_min = 0">
6001
- <xsl:attribute name="width_min">1</xsl:attribute>
6002
- </xsl:if>
6003
-
6004
- <xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
6005
-
6006
- </xsl:copy>
6007
- </xsl:template>
6008
- <!-- ============================= -->
6009
- <!-- END mode: determine_cell_widths-if -->
6010
- <!-- ============================= -->
6011
-
6012
5940
  <!-- ================================================== -->
6013
5941
  <!-- Calculate column's width based on HTML4 algorithm -->
6014
5942
  <!-- ================================================== -->
@@ -6209,6 +6137,7 @@
6209
6137
  <xsl:when test="$table_or_dl = 'table'">
6210
6138
  <xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
6211
6139
  <fo:table-row number-columns-spanned="{$col_count}">
6140
+ <xsl:copy-of select="../@font-weight"/>
6212
6141
  <!-- <test_table><xsl:copy-of select="."/></test_table> -->
6213
6142
  <xsl:call-template name="td"/>
6214
6143
  </fo:table-row>
@@ -6393,7 +6322,7 @@
6393
6322
 
6394
6323
  <xsl:apply-templates/>
6395
6324
 
6396
- <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"/> -->
6325
+ <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"/> -->
6397
6326
 
6398
6327
  </fo:block>
6399
6328
  </fo:table-cell>
@@ -6740,6 +6669,7 @@
6740
6669
  <xsl:template match="*[local-name()='dl']">
6741
6670
  <xsl:variable name="isAdded" select="@added"/>
6742
6671
  <xsl:variable name="isDeleted" select="@deleted"/>
6672
+ <!-- <dl><xsl:copy-of select="."/></dl> -->
6743
6673
  <fo:block-container>
6744
6674
 
6745
6675
  <xsl:if test="not(ancestor::*[local-name() = 'li'])">
@@ -7274,21 +7204,16 @@
7274
7204
  <!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
7275
7205
  <xsl:template match="*[local-name()='dt']" mode="dl_if">
7276
7206
  <xsl:param name="id"/>
7277
- <xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
7278
7207
  <tr>
7279
7208
  <td>
7280
7209
  <xsl:copy-of select="node()"/>
7281
7210
  </td>
7282
7211
  <td>
7283
-
7284
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
7285
-
7286
- <!-- get paragraphs from nested 'dl' -->
7287
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
7288
-
7212
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
7213
+ <!-- get paragraphs from nested 'dl' -->
7214
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
7289
7215
  </td>
7290
7216
  </tr>
7291
-
7292
7217
  </xsl:template>
7293
7218
  <xsl:template match="*[local-name()='dd']" mode="dl_if"/>
7294
7219
 
@@ -7939,6 +7864,9 @@
7939
7864
  <xsl:variable name="td">
7940
7865
  <xsl:element name="td">
7941
7866
  <xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
7867
+ <xsl:if test="local-name()='th'">
7868
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
7869
+ </xsl:if>
7942
7870
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
7943
7871
  <xsl:apply-templates mode="simple-table-colspan"/>
7944
7872
  </xsl:element>
@@ -7951,6 +7879,9 @@
7951
7879
  <xsl:otherwise>
7952
7880
  <xsl:element name="td">
7953
7881
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
7882
+ <xsl:if test="local-name()='th'">
7883
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
7884
+ </xsl:if>
7954
7885
  <xsl:apply-templates mode="simple-table-colspan"/>
7955
7886
  </xsl:element>
7956
7887
  </xsl:otherwise>
@@ -8080,8 +8011,14 @@
8080
8011
  <xsl:copy-of select="@*"/>
8081
8012
  <xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
8082
8013
  <xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
8014
+ <xsl:variable name="divide">
8015
+ <xsl:choose>
8016
+ <xsl:when test="@divide"><xsl:value-of select="@divide"/></xsl:when>
8017
+ <xsl:otherwise>1</xsl:otherwise>
8018
+ </xsl:choose>
8019
+ </xsl:variable>
8083
8020
  <xsl:attribute name="id">
8084
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
8021
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
8085
8022
  </xsl:attribute>
8086
8023
 
8087
8024
  <xsl:for-each select="*[local-name() = 'p']">
@@ -8089,10 +8026,12 @@
8089
8026
  <xsl:copy-of select="@*"/>
8090
8027
  <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
8091
8028
  <xsl:attribute name="id">
8092
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
8029
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
8093
8030
  </xsl:attribute>
8094
8031
 
8095
- <xsl:copy-of select="node()"/>
8032
+ <!-- <xsl:copy-of select="node()" /> -->
8033
+ <xsl:apply-templates mode="simple-table-noid"/>
8034
+
8096
8035
  </xsl:copy>
8097
8036
  </xsl:for-each>
8098
8037
 
@@ -8121,7 +8060,7 @@
8121
8060
  <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
8122
8061
  <xsl:copy>
8123
8062
  <xsl:attribute name="id">
8124
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
8063
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
8125
8064
  </xsl:attribute>
8126
8065
  <xsl:copy-of select="node()"/>
8127
8066
  </xsl:copy>
@@ -8130,6 +8069,24 @@
8130
8069
  </xsl:copy>
8131
8070
 
8132
8071
  </xsl:template>
8072
+
8073
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p']//*" mode="simple-table-noid">
8074
+ <xsl:copy>
8075
+ <xsl:choose>
8076
+ <xsl:when test="$isGenerateTableIF = 'true'">
8077
+ <xsl:copy-of select="@*[local-name() != 'id']"/> <!-- to prevent repeat id in colspan/rowspan cells -->
8078
+ <!-- <xsl:if test="local-name() = 'dl' or local-name() = 'table'">
8079
+ <xsl:copy-of select="@id"/>
8080
+ </xsl:if> -->
8081
+ </xsl:when>
8082
+ <xsl:otherwise>
8083
+ <xsl:copy-of select="@*"/>
8084
+ </xsl:otherwise>
8085
+ </xsl:choose>
8086
+ <xsl:apply-templates select="node()" mode="simple-table-noid"/>
8087
+ </xsl:copy>
8088
+ </xsl:template>
8089
+
8133
8090
  <!-- End mode: simple-table-id -->
8134
8091
  <!-- ===================== -->
8135
8092
  <!-- ===================== -->
@@ -8139,7 +8096,7 @@
8139
8096
  <!-- =============================== -->
8140
8097
  <xsl:template match="@*|node()" mode="td_text_with_formatting">
8141
8098
  <xsl:copy>
8142
- <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
8099
+ <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
8143
8100
  </xsl:copy>
8144
8101
  </xsl:template>
8145
8102
 
@@ -8257,6 +8214,10 @@
8257
8214
  <xsl:attribute name="font-size">95%</xsl:attribute> <!-- base font in table is 10pt -->
8258
8215
  </xsl:if>
8259
8216
 
8217
+ <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 -->
8218
+ <!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
8219
+ </xsl:if>
8220
+
8260
8221
  <xsl:call-template name="setTrackChangesStyles">
8261
8222
  <xsl:with-param name="isAdded" select="$isAdded"/>
8262
8223
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
@@ -10196,41 +10157,47 @@
10196
10157
  </fo:block>
10197
10158
  </xsl:template>
10198
10159
 
10199
- <xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
10160
+ <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']">
10200
10161
  <fo:block xsl:use-attribute-sets="inherit-style">
10201
10162
  <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
10202
10163
  </fo:block>
10203
10164
  </xsl:template>
10204
10165
 
10205
- <xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
10166
+ <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']">
10206
10167
  <fo:block xsl:use-attribute-sets="description-style">
10207
10168
  <xsl:apply-templates/>
10208
10169
  </fo:block>
10209
10170
  </xsl:template>
10210
10171
 
10211
- <xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
10172
+ <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']">
10212
10173
  <fo:block xsl:use-attribute-sets="specification-style">
10213
10174
  <xsl:apply-templates/>
10214
10175
  </fo:block>
10215
10176
  </xsl:template>
10216
10177
 
10217
- <xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
10178
+ <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']">
10218
10179
  <fo:block xsl:use-attribute-sets="measurement-target-style">
10219
10180
  <xsl:apply-templates/>
10220
10181
  </fo:block>
10221
10182
  </xsl:template>
10222
10183
 
10223
- <xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
10184
+ <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']">
10224
10185
  <fo:block xsl:use-attribute-sets="verification-style">
10225
10186
  <xsl:apply-templates/>
10226
10187
  </fo:block>
10227
10188
  </xsl:template>
10228
10189
 
10229
- <xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
10190
+ <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']">
10230
10191
  <fo:block xsl:use-attribute-sets="import-style">
10231
10192
  <xsl:apply-templates/>
10232
10193
  </fo:block>
10233
10194
  </xsl:template>
10195
+
10196
+ <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')]">
10197
+ <fo:block xsl:use-attribute-sets="component-style">
10198
+ <xsl:apply-templates/>
10199
+ </fo:block>
10200
+ </xsl:template>
10234
10201
  <!-- ========== -->
10235
10202
  <!-- END -->
10236
10203
  <!-- ========== -->
@@ -10286,15 +10253,12 @@
10286
10253
 
10287
10254
  <xsl:template match="*[local-name()='tr']" mode="requirement">
10288
10255
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
10289
- <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
10290
- <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
10291
- </xsl:if>
10292
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
10293
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
10294
- </xsl:if>
10295
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
10296
- <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
10256
+
10257
+ <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 ')">
10258
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
10259
+
10297
10260
  </xsl:if>
10261
+
10298
10262
  <xsl:apply-templates mode="requirement"/>
10299
10263
  </fo:table-row>
10300
10264
  </xsl:template>
@@ -11816,7 +11780,7 @@
11816
11780
  </tbody>
11817
11781
  </xsl:variable>
11818
11782
  <xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
11819
- <xsl:call-template name="calculate-column-widths">
11783
+ <xsl:call-template name="calculate-column-widths-proportional">
11820
11784
  <xsl:with-param name="cols-count" select="$cols-count"/>
11821
11785
  <xsl:with-param name="table" select="$toc_table_simple"/>
11822
11786
  </xsl:call-template>