metanorma-un 0.9.6 → 0.9.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +1 -1
- data/.github/workflows/release.yml +24 -0
- data/lib/isodoc/un/html/html_unece_plenary_titlepage.html +1 -1
- data/lib/isodoc/un/html/html_unece_titlepage.html +1 -1
- data/lib/isodoc/un/un.plenary-attachment.xsl +117 -152
- data/lib/isodoc/un/un.plenary.xsl +117 -152
- data/lib/isodoc/un/un.recommendation.xsl +117 -152
- data/lib/metanorma/un/biblio.rng +8 -5
- data/lib/metanorma/un/converter.rb +3 -0
- data/lib/metanorma/un/version.rb +1 -1
- data/lib/metanorma-un.rb +2 -1
- data/{metanorma-unece.gemspec → metanorma-un.gemspec} +0 -0
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85830860166400cc933e9de235168b0582c931f951ca3505fd91fa5cc3fa93f6
|
4
|
+
data.tar.gz: 3ca4eea4370b0cc7c1230f15dce0e69e1d849f9146ade8ae0210264cdbefb5c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6221a66550dc77932cfec10479396c6da31df610dfe7b0e9c776b42541a5611f3075296da4808ee810b55e9e496676d302afdeede6f989215ff47dc05e616185
|
7
|
+
data.tar.gz: 9755fd6f9158ed152e57c8e129921e5252ca00675fa73a6c4a2a8d26fe3eb731914a54b464175ac3e71328ab06d66566ff5fdc0da1310583e091c9fd8591765a
|
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
|
+
|
@@ -774,8 +774,18 @@
|
|
774
774
|
|
775
775
|
<xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
|
776
776
|
|
777
|
+
<xsl:variable name="isApplyAutolayoutAlgorithm_">
|
778
|
+
true
|
779
|
+
</xsl:variable>
|
780
|
+
<xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
|
781
|
+
|
777
782
|
<xsl:variable name="isGenerateTableIF_">
|
778
|
-
|
783
|
+
<xsl:choose>
|
784
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
|
785
|
+
<xsl:value-of select="normalize-space($table_if) = 'true'"/>
|
786
|
+
</xsl:when>
|
787
|
+
<xsl:otherwise>false</xsl:otherwise>
|
788
|
+
</xsl:choose>
|
779
789
|
</xsl:variable>
|
780
790
|
<xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
|
781
791
|
|
@@ -1184,6 +1194,9 @@
|
|
1184
1194
|
<xsl:attribute-set name="import-style">
|
1185
1195
|
</xsl:attribute-set>
|
1186
1196
|
|
1197
|
+
<xsl:attribute-set name="component-style">
|
1198
|
+
</xsl:attribute-set>
|
1199
|
+
|
1187
1200
|
<xsl:attribute-set name="recommendation-style">
|
1188
1201
|
|
1189
1202
|
</xsl:attribute-set>
|
@@ -1388,7 +1401,7 @@
|
|
1388
1401
|
</xsl:attribute-set>
|
1389
1402
|
|
1390
1403
|
<xsl:attribute-set name="dt-block-style">
|
1391
|
-
<xsl:attribute name="margin-top">
|
1404
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
1392
1405
|
|
1393
1406
|
</xsl:attribute-set>
|
1394
1407
|
|
@@ -2332,6 +2345,7 @@
|
|
2332
2345
|
|
2333
2346
|
<xsl:variable name="margin-side">
|
2334
2347
|
<xsl:choose>
|
2348
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">0</xsl:when>
|
2335
2349
|
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
2336
2350
|
<xsl:otherwise>0</xsl:otherwise>
|
2337
2351
|
</xsl:choose>
|
@@ -2405,6 +2419,7 @@
|
|
2405
2419
|
</td>
|
2406
2420
|
</tr>
|
2407
2421
|
-->
|
2422
|
+
<!-- Simple_table=<xsl:copy-of select="$simple-table"/> -->
|
2408
2423
|
<xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
|
2409
2424
|
|
2410
2425
|
</xsl:when>
|
@@ -2536,12 +2551,17 @@
|
|
2536
2551
|
<xsl:template name="calculate-column-widths">
|
2537
2552
|
<xsl:param name="table"/>
|
2538
2553
|
<xsl:param name="cols-count"/>
|
2539
|
-
|
2554
|
+
<xsl:choose>
|
2555
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
|
2556
|
+
<xsl:call-template name="get-calculated-column-widths-autolayout-algorithm"/>
|
2557
|
+
</xsl:when>
|
2558
|
+
<xsl:otherwise>
|
2540
2559
|
<xsl:call-template name="calculate-column-widths-proportional">
|
2541
2560
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2542
2561
|
<xsl:with-param name="table" select="$table"/>
|
2543
2562
|
</xsl:call-template>
|
2544
|
-
|
2563
|
+
</xsl:otherwise>
|
2564
|
+
</xsl:choose>
|
2545
2565
|
</xsl:template>
|
2546
2566
|
|
2547
2567
|
<!-- ================================================== -->
|
@@ -2719,6 +2739,7 @@
|
|
2719
2739
|
<!-- (https://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2) -->
|
2720
2740
|
<!-- ================================================== -->
|
2721
2741
|
|
2742
|
+
<!-- INPUT: table with columns widths, generated by table_if.xsl -->
|
2722
2743
|
<xsl:template name="calculate-column-widths-autolayout-algorithm">
|
2723
2744
|
<xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
|
2724
2745
|
|
@@ -2730,67 +2751,6 @@
|
|
2730
2751
|
|
2731
2752
|
<!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
|
2732
2753
|
|
2733
|
-
<!-- get current table id -->
|
2734
|
-
<xsl:variable name="table_id" select="@id"/>
|
2735
|
-
<!-- find table by id in the file 'table_widths' -->
|
2736
|
-
<!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
|
2737
|
-
<xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
|
2738
|
-
|
2739
|
-
<!-- table='<xsl:copy-of select="$table"/>' -->
|
2740
|
-
<!-- table_id='<xsl:value-of select="$table_id"/>\ -->
|
2741
|
-
<!-- table-if='<xsl:copy-of select="$table-if"/>' -->
|
2742
|
-
<!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
|
2743
|
-
|
2744
|
-
<xsl:variable name="table_with_cell_widths_">
|
2745
|
-
<xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
|
2746
|
-
</xsl:variable>
|
2747
|
-
<xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
|
2748
|
-
|
2749
|
-
<!-- <xsl:if test="$table_if_debug = 'true'">
|
2750
|
-
<xsl:copy-of select="$table_with_cell_widths"/>
|
2751
|
-
</xsl:if> -->
|
2752
|
-
|
2753
|
-
<!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
|
2754
|
-
|
2755
|
-
<xsl:variable name="column_widths_">
|
2756
|
-
<!-- iteration of columns -->
|
2757
|
-
<xsl:for-each select="$table_with_cell_widths//tr[1]/td">
|
2758
|
-
<xsl:variable name="pos" select="position()"/>
|
2759
|
-
<column>
|
2760
|
-
<xsl:attribute name="width_max">
|
2761
|
-
<xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
|
2762
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
2763
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
2764
|
-
</xsl:for-each>
|
2765
|
-
</xsl:attribute>
|
2766
|
-
<xsl:attribute name="width_min">
|
2767
|
-
<xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
|
2768
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
2769
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
2770
|
-
</xsl:for-each>
|
2771
|
-
</xsl:attribute>
|
2772
|
-
</column>
|
2773
|
-
</xsl:for-each>
|
2774
|
-
</xsl:variable>
|
2775
|
-
<xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
|
2776
|
-
|
2777
|
-
<!-- <column_widths>
|
2778
|
-
<xsl:copy-of select="$column_widths"/>
|
2779
|
-
</column_widths> -->
|
2780
|
-
|
2781
|
-
<!-- These in turn, are used to find the minimum and maximum width for the table. -->
|
2782
|
-
<xsl:variable name="table_widths_">
|
2783
|
-
<table>
|
2784
|
-
<xsl:attribute name="width_max">
|
2785
|
-
<xsl:value-of select="sum($column_widths/column/@width_max)"/>
|
2786
|
-
</xsl:attribute>
|
2787
|
-
<xsl:attribute name="width_min">
|
2788
|
-
<xsl:value-of select="sum($column_widths/column/@width_min)"/>
|
2789
|
-
</xsl:attribute>
|
2790
|
-
</table>
|
2791
|
-
</xsl:variable>
|
2792
|
-
<xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
|
2793
|
-
|
2794
2754
|
<xsl:variable name="page_width">
|
2795
2755
|
<xsl:choose>
|
2796
2756
|
<xsl:when test="$parent_table_page-width != ''">
|
@@ -2803,16 +2763,13 @@
|
|
2803
2763
|
</xsl:variable>
|
2804
2764
|
|
2805
2765
|
<xsl:if test="$table_if_debug = 'true'">
|
2806
|
-
<
|
2807
|
-
<xsl:copy-of select="$table_widths"/>
|
2808
|
-
</table_width>
|
2809
|
-
<debug>$page_width=<xsl:value-of select="$page_width"/></debug>
|
2766
|
+
<page_width><xsl:value-of select="$page_width"/></page_width>
|
2810
2767
|
</xsl:if>
|
2811
2768
|
|
2812
2769
|
<!-- There are three cases: -->
|
2813
2770
|
<xsl:choose>
|
2814
2771
|
<!-- 1. The minimum table width is equal to or wider than the available space -->
|
2815
|
-
<xsl:when test="
|
2772
|
+
<xsl:when test="@width_min >= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
|
2816
2773
|
<!-- call old algorithm -->
|
2817
2774
|
<case1/>
|
2818
2775
|
<!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
|
@@ -2822,10 +2779,10 @@
|
|
2822
2779
|
</xsl:call-template> -->
|
2823
2780
|
</xsl:when>
|
2824
2781
|
<!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
|
2825
|
-
<xsl:when test="
|
2782
|
+
<xsl:when test="@width_max <= $page_width">
|
2826
2783
|
<case2/>
|
2827
2784
|
<autolayout/>
|
2828
|
-
<xsl:for-each select="
|
2785
|
+
<xsl:for-each select="column/@width_max">
|
2829
2786
|
<column divider="100"><xsl:value-of select="."/></column>
|
2830
2787
|
</xsl:for-each>
|
2831
2788
|
</xsl:when>
|
@@ -2835,19 +2792,19 @@
|
|
2835
2792
|
For each column, let d be the difference between maximum and minimum width of that column.
|
2836
2793
|
Now set the column's width to the minimum width plus d times W over D.
|
2837
2794
|
This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
|
2838
|
-
<xsl:when test="(
|
2795
|
+
<xsl:when test="(@width_max > $page_width and @width_min < $page_width) or (@width_min >= $page_width)">
|
2839
2796
|
<!-- difference between the available space and the minimum table width -->
|
2840
|
-
<xsl:variable name="W" select="$page_width -
|
2797
|
+
<xsl:variable name="W" select="$page_width - @width_min"/>
|
2841
2798
|
<W><xsl:value-of select="$W"/></W>
|
2842
2799
|
<!-- difference between maximum and minimum width of the table -->
|
2843
|
-
<xsl:variable name="D" select="
|
2800
|
+
<xsl:variable name="D" select="@width_max - @width_min"/>
|
2844
2801
|
<D><xsl:value-of select="$D"/></D>
|
2845
2802
|
<case3/>
|
2846
2803
|
<autolayout/>
|
2847
|
-
<xsl:if test="
|
2804
|
+
<xsl:if test="@width_min >= $page_width">
|
2848
2805
|
<split_keep-within-line>true</split_keep-within-line>
|
2849
2806
|
</xsl:if>
|
2850
|
-
<xsl:for-each select="
|
2807
|
+
<xsl:for-each select="column">
|
2851
2808
|
<!-- difference between maximum and minimum width of that column. -->
|
2852
2809
|
<xsl:variable name="d" select="@width_max - @width_min"/>
|
2853
2810
|
<d><xsl:value-of select="$d"/></d>
|
@@ -2873,23 +2830,39 @@
|
|
2873
2830
|
|
2874
2831
|
<parent_element><xsl:value-of select="local-name(..)"/></parent_element>
|
2875
2832
|
|
2833
|
+
<ancestor_tree>
|
2834
|
+
<xsl:for-each select="ancestor::*">
|
2835
|
+
<ancestor><xsl:value-of select="local-name()"/></ancestor>
|
2836
|
+
</xsl:for-each>
|
2837
|
+
</ancestor_tree>
|
2838
|
+
|
2876
2839
|
<xsl:variable name="parent_table_page-width_">
|
2877
2840
|
<xsl:if test="$parent_table_id != ''">
|
2878
2841
|
<!-- determine column number in the parent table -->
|
2879
2842
|
<xsl:variable name="parent_table_column_number">
|
2880
2843
|
<xsl:choose>
|
2881
|
-
<xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
|
2844
|
+
<!-- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when> -->
|
2845
|
+
<xsl:when test="(ancestor::*[local-name() = 'dd' or local-name() = 'table' or local-name() = 'dl'])[last()][local-name() = 'dd' or local-name() = 'dl']">2</xsl:when>
|
2882
2846
|
<xsl:otherwise> <!-- parent is table -->
|
2883
2847
|
<xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
|
2884
2848
|
</xsl:otherwise>
|
2885
2849
|
</xsl:choose>
|
2886
2850
|
</xsl:variable>
|
2887
2851
|
<!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
|
2888
|
-
|
2852
|
+
|
2853
|
+
<xsl:variable name="parent_table_column_" select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
|
2854
|
+
<xsl:variable name="parent_table_column" select="xalan:nodeset($parent_table_column_)"/>
|
2855
|
+
<!-- <xsl:variable name="divider">
|
2856
|
+
<xsl:value-of select="$parent_table_column/@divider"/>
|
2857
|
+
<xsl:if test="not($parent_table_column/@divider)">1</xsl:if>
|
2858
|
+
</xsl:variable> -->
|
2859
|
+
<xsl:value-of select="$parent_table_column/text()"/> <!-- * 10 -->
|
2889
2860
|
</xsl:if>
|
2890
2861
|
</xsl:variable>
|
2891
2862
|
<xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
|
2892
2863
|
|
2864
|
+
<parent_table_page-width><xsl:value-of select="$parent_table_page-width"/></parent_table_page-width>
|
2865
|
+
|
2893
2866
|
<!-- get current table id -->
|
2894
2867
|
<xsl:variable name="table_id" select="@id"/>
|
2895
2868
|
|
@@ -2910,50 +2883,6 @@
|
|
2910
2883
|
|
2911
2884
|
</xsl:template> <!-- get-calculated-column-widths-autolayout-algorithm -->
|
2912
2885
|
|
2913
|
-
<!-- ============================= -->
|
2914
|
-
<!-- mode: determine_cell_widths-if -->
|
2915
|
-
<!-- ============================= -->
|
2916
|
-
<xsl:template match="@*|node()" mode="determine_cell_widths-if">
|
2917
|
-
<xsl:copy>
|
2918
|
-
<xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
|
2919
|
-
</xsl:copy>
|
2920
|
-
</xsl:template>
|
2921
|
-
|
2922
|
-
<xsl:template match="td | th" mode="determine_cell_widths-if">
|
2923
|
-
<xsl:copy>
|
2924
|
-
<xsl:copy-of select="@*"/>
|
2925
|
-
|
2926
|
-
<!-- The maximum width is given by the widest line. -->
|
2927
|
-
<xsl:attribute name="width_max">
|
2928
|
-
<xsl:for-each select="p_len">
|
2929
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
2930
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
2931
|
-
</xsl:for-each>
|
2932
|
-
</xsl:attribute>
|
2933
|
-
|
2934
|
-
<!-- The minimum width is given by the widest text element (word, image, etc.) -->
|
2935
|
-
<xsl:variable name="width_min">
|
2936
|
-
<xsl:for-each select="word_len">
|
2937
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
2938
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
2939
|
-
</xsl:for-each>
|
2940
|
-
</xsl:variable>
|
2941
|
-
<xsl:attribute name="width_min">
|
2942
|
-
<xsl:value-of select="$width_min"/>
|
2943
|
-
</xsl:attribute>
|
2944
|
-
|
2945
|
-
<xsl:if test="$width_min = 0">
|
2946
|
-
<xsl:attribute name="width_min">1</xsl:attribute>
|
2947
|
-
</xsl:if>
|
2948
|
-
|
2949
|
-
<xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
|
2950
|
-
|
2951
|
-
</xsl:copy>
|
2952
|
-
</xsl:template>
|
2953
|
-
<!-- ============================= -->
|
2954
|
-
<!-- END mode: determine_cell_widths-if -->
|
2955
|
-
<!-- ============================= -->
|
2956
|
-
|
2957
2886
|
<!-- ================================================== -->
|
2958
2887
|
<!-- Calculate column's width based on HTML4 algorithm -->
|
2959
2888
|
<!-- ================================================== -->
|
@@ -3144,6 +3073,7 @@
|
|
3144
3073
|
<xsl:when test="$table_or_dl = 'table'">
|
3145
3074
|
<xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
|
3146
3075
|
<fo:table-row number-columns-spanned="{$col_count}">
|
3076
|
+
<xsl:copy-of select="../@font-weight"/>
|
3147
3077
|
<!-- <test_table><xsl:copy-of select="."/></test_table> -->
|
3148
3078
|
<xsl:call-template name="td"/>
|
3149
3079
|
</fo:table-row>
|
@@ -3294,7 +3224,7 @@
|
|
3294
3224
|
|
3295
3225
|
<xsl:apply-templates/>
|
3296
3226
|
|
3297
|
-
<xsl:if test="$isGenerateTableIF = 'true'"
|
3227
|
+
<xsl:if test="$isGenerateTableIF = 'true'"> <fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
|
3298
3228
|
|
3299
3229
|
</fo:block>
|
3300
3230
|
</fo:table-cell>
|
@@ -3624,6 +3554,7 @@
|
|
3624
3554
|
<xsl:template match="*[local-name()='dl']">
|
3625
3555
|
<xsl:variable name="isAdded" select="@added"/>
|
3626
3556
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
3557
|
+
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
3627
3558
|
<fo:block-container>
|
3628
3559
|
|
3629
3560
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -4157,21 +4088,16 @@
|
|
4157
4088
|
<!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
|
4158
4089
|
<xsl:template match="*[local-name()='dt']" mode="dl_if">
|
4159
4090
|
<xsl:param name="id"/>
|
4160
|
-
<xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
|
4161
4091
|
<tr>
|
4162
4092
|
<td>
|
4163
4093
|
<xsl:copy-of select="node()"/>
|
4164
4094
|
</td>
|
4165
4095
|
<td>
|
4166
|
-
|
4167
|
-
|
4168
|
-
|
4169
|
-
<!-- get paragraphs from nested 'dl' -->
|
4170
|
-
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
4171
|
-
|
4096
|
+
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
|
4097
|
+
<!-- get paragraphs from nested 'dl' -->
|
4098
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
4172
4099
|
</td>
|
4173
4100
|
</tr>
|
4174
|
-
|
4175
4101
|
</xsl:template>
|
4176
4102
|
<xsl:template match="*[local-name()='dd']" mode="dl_if"/>
|
4177
4103
|
|
@@ -4822,6 +4748,9 @@
|
|
4822
4748
|
<xsl:variable name="td">
|
4823
4749
|
<xsl:element name="td">
|
4824
4750
|
<xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
|
4751
|
+
<xsl:if test="local-name()='th'">
|
4752
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4753
|
+
</xsl:if>
|
4825
4754
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
4826
4755
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
4827
4756
|
</xsl:element>
|
@@ -4834,6 +4763,9 @@
|
|
4834
4763
|
<xsl:otherwise>
|
4835
4764
|
<xsl:element name="td">
|
4836
4765
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
4766
|
+
<xsl:if test="local-name()='th'">
|
4767
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4768
|
+
</xsl:if>
|
4837
4769
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
4838
4770
|
</xsl:element>
|
4839
4771
|
</xsl:otherwise>
|
@@ -4963,8 +4895,14 @@
|
|
4963
4895
|
<xsl:copy-of select="@*"/>
|
4964
4896
|
<xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
|
4965
4897
|
<xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
|
4898
|
+
<xsl:variable name="divide">
|
4899
|
+
<xsl:choose>
|
4900
|
+
<xsl:when test="@divide"><xsl:value-of select="@divide"/></xsl:when>
|
4901
|
+
<xsl:otherwise>1</xsl:otherwise>
|
4902
|
+
</xsl:choose>
|
4903
|
+
</xsl:variable>
|
4966
4904
|
<xsl:attribute name="id">
|
4967
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
|
4905
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
|
4968
4906
|
</xsl:attribute>
|
4969
4907
|
|
4970
4908
|
<xsl:for-each select="*[local-name() = 'p']">
|
@@ -4972,10 +4910,12 @@
|
|
4972
4910
|
<xsl:copy-of select="@*"/>
|
4973
4911
|
<xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
|
4974
4912
|
<xsl:attribute name="id">
|
4975
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
|
4913
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
|
4976
4914
|
</xsl:attribute>
|
4977
4915
|
|
4978
|
-
<xsl:copy-of select="node()"/>
|
4916
|
+
<!-- <xsl:copy-of select="node()" /> -->
|
4917
|
+
<xsl:apply-templates mode="simple-table-noid"/>
|
4918
|
+
|
4979
4919
|
</xsl:copy>
|
4980
4920
|
</xsl:for-each>
|
4981
4921
|
|
@@ -5004,7 +4944,7 @@
|
|
5004
4944
|
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
|
5005
4945
|
<xsl:copy>
|
5006
4946
|
<xsl:attribute name="id">
|
5007
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
|
4947
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
|
5008
4948
|
</xsl:attribute>
|
5009
4949
|
<xsl:copy-of select="node()"/>
|
5010
4950
|
</xsl:copy>
|
@@ -5013,6 +4953,24 @@
|
|
5013
4953
|
</xsl:copy>
|
5014
4954
|
|
5015
4955
|
</xsl:template>
|
4956
|
+
|
4957
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p']//*" mode="simple-table-noid">
|
4958
|
+
<xsl:copy>
|
4959
|
+
<xsl:choose>
|
4960
|
+
<xsl:when test="$isGenerateTableIF = 'true'">
|
4961
|
+
<xsl:copy-of select="@*[local-name() != 'id']"/> <!-- to prevent repeat id in colspan/rowspan cells -->
|
4962
|
+
<!-- <xsl:if test="local-name() = 'dl' or local-name() = 'table'">
|
4963
|
+
<xsl:copy-of select="@id"/>
|
4964
|
+
</xsl:if> -->
|
4965
|
+
</xsl:when>
|
4966
|
+
<xsl:otherwise>
|
4967
|
+
<xsl:copy-of select="@*"/>
|
4968
|
+
</xsl:otherwise>
|
4969
|
+
</xsl:choose>
|
4970
|
+
<xsl:apply-templates select="node()" mode="simple-table-noid"/>
|
4971
|
+
</xsl:copy>
|
4972
|
+
</xsl:template>
|
4973
|
+
|
5016
4974
|
<!-- End mode: simple-table-id -->
|
5017
4975
|
<!-- ===================== -->
|
5018
4976
|
<!-- ===================== -->
|
@@ -5022,7 +4980,7 @@
|
|
5022
4980
|
<!-- =============================== -->
|
5023
4981
|
<xsl:template match="@*|node()" mode="td_text_with_formatting">
|
5024
4982
|
<xsl:copy>
|
5025
|
-
|
4983
|
+
<xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
|
5026
4984
|
</xsl:copy>
|
5027
4985
|
</xsl:template>
|
5028
4986
|
|
@@ -5136,6 +5094,10 @@
|
|
5136
5094
|
|
5137
5095
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
5138
5096
|
|
5097
|
+
<xsl:if test="$isGenerateTableIF = 'true' and ancestor::*[local-name() = 'td' or local-name() = 'th' or local-name() = 'dl'] and not(following-sibling::node()[not(self::comment())][normalize-space() != ''])"> <!-- math in table cell, and math is last element -->
|
5098
|
+
<!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
|
5099
|
+
</xsl:if>
|
5100
|
+
|
5139
5101
|
<xsl:call-template name="setTrackChangesStyles">
|
5140
5102
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
5141
5103
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
@@ -7029,41 +6991,47 @@
|
|
7029
6991
|
</fo:block>
|
7030
6992
|
</xsl:template>
|
7031
6993
|
|
7032
|
-
<xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
6994
|
+
<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']">
|
7033
6995
|
<fo:block xsl:use-attribute-sets="inherit-style">
|
7034
6996
|
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
7035
6997
|
</fo:block>
|
7036
6998
|
</xsl:template>
|
7037
6999
|
|
7038
|
-
<xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
7000
|
+
<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']">
|
7039
7001
|
<fo:block xsl:use-attribute-sets="description-style">
|
7040
7002
|
<xsl:apply-templates/>
|
7041
7003
|
</fo:block>
|
7042
7004
|
</xsl:template>
|
7043
7005
|
|
7044
|
-
<xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
7006
|
+
<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']">
|
7045
7007
|
<fo:block xsl:use-attribute-sets="specification-style">
|
7046
7008
|
<xsl:apply-templates/>
|
7047
7009
|
</fo:block>
|
7048
7010
|
</xsl:template>
|
7049
7011
|
|
7050
|
-
<xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
7012
|
+
<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']">
|
7051
7013
|
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
7052
7014
|
<xsl:apply-templates/>
|
7053
7015
|
</fo:block>
|
7054
7016
|
</xsl:template>
|
7055
7017
|
|
7056
|
-
<xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
7018
|
+
<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']">
|
7057
7019
|
<fo:block xsl:use-attribute-sets="verification-style">
|
7058
7020
|
<xsl:apply-templates/>
|
7059
7021
|
</fo:block>
|
7060
7022
|
</xsl:template>
|
7061
7023
|
|
7062
|
-
<xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
7024
|
+
<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']">
|
7063
7025
|
<fo:block xsl:use-attribute-sets="import-style">
|
7064
7026
|
<xsl:apply-templates/>
|
7065
7027
|
</fo:block>
|
7066
7028
|
</xsl:template>
|
7029
|
+
|
7030
|
+
<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')]">
|
7031
|
+
<fo:block xsl:use-attribute-sets="component-style">
|
7032
|
+
<xsl:apply-templates/>
|
7033
|
+
</fo:block>
|
7034
|
+
</xsl:template>
|
7067
7035
|
<!-- ========== -->
|
7068
7036
|
<!-- END -->
|
7069
7037
|
<!-- ========== -->
|
@@ -7119,15 +7087,12 @@
|
|
7119
7087
|
|
7120
7088
|
<xsl:template match="*[local-name()='tr']" mode="requirement">
|
7121
7089
|
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
7122
|
-
|
7123
|
-
|
7124
|
-
|
7125
|
-
|
7126
|
-
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
7127
|
-
</xsl:if>
|
7128
|
-
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
7129
|
-
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
7090
|
+
|
7091
|
+
<xsl:if test="parent::*[local-name()='thead'] or starts-with(*[local-name()='td' or local-name()='th'][1], 'Requirement ') or starts-with(*[local-name()='td' or local-name()='th'][1], 'Recommendation ')">
|
7092
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
7093
|
+
|
7130
7094
|
</xsl:if>
|
7095
|
+
|
7131
7096
|
<xsl:apply-templates mode="requirement"/>
|
7132
7097
|
</fo:table-row>
|
7133
7098
|
</xsl:template>
|
@@ -8605,7 +8570,7 @@
|
|
8605
8570
|
</tbody>
|
8606
8571
|
</xsl:variable>
|
8607
8572
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
8608
|
-
<xsl:call-template name="calculate-column-widths">
|
8573
|
+
<xsl:call-template name="calculate-column-widths-proportional">
|
8609
8574
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
8610
8575
|
<xsl:with-param name="table" select="$toc_table_simple"/>
|
8611
8576
|
</xsl:call-template>
|