metanorma-bipm 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 +4 -4
- data/.github/workflows/rake.yml +1 -1
- data/.github/workflows/release.yml +24 -0
- data/lib/isodoc/bipm/bipm.brochure.xsl +103 -148
- data/lib/isodoc/bipm/bipm.guide.xsl +103 -148
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +103 -148
- data/lib/isodoc/bipm/bipm.rapport.xsl +103 -148
- data/lib/isodoc/bipm/jcgm.standard.xsl +102 -148
- data/lib/metanorma/bipm/biblio.rng +8 -5
- data/lib/metanorma/bipm/version.rb +1 -1
- data/lib/metanorma-bipm.rb +1 -1
- data/metanorma-bipm.gemspec +1 -1
- metadata +9 -9
- data/lib/isodoc/bipm/html/htmlstyle.css +0 -1017
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f52ce111308c1af654fb2fb4b8d4f8471df9f9074d79899a84d8d0b4d4ad29ef
|
4
|
+
data.tar.gz: fc05ab77853f03bc9329fcd5696dbef3287e02bbfaf79adff6ddca72993a3d77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4075ca8a876e97b4d2a1f6579c34123613d5da30ee189b7d436c5b06790bb2b390f8b3677131de7bf5570b7f49b5c42fd8819435cfdf1db2483337d5ad6053db
|
7
|
+
data.tar.gz: 59f01bf9e376d33e7348fb7307f4f16f4918d03868d6bc1300374ff40795510b135a4ebb58a603a6639ed8c689fbdf00e35dfb8df6af6d0a44c0943cb71c0070
|
data/.github/workflows/rake.yml
CHANGED
@@ -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
|
-
|
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
|
|
@@ -4411,9 +4421,8 @@
|
|
4411
4421
|
</xsl:attribute-set>
|
4412
4422
|
|
4413
4423
|
<xsl:attribute-set name="dt-block-style">
|
4414
|
-
<xsl:attribute name="margin-top">
|
4424
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
4415
4425
|
|
4416
|
-
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
4417
4426
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
4418
4427
|
|
4419
4428
|
</xsl:attribute-set>
|
@@ -5376,6 +5385,7 @@
|
|
5376
5385
|
|
5377
5386
|
<xsl:variable name="margin-side">
|
5378
5387
|
<xsl:choose>
|
5388
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">0</xsl:when>
|
5379
5389
|
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
5380
5390
|
<xsl:otherwise>0</xsl:otherwise>
|
5381
5391
|
</xsl:choose>
|
@@ -5456,6 +5466,7 @@
|
|
5456
5466
|
</td>
|
5457
5467
|
</tr>
|
5458
5468
|
-->
|
5469
|
+
<!-- Simple_table=<xsl:copy-of select="$simple-table"/> -->
|
5459
5470
|
<xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
|
5460
5471
|
|
5461
5472
|
</xsl:when>
|
@@ -5594,12 +5605,17 @@
|
|
5594
5605
|
<xsl:template name="calculate-column-widths">
|
5595
5606
|
<xsl:param name="table"/>
|
5596
5607
|
<xsl:param name="cols-count"/>
|
5597
|
-
|
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>
|
5598
5613
|
<xsl:call-template name="calculate-column-widths-proportional">
|
5599
5614
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5600
5615
|
<xsl:with-param name="table" select="$table"/>
|
5601
5616
|
</xsl:call-template>
|
5602
|
-
|
5617
|
+
</xsl:otherwise>
|
5618
|
+
</xsl:choose>
|
5603
5619
|
</xsl:template>
|
5604
5620
|
|
5605
5621
|
<!-- ================================================== -->
|
@@ -5777,6 +5793,7 @@
|
|
5777
5793
|
<!-- (https://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2) -->
|
5778
5794
|
<!-- ================================================== -->
|
5779
5795
|
|
5796
|
+
<!-- INPUT: table with columns widths, generated by table_if.xsl -->
|
5780
5797
|
<xsl:template name="calculate-column-widths-autolayout-algorithm">
|
5781
5798
|
<xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
|
5782
5799
|
|
@@ -5788,67 +5805,6 @@
|
|
5788
5805
|
|
5789
5806
|
<!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
|
5790
5807
|
|
5791
|
-
<!-- get current table id -->
|
5792
|
-
<xsl:variable name="table_id" select="@id"/>
|
5793
|
-
<!-- find table by id in the file 'table_widths' -->
|
5794
|
-
<!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
|
5795
|
-
<xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
|
5796
|
-
|
5797
|
-
<!-- table='<xsl:copy-of select="$table"/>' -->
|
5798
|
-
<!-- table_id='<xsl:value-of select="$table_id"/>\ -->
|
5799
|
-
<!-- table-if='<xsl:copy-of select="$table-if"/>' -->
|
5800
|
-
<!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
|
5801
|
-
|
5802
|
-
<xsl:variable name="table_with_cell_widths_">
|
5803
|
-
<xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
|
5804
|
-
</xsl:variable>
|
5805
|
-
<xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
|
5806
|
-
|
5807
|
-
<!-- <xsl:if test="$table_if_debug = 'true'">
|
5808
|
-
<xsl:copy-of select="$table_with_cell_widths"/>
|
5809
|
-
</xsl:if> -->
|
5810
|
-
|
5811
|
-
<!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
|
5812
|
-
|
5813
|
-
<xsl:variable name="column_widths_">
|
5814
|
-
<!-- iteration of columns -->
|
5815
|
-
<xsl:for-each select="$table_with_cell_widths//tr[1]/td">
|
5816
|
-
<xsl:variable name="pos" select="position()"/>
|
5817
|
-
<column>
|
5818
|
-
<xsl:attribute name="width_max">
|
5819
|
-
<xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
|
5820
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
5821
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
5822
|
-
</xsl:for-each>
|
5823
|
-
</xsl:attribute>
|
5824
|
-
<xsl:attribute name="width_min">
|
5825
|
-
<xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
|
5826
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
5827
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
5828
|
-
</xsl:for-each>
|
5829
|
-
</xsl:attribute>
|
5830
|
-
</column>
|
5831
|
-
</xsl:for-each>
|
5832
|
-
</xsl:variable>
|
5833
|
-
<xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
|
5834
|
-
|
5835
|
-
<!-- <column_widths>
|
5836
|
-
<xsl:copy-of select="$column_widths"/>
|
5837
|
-
</column_widths> -->
|
5838
|
-
|
5839
|
-
<!-- These in turn, are used to find the minimum and maximum width for the table. -->
|
5840
|
-
<xsl:variable name="table_widths_">
|
5841
|
-
<table>
|
5842
|
-
<xsl:attribute name="width_max">
|
5843
|
-
<xsl:value-of select="sum($column_widths/column/@width_max)"/>
|
5844
|
-
</xsl:attribute>
|
5845
|
-
<xsl:attribute name="width_min">
|
5846
|
-
<xsl:value-of select="sum($column_widths/column/@width_min)"/>
|
5847
|
-
</xsl:attribute>
|
5848
|
-
</table>
|
5849
|
-
</xsl:variable>
|
5850
|
-
<xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
|
5851
|
-
|
5852
5808
|
<xsl:variable name="page_width">
|
5853
5809
|
<xsl:choose>
|
5854
5810
|
<xsl:when test="$parent_table_page-width != ''">
|
@@ -5861,16 +5817,13 @@
|
|
5861
5817
|
</xsl:variable>
|
5862
5818
|
|
5863
5819
|
<xsl:if test="$table_if_debug = 'true'">
|
5864
|
-
<
|
5865
|
-
<xsl:copy-of select="$table_widths"/>
|
5866
|
-
</table_width>
|
5867
|
-
<debug>$page_width=<xsl:value-of select="$page_width"/></debug>
|
5820
|
+
<page_width><xsl:value-of select="$page_width"/></page_width>
|
5868
5821
|
</xsl:if>
|
5869
5822
|
|
5870
5823
|
<!-- There are three cases: -->
|
5871
5824
|
<xsl:choose>
|
5872
5825
|
<!-- 1. The minimum table width is equal to or wider than the available space -->
|
5873
|
-
<xsl:when test="
|
5826
|
+
<xsl:when test="@width_min >= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
|
5874
5827
|
<!-- call old algorithm -->
|
5875
5828
|
<case1/>
|
5876
5829
|
<!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
|
@@ -5880,10 +5833,10 @@
|
|
5880
5833
|
</xsl:call-template> -->
|
5881
5834
|
</xsl:when>
|
5882
5835
|
<!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
|
5883
|
-
<xsl:when test="
|
5836
|
+
<xsl:when test="@width_max <= $page_width">
|
5884
5837
|
<case2/>
|
5885
5838
|
<autolayout/>
|
5886
|
-
<xsl:for-each select="
|
5839
|
+
<xsl:for-each select="column/@width_max">
|
5887
5840
|
<column divider="100"><xsl:value-of select="."/></column>
|
5888
5841
|
</xsl:for-each>
|
5889
5842
|
</xsl:when>
|
@@ -5893,19 +5846,19 @@
|
|
5893
5846
|
For each column, let d be the difference between maximum and minimum width of that column.
|
5894
5847
|
Now set the column's width to the minimum width plus d times W over D.
|
5895
5848
|
This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
|
5896
|
-
<xsl:when test="(
|
5849
|
+
<xsl:when test="(@width_max > $page_width and @width_min < $page_width) or (@width_min >= $page_width)">
|
5897
5850
|
<!-- difference between the available space and the minimum table width -->
|
5898
|
-
<xsl:variable name="W" select="$page_width -
|
5851
|
+
<xsl:variable name="W" select="$page_width - @width_min"/>
|
5899
5852
|
<W><xsl:value-of select="$W"/></W>
|
5900
5853
|
<!-- difference between maximum and minimum width of the table -->
|
5901
|
-
<xsl:variable name="D" select="
|
5854
|
+
<xsl:variable name="D" select="@width_max - @width_min"/>
|
5902
5855
|
<D><xsl:value-of select="$D"/></D>
|
5903
5856
|
<case3/>
|
5904
5857
|
<autolayout/>
|
5905
|
-
<xsl:if test="
|
5858
|
+
<xsl:if test="@width_min >= $page_width">
|
5906
5859
|
<split_keep-within-line>true</split_keep-within-line>
|
5907
5860
|
</xsl:if>
|
5908
|
-
<xsl:for-each select="
|
5861
|
+
<xsl:for-each select="column">
|
5909
5862
|
<!-- difference between maximum and minimum width of that column. -->
|
5910
5863
|
<xsl:variable name="d" select="@width_max - @width_min"/>
|
5911
5864
|
<d><xsl:value-of select="$d"/></d>
|
@@ -5931,23 +5884,39 @@
|
|
5931
5884
|
|
5932
5885
|
<parent_element><xsl:value-of select="local-name(..)"/></parent_element>
|
5933
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
|
+
|
5934
5893
|
<xsl:variable name="parent_table_page-width_">
|
5935
5894
|
<xsl:if test="$parent_table_id != ''">
|
5936
5895
|
<!-- determine column number in the parent table -->
|
5937
5896
|
<xsl:variable name="parent_table_column_number">
|
5938
5897
|
<xsl:choose>
|
5939
|
-
<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>
|
5940
5900
|
<xsl:otherwise> <!-- parent is table -->
|
5941
5901
|
<xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
|
5942
5902
|
</xsl:otherwise>
|
5943
5903
|
</xsl:choose>
|
5944
5904
|
</xsl:variable>
|
5945
5905
|
<!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
|
5946
|
-
|
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 -->
|
5947
5914
|
</xsl:if>
|
5948
5915
|
</xsl:variable>
|
5949
5916
|
<xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
|
5950
5917
|
|
5918
|
+
<parent_table_page-width><xsl:value-of select="$parent_table_page-width"/></parent_table_page-width>
|
5919
|
+
|
5951
5920
|
<!-- get current table id -->
|
5952
5921
|
<xsl:variable name="table_id" select="@id"/>
|
5953
5922
|
|
@@ -5968,50 +5937,6 @@
|
|
5968
5937
|
|
5969
5938
|
</xsl:template> <!-- get-calculated-column-widths-autolayout-algorithm -->
|
5970
5939
|
|
5971
|
-
<!-- ============================= -->
|
5972
|
-
<!-- mode: determine_cell_widths-if -->
|
5973
|
-
<!-- ============================= -->
|
5974
|
-
<xsl:template match="@*|node()" mode="determine_cell_widths-if">
|
5975
|
-
<xsl:copy>
|
5976
|
-
<xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
|
5977
|
-
</xsl:copy>
|
5978
|
-
</xsl:template>
|
5979
|
-
|
5980
|
-
<xsl:template match="td | th" mode="determine_cell_widths-if">
|
5981
|
-
<xsl:copy>
|
5982
|
-
<xsl:copy-of select="@*"/>
|
5983
|
-
|
5984
|
-
<!-- The maximum width is given by the widest line. -->
|
5985
|
-
<xsl:attribute name="width_max">
|
5986
|
-
<xsl:for-each select="p_len">
|
5987
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
5988
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
5989
|
-
</xsl:for-each>
|
5990
|
-
</xsl:attribute>
|
5991
|
-
|
5992
|
-
<!-- The minimum width is given by the widest text element (word, image, etc.) -->
|
5993
|
-
<xsl:variable name="width_min">
|
5994
|
-
<xsl:for-each select="word_len">
|
5995
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
5996
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
5997
|
-
</xsl:for-each>
|
5998
|
-
</xsl:variable>
|
5999
|
-
<xsl:attribute name="width_min">
|
6000
|
-
<xsl:value-of select="$width_min"/>
|
6001
|
-
</xsl:attribute>
|
6002
|
-
|
6003
|
-
<xsl:if test="$width_min = 0">
|
6004
|
-
<xsl:attribute name="width_min">1</xsl:attribute>
|
6005
|
-
</xsl:if>
|
6006
|
-
|
6007
|
-
<xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
|
6008
|
-
|
6009
|
-
</xsl:copy>
|
6010
|
-
</xsl:template>
|
6011
|
-
<!-- ============================= -->
|
6012
|
-
<!-- END mode: determine_cell_widths-if -->
|
6013
|
-
<!-- ============================= -->
|
6014
|
-
|
6015
5940
|
<!-- ================================================== -->
|
6016
5941
|
<!-- Calculate column's width based on HTML4 algorithm -->
|
6017
5942
|
<!-- ================================================== -->
|
@@ -6212,6 +6137,7 @@
|
|
6212
6137
|
<xsl:when test="$table_or_dl = 'table'">
|
6213
6138
|
<xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
|
6214
6139
|
<fo:table-row number-columns-spanned="{$col_count}">
|
6140
|
+
<xsl:copy-of select="../@font-weight"/>
|
6215
6141
|
<!-- <test_table><xsl:copy-of select="."/></test_table> -->
|
6216
6142
|
<xsl:call-template name="td"/>
|
6217
6143
|
</fo:table-row>
|
@@ -6396,7 +6322,7 @@
|
|
6396
6322
|
|
6397
6323
|
<xsl:apply-templates/>
|
6398
6324
|
|
6399
|
-
<xsl:if test="$isGenerateTableIF = 'true'"
|
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"/> -->
|
6400
6326
|
|
6401
6327
|
</fo:block>
|
6402
6328
|
</fo:table-cell>
|
@@ -6743,6 +6669,7 @@
|
|
6743
6669
|
<xsl:template match="*[local-name()='dl']">
|
6744
6670
|
<xsl:variable name="isAdded" select="@added"/>
|
6745
6671
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
6672
|
+
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
6746
6673
|
<fo:block-container>
|
6747
6674
|
|
6748
6675
|
<xsl:if test="not(ancestor::*[local-name() = 'li'])">
|
@@ -7277,21 +7204,16 @@
|
|
7277
7204
|
<!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
|
7278
7205
|
<xsl:template match="*[local-name()='dt']" mode="dl_if">
|
7279
7206
|
<xsl:param name="id"/>
|
7280
|
-
<xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
|
7281
7207
|
<tr>
|
7282
7208
|
<td>
|
7283
7209
|
<xsl:copy-of select="node()"/>
|
7284
7210
|
</td>
|
7285
7211
|
<td>
|
7286
|
-
|
7287
|
-
|
7288
|
-
|
7289
|
-
<!-- get paragraphs from nested 'dl' -->
|
7290
|
-
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
7291
|
-
|
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"/>
|
7292
7215
|
</td>
|
7293
7216
|
</tr>
|
7294
|
-
|
7295
7217
|
</xsl:template>
|
7296
7218
|
<xsl:template match="*[local-name()='dd']" mode="dl_if"/>
|
7297
7219
|
|
@@ -7942,6 +7864,9 @@
|
|
7942
7864
|
<xsl:variable name="td">
|
7943
7865
|
<xsl:element name="td">
|
7944
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>
|
7945
7870
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
7946
7871
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
7947
7872
|
</xsl:element>
|
@@ -7954,6 +7879,9 @@
|
|
7954
7879
|
<xsl:otherwise>
|
7955
7880
|
<xsl:element name="td">
|
7956
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>
|
7957
7885
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
7958
7886
|
</xsl:element>
|
7959
7887
|
</xsl:otherwise>
|
@@ -8083,8 +8011,14 @@
|
|
8083
8011
|
<xsl:copy-of select="@*"/>
|
8084
8012
|
<xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
|
8085
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>
|
8086
8020
|
<xsl:attribute name="id">
|
8087
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
|
8021
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
|
8088
8022
|
</xsl:attribute>
|
8089
8023
|
|
8090
8024
|
<xsl:for-each select="*[local-name() = 'p']">
|
@@ -8092,10 +8026,12 @@
|
|
8092
8026
|
<xsl:copy-of select="@*"/>
|
8093
8027
|
<xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
|
8094
8028
|
<xsl:attribute name="id">
|
8095
|
-
<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)"/>
|
8096
8030
|
</xsl:attribute>
|
8097
8031
|
|
8098
|
-
<xsl:copy-of select="node()"/>
|
8032
|
+
<!-- <xsl:copy-of select="node()" /> -->
|
8033
|
+
<xsl:apply-templates mode="simple-table-noid"/>
|
8034
|
+
|
8099
8035
|
</xsl:copy>
|
8100
8036
|
</xsl:for-each>
|
8101
8037
|
|
@@ -8124,7 +8060,7 @@
|
|
8124
8060
|
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
|
8125
8061
|
<xsl:copy>
|
8126
8062
|
<xsl:attribute name="id">
|
8127
|
-
<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)"/>
|
8128
8064
|
</xsl:attribute>
|
8129
8065
|
<xsl:copy-of select="node()"/>
|
8130
8066
|
</xsl:copy>
|
@@ -8133,6 +8069,24 @@
|
|
8133
8069
|
</xsl:copy>
|
8134
8070
|
|
8135
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
|
+
|
8136
8090
|
<!-- End mode: simple-table-id -->
|
8137
8091
|
<!-- ===================== -->
|
8138
8092
|
<!-- ===================== -->
|
@@ -8142,7 +8096,7 @@
|
|
8142
8096
|
<!-- =============================== -->
|
8143
8097
|
<xsl:template match="@*|node()" mode="td_text_with_formatting">
|
8144
8098
|
<xsl:copy>
|
8145
|
-
|
8099
|
+
<xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
|
8146
8100
|
</xsl:copy>
|
8147
8101
|
</xsl:template>
|
8148
8102
|
|
@@ -8260,6 +8214,10 @@
|
|
8260
8214
|
<xsl:attribute name="font-size">95%</xsl:attribute> <!-- base font in table is 10pt -->
|
8261
8215
|
</xsl:if>
|
8262
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
|
+
|
8263
8221
|
<xsl:call-template name="setTrackChangesStyles">
|
8264
8222
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
8265
8223
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
@@ -10295,15 +10253,12 @@
|
|
10295
10253
|
|
10296
10254
|
<xsl:template match="*[local-name()='tr']" mode="requirement">
|
10297
10255
|
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
10298
|
-
|
10299
|
-
|
10300
|
-
|
10301
|
-
|
10302
|
-
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
10303
|
-
</xsl:if>
|
10304
|
-
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
10305
|
-
<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
|
+
|
10306
10260
|
</xsl:if>
|
10261
|
+
|
10307
10262
|
<xsl:apply-templates mode="requirement"/>
|
10308
10263
|
</fo:table-row>
|
10309
10264
|
</xsl:template>
|
@@ -11825,7 +11780,7 @@
|
|
11825
11780
|
</tbody>
|
11826
11781
|
</xsl:variable>
|
11827
11782
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
11828
|
-
<xsl:call-template name="calculate-column-widths">
|
11783
|
+
<xsl:call-template name="calculate-column-widths-proportional">
|
11829
11784
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
11830
11785
|
<xsl:with-param name="table" select="$toc_table_simple"/>
|
11831
11786
|
</xsl:call-template>
|