metanorma-ogc 2.2.0 → 2.2.2
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/ogc/html/htmlstyle.scss +1 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +128 -153
- data/lib/isodoc/ogc/ogc.best-practice.xsl +128 -153
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +128 -153
- data/lib/isodoc/ogc/ogc.community-practice.xsl +128 -153
- data/lib/isodoc/ogc/ogc.community-standard.xsl +128 -153
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +128 -153
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +128 -153
- data/lib/isodoc/ogc/ogc.other.xsl +128 -153
- data/lib/isodoc/ogc/ogc.policy.xsl +128 -153
- data/lib/isodoc/ogc/ogc.reference-model.xsl +128 -153
- data/lib/isodoc/ogc/ogc.release-notes.xsl +128 -153
- data/lib/isodoc/ogc/ogc.standard.xsl +128 -153
- data/lib/isodoc/ogc/ogc.test-suite.xsl +128 -153
- data/lib/isodoc/ogc/ogc.user-guide.xsl +128 -153
- data/lib/isodoc/ogc/ogc.white-paper.xsl +128 -153
- data/lib/isodoc/ogc/presentation_xml_convert.rb +7 -12
- data/lib/isodoc/ogc/xref.rb +0 -125
- data/lib/metanorma/ogc/biblio.rng +8 -5
- data/lib/metanorma/ogc/cleanup.rb +68 -97
- data/lib/metanorma/ogc/converter.rb +4 -10
- data/lib/metanorma/ogc/validate.rb +0 -45
- data/lib/metanorma/ogc/version.rb +1 -1
- data/lib/metanorma-ogc.rb +2 -1
- data/lib/relaton/render/config.yml +27 -3
- data/metanorma-ogc.gemspec +2 -0
- metadata +35 -14
- data/lib/isodoc/ogc/html/_coverpage.css +0 -205
- data/lib/isodoc/ogc/html/htmlstyle.css +0 -1149
- data/lib/isodoc/ogc/html/ogc.css +0 -861
- data/lib/isodoc/ogc/html/ogc_wp.css +0 -774
- data/lib/isodoc/ogc/html/wordstyle.css +0 -1344
- data/lib/isodoc/ogc/html/wordstyle_wp.css +0 -1270
- data/lib/isodoc/ogc/reqt.rb +0 -215
- data/lib/isodoc/ogc/reqt_helper.rb +0 -83
@@ -659,8 +659,18 @@
|
|
659
659
|
|
660
660
|
<xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
|
661
661
|
|
662
|
+
<xsl:variable name="isApplyAutolayoutAlgorithm_">
|
663
|
+
true
|
664
|
+
</xsl:variable>
|
665
|
+
<xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
|
666
|
+
|
662
667
|
<xsl:variable name="isGenerateTableIF_">
|
663
|
-
|
668
|
+
<xsl:choose>
|
669
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
|
670
|
+
<xsl:value-of select="normalize-space($table_if) = 'true'"/>
|
671
|
+
</xsl:when>
|
672
|
+
<xsl:otherwise>false</xsl:otherwise>
|
673
|
+
</xsl:choose>
|
664
674
|
</xsl:variable>
|
665
675
|
<xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
|
666
676
|
|
@@ -1121,6 +1131,9 @@
|
|
1121
1131
|
<xsl:attribute-set name="import-style">
|
1122
1132
|
</xsl:attribute-set>
|
1123
1133
|
|
1134
|
+
<xsl:attribute-set name="component-style">
|
1135
|
+
</xsl:attribute-set>
|
1136
|
+
|
1124
1137
|
<xsl:attribute-set name="recommendation-style">
|
1125
1138
|
|
1126
1139
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -1335,9 +1348,8 @@
|
|
1335
1348
|
</xsl:attribute-set>
|
1336
1349
|
|
1337
1350
|
<xsl:attribute-set name="dt-block-style">
|
1338
|
-
<xsl:attribute name="margin-top">
|
1351
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
1339
1352
|
|
1340
|
-
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
1341
1353
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1342
1354
|
|
1343
1355
|
</xsl:attribute-set>
|
@@ -2369,6 +2381,7 @@
|
|
2369
2381
|
|
2370
2382
|
<xsl:variable name="margin-side">
|
2371
2383
|
<xsl:choose>
|
2384
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">0</xsl:when>
|
2372
2385
|
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
2373
2386
|
<xsl:otherwise>0</xsl:otherwise>
|
2374
2387
|
</xsl:choose>
|
@@ -2436,6 +2449,7 @@
|
|
2436
2449
|
</td>
|
2437
2450
|
</tr>
|
2438
2451
|
-->
|
2452
|
+
<!-- Simple_table=<xsl:copy-of select="$simple-table"/> -->
|
2439
2453
|
<xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
|
2440
2454
|
|
2441
2455
|
</xsl:when>
|
@@ -2569,12 +2583,17 @@
|
|
2569
2583
|
<xsl:template name="calculate-column-widths">
|
2570
2584
|
<xsl:param name="table"/>
|
2571
2585
|
<xsl:param name="cols-count"/>
|
2572
|
-
|
2586
|
+
<xsl:choose>
|
2587
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
|
2588
|
+
<xsl:call-template name="get-calculated-column-widths-autolayout-algorithm"/>
|
2589
|
+
</xsl:when>
|
2590
|
+
<xsl:otherwise>
|
2573
2591
|
<xsl:call-template name="calculate-column-widths-proportional">
|
2574
2592
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2575
2593
|
<xsl:with-param name="table" select="$table"/>
|
2576
2594
|
</xsl:call-template>
|
2577
|
-
|
2595
|
+
</xsl:otherwise>
|
2596
|
+
</xsl:choose>
|
2578
2597
|
</xsl:template>
|
2579
2598
|
|
2580
2599
|
<!-- ================================================== -->
|
@@ -2752,6 +2771,7 @@
|
|
2752
2771
|
<!-- (https://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2) -->
|
2753
2772
|
<!-- ================================================== -->
|
2754
2773
|
|
2774
|
+
<!-- INPUT: table with columns widths, generated by table_if.xsl -->
|
2755
2775
|
<xsl:template name="calculate-column-widths-autolayout-algorithm">
|
2756
2776
|
<xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
|
2757
2777
|
|
@@ -2763,67 +2783,6 @@
|
|
2763
2783
|
|
2764
2784
|
<!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
|
2765
2785
|
|
2766
|
-
<!-- get current table id -->
|
2767
|
-
<xsl:variable name="table_id" select="@id"/>
|
2768
|
-
<!-- find table by id in the file 'table_widths' -->
|
2769
|
-
<!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
|
2770
|
-
<xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
|
2771
|
-
|
2772
|
-
<!-- table='<xsl:copy-of select="$table"/>' -->
|
2773
|
-
<!-- table_id='<xsl:value-of select="$table_id"/>\ -->
|
2774
|
-
<!-- table-if='<xsl:copy-of select="$table-if"/>' -->
|
2775
|
-
<!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
|
2776
|
-
|
2777
|
-
<xsl:variable name="table_with_cell_widths_">
|
2778
|
-
<xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
|
2779
|
-
</xsl:variable>
|
2780
|
-
<xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
|
2781
|
-
|
2782
|
-
<!-- <xsl:if test="$table_if_debug = 'true'">
|
2783
|
-
<xsl:copy-of select="$table_with_cell_widths"/>
|
2784
|
-
</xsl:if> -->
|
2785
|
-
|
2786
|
-
<!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
|
2787
|
-
|
2788
|
-
<xsl:variable name="column_widths_">
|
2789
|
-
<!-- iteration of columns -->
|
2790
|
-
<xsl:for-each select="$table_with_cell_widths//tr[1]/td">
|
2791
|
-
<xsl:variable name="pos" select="position()"/>
|
2792
|
-
<column>
|
2793
|
-
<xsl:attribute name="width_max">
|
2794
|
-
<xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
|
2795
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
2796
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
2797
|
-
</xsl:for-each>
|
2798
|
-
</xsl:attribute>
|
2799
|
-
<xsl:attribute name="width_min">
|
2800
|
-
<xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
|
2801
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
2802
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
2803
|
-
</xsl:for-each>
|
2804
|
-
</xsl:attribute>
|
2805
|
-
</column>
|
2806
|
-
</xsl:for-each>
|
2807
|
-
</xsl:variable>
|
2808
|
-
<xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
|
2809
|
-
|
2810
|
-
<!-- <column_widths>
|
2811
|
-
<xsl:copy-of select="$column_widths"/>
|
2812
|
-
</column_widths> -->
|
2813
|
-
|
2814
|
-
<!-- These in turn, are used to find the minimum and maximum width for the table. -->
|
2815
|
-
<xsl:variable name="table_widths_">
|
2816
|
-
<table>
|
2817
|
-
<xsl:attribute name="width_max">
|
2818
|
-
<xsl:value-of select="sum($column_widths/column/@width_max)"/>
|
2819
|
-
</xsl:attribute>
|
2820
|
-
<xsl:attribute name="width_min">
|
2821
|
-
<xsl:value-of select="sum($column_widths/column/@width_min)"/>
|
2822
|
-
</xsl:attribute>
|
2823
|
-
</table>
|
2824
|
-
</xsl:variable>
|
2825
|
-
<xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
|
2826
|
-
|
2827
2786
|
<xsl:variable name="page_width">
|
2828
2787
|
<xsl:choose>
|
2829
2788
|
<xsl:when test="$parent_table_page-width != ''">
|
@@ -2836,16 +2795,13 @@
|
|
2836
2795
|
</xsl:variable>
|
2837
2796
|
|
2838
2797
|
<xsl:if test="$table_if_debug = 'true'">
|
2839
|
-
<
|
2840
|
-
<xsl:copy-of select="$table_widths"/>
|
2841
|
-
</table_width>
|
2842
|
-
<debug>$page_width=<xsl:value-of select="$page_width"/></debug>
|
2798
|
+
<page_width><xsl:value-of select="$page_width"/></page_width>
|
2843
2799
|
</xsl:if>
|
2844
2800
|
|
2845
2801
|
<!-- There are three cases: -->
|
2846
2802
|
<xsl:choose>
|
2847
2803
|
<!-- 1. The minimum table width is equal to or wider than the available space -->
|
2848
|
-
<xsl:when test="
|
2804
|
+
<xsl:when test="@width_min >= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
|
2849
2805
|
<!-- call old algorithm -->
|
2850
2806
|
<case1/>
|
2851
2807
|
<!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
|
@@ -2855,10 +2811,10 @@
|
|
2855
2811
|
</xsl:call-template> -->
|
2856
2812
|
</xsl:when>
|
2857
2813
|
<!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
|
2858
|
-
<xsl:when test="
|
2814
|
+
<xsl:when test="@width_max <= $page_width">
|
2859
2815
|
<case2/>
|
2860
2816
|
<autolayout/>
|
2861
|
-
<xsl:for-each select="
|
2817
|
+
<xsl:for-each select="column/@width_max">
|
2862
2818
|
<column divider="100"><xsl:value-of select="."/></column>
|
2863
2819
|
</xsl:for-each>
|
2864
2820
|
</xsl:when>
|
@@ -2868,19 +2824,19 @@
|
|
2868
2824
|
For each column, let d be the difference between maximum and minimum width of that column.
|
2869
2825
|
Now set the column's width to the minimum width plus d times W over D.
|
2870
2826
|
This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
|
2871
|
-
<xsl:when test="(
|
2827
|
+
<xsl:when test="(@width_max > $page_width and @width_min < $page_width) or (@width_min >= $page_width)">
|
2872
2828
|
<!-- difference between the available space and the minimum table width -->
|
2873
|
-
<xsl:variable name="W" select="$page_width -
|
2829
|
+
<xsl:variable name="W" select="$page_width - @width_min"/>
|
2874
2830
|
<W><xsl:value-of select="$W"/></W>
|
2875
2831
|
<!-- difference between maximum and minimum width of the table -->
|
2876
|
-
<xsl:variable name="D" select="
|
2832
|
+
<xsl:variable name="D" select="@width_max - @width_min"/>
|
2877
2833
|
<D><xsl:value-of select="$D"/></D>
|
2878
2834
|
<case3/>
|
2879
2835
|
<autolayout/>
|
2880
|
-
<xsl:if test="
|
2836
|
+
<xsl:if test="@width_min >= $page_width">
|
2881
2837
|
<split_keep-within-line>true</split_keep-within-line>
|
2882
2838
|
</xsl:if>
|
2883
|
-
<xsl:for-each select="
|
2839
|
+
<xsl:for-each select="column">
|
2884
2840
|
<!-- difference between maximum and minimum width of that column. -->
|
2885
2841
|
<xsl:variable name="d" select="@width_max - @width_min"/>
|
2886
2842
|
<d><xsl:value-of select="$d"/></d>
|
@@ -2906,23 +2862,39 @@
|
|
2906
2862
|
|
2907
2863
|
<parent_element><xsl:value-of select="local-name(..)"/></parent_element>
|
2908
2864
|
|
2865
|
+
<ancestor_tree>
|
2866
|
+
<xsl:for-each select="ancestor::*">
|
2867
|
+
<ancestor><xsl:value-of select="local-name()"/></ancestor>
|
2868
|
+
</xsl:for-each>
|
2869
|
+
</ancestor_tree>
|
2870
|
+
|
2909
2871
|
<xsl:variable name="parent_table_page-width_">
|
2910
2872
|
<xsl:if test="$parent_table_id != ''">
|
2911
2873
|
<!-- determine column number in the parent table -->
|
2912
2874
|
<xsl:variable name="parent_table_column_number">
|
2913
2875
|
<xsl:choose>
|
2914
|
-
<xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
|
2876
|
+
<!-- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when> -->
|
2877
|
+
<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>
|
2915
2878
|
<xsl:otherwise> <!-- parent is table -->
|
2916
2879
|
<xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
|
2917
2880
|
</xsl:otherwise>
|
2918
2881
|
</xsl:choose>
|
2919
2882
|
</xsl:variable>
|
2920
2883
|
<!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
|
2921
|
-
|
2884
|
+
|
2885
|
+
<xsl:variable name="parent_table_column_" select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
|
2886
|
+
<xsl:variable name="parent_table_column" select="xalan:nodeset($parent_table_column_)"/>
|
2887
|
+
<!-- <xsl:variable name="divider">
|
2888
|
+
<xsl:value-of select="$parent_table_column/@divider"/>
|
2889
|
+
<xsl:if test="not($parent_table_column/@divider)">1</xsl:if>
|
2890
|
+
</xsl:variable> -->
|
2891
|
+
<xsl:value-of select="$parent_table_column/text()"/> <!-- * 10 -->
|
2922
2892
|
</xsl:if>
|
2923
2893
|
</xsl:variable>
|
2924
2894
|
<xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
|
2925
2895
|
|
2896
|
+
<parent_table_page-width><xsl:value-of select="$parent_table_page-width"/></parent_table_page-width>
|
2897
|
+
|
2926
2898
|
<!-- get current table id -->
|
2927
2899
|
<xsl:variable name="table_id" select="@id"/>
|
2928
2900
|
|
@@ -2943,50 +2915,6 @@
|
|
2943
2915
|
|
2944
2916
|
</xsl:template> <!-- get-calculated-column-widths-autolayout-algorithm -->
|
2945
2917
|
|
2946
|
-
<!-- ============================= -->
|
2947
|
-
<!-- mode: determine_cell_widths-if -->
|
2948
|
-
<!-- ============================= -->
|
2949
|
-
<xsl:template match="@*|node()" mode="determine_cell_widths-if">
|
2950
|
-
<xsl:copy>
|
2951
|
-
<xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
|
2952
|
-
</xsl:copy>
|
2953
|
-
</xsl:template>
|
2954
|
-
|
2955
|
-
<xsl:template match="td | th" mode="determine_cell_widths-if">
|
2956
|
-
<xsl:copy>
|
2957
|
-
<xsl:copy-of select="@*"/>
|
2958
|
-
|
2959
|
-
<!-- The maximum width is given by the widest line. -->
|
2960
|
-
<xsl:attribute name="width_max">
|
2961
|
-
<xsl:for-each select="p_len">
|
2962
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
2963
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
2964
|
-
</xsl:for-each>
|
2965
|
-
</xsl:attribute>
|
2966
|
-
|
2967
|
-
<!-- The minimum width is given by the widest text element (word, image, etc.) -->
|
2968
|
-
<xsl:variable name="width_min">
|
2969
|
-
<xsl:for-each select="word_len">
|
2970
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
2971
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
2972
|
-
</xsl:for-each>
|
2973
|
-
</xsl:variable>
|
2974
|
-
<xsl:attribute name="width_min">
|
2975
|
-
<xsl:value-of select="$width_min"/>
|
2976
|
-
</xsl:attribute>
|
2977
|
-
|
2978
|
-
<xsl:if test="$width_min = 0">
|
2979
|
-
<xsl:attribute name="width_min">1</xsl:attribute>
|
2980
|
-
</xsl:if>
|
2981
|
-
|
2982
|
-
<xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
|
2983
|
-
|
2984
|
-
</xsl:copy>
|
2985
|
-
</xsl:template>
|
2986
|
-
<!-- ============================= -->
|
2987
|
-
<!-- END mode: determine_cell_widths-if -->
|
2988
|
-
<!-- ============================= -->
|
2989
|
-
|
2990
2918
|
<!-- ================================================== -->
|
2991
2919
|
<!-- Calculate column's width based on HTML4 algorithm -->
|
2992
2920
|
<!-- ================================================== -->
|
@@ -3177,6 +3105,7 @@
|
|
3177
3105
|
<xsl:when test="$table_or_dl = 'table'">
|
3178
3106
|
<xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
|
3179
3107
|
<fo:table-row number-columns-spanned="{$col_count}">
|
3108
|
+
<xsl:copy-of select="../@font-weight"/>
|
3180
3109
|
<!-- <test_table><xsl:copy-of select="."/></test_table> -->
|
3181
3110
|
<xsl:call-template name="td"/>
|
3182
3111
|
</fo:table-row>
|
@@ -3323,7 +3252,7 @@
|
|
3323
3252
|
|
3324
3253
|
<xsl:apply-templates/>
|
3325
3254
|
|
3326
|
-
<xsl:if test="$isGenerateTableIF = 'true'"
|
3255
|
+
<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"/> -->
|
3327
3256
|
|
3328
3257
|
</fo:block>
|
3329
3258
|
</fo:table-cell>
|
@@ -3660,6 +3589,7 @@
|
|
3660
3589
|
<xsl:template match="*[local-name()='dl']">
|
3661
3590
|
<xsl:variable name="isAdded" select="@added"/>
|
3662
3591
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
3592
|
+
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
3663
3593
|
<fo:block-container>
|
3664
3594
|
|
3665
3595
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -4193,21 +4123,16 @@
|
|
4193
4123
|
<!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
|
4194
4124
|
<xsl:template match="*[local-name()='dt']" mode="dl_if">
|
4195
4125
|
<xsl:param name="id"/>
|
4196
|
-
<xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
|
4197
4126
|
<tr>
|
4198
4127
|
<td>
|
4199
4128
|
<xsl:copy-of select="node()"/>
|
4200
4129
|
</td>
|
4201
4130
|
<td>
|
4202
|
-
|
4203
|
-
|
4204
|
-
|
4205
|
-
<!-- get paragraphs from nested 'dl' -->
|
4206
|
-
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
4207
|
-
|
4131
|
+
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
|
4132
|
+
<!-- get paragraphs from nested 'dl' -->
|
4133
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
4208
4134
|
</td>
|
4209
4135
|
</tr>
|
4210
|
-
|
4211
4136
|
</xsl:template>
|
4212
4137
|
<xsl:template match="*[local-name()='dd']" mode="dl_if"/>
|
4213
4138
|
|
@@ -4861,6 +4786,9 @@
|
|
4861
4786
|
<xsl:variable name="td">
|
4862
4787
|
<xsl:element name="td">
|
4863
4788
|
<xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
|
4789
|
+
<xsl:if test="local-name()='th'">
|
4790
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4791
|
+
</xsl:if>
|
4864
4792
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
4865
4793
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
4866
4794
|
</xsl:element>
|
@@ -4873,6 +4801,9 @@
|
|
4873
4801
|
<xsl:otherwise>
|
4874
4802
|
<xsl:element name="td">
|
4875
4803
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
4804
|
+
<xsl:if test="local-name()='th'">
|
4805
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4806
|
+
</xsl:if>
|
4876
4807
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
4877
4808
|
</xsl:element>
|
4878
4809
|
</xsl:otherwise>
|
@@ -5002,8 +4933,14 @@
|
|
5002
4933
|
<xsl:copy-of select="@*"/>
|
5003
4934
|
<xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
|
5004
4935
|
<xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
|
4936
|
+
<xsl:variable name="divide">
|
4937
|
+
<xsl:choose>
|
4938
|
+
<xsl:when test="@divide"><xsl:value-of select="@divide"/></xsl:when>
|
4939
|
+
<xsl:otherwise>1</xsl:otherwise>
|
4940
|
+
</xsl:choose>
|
4941
|
+
</xsl:variable>
|
5005
4942
|
<xsl:attribute name="id">
|
5006
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
|
4943
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
|
5007
4944
|
</xsl:attribute>
|
5008
4945
|
|
5009
4946
|
<xsl:for-each select="*[local-name() = 'p']">
|
@@ -5011,10 +4948,12 @@
|
|
5011
4948
|
<xsl:copy-of select="@*"/>
|
5012
4949
|
<xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
|
5013
4950
|
<xsl:attribute name="id">
|
5014
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
|
4951
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
|
5015
4952
|
</xsl:attribute>
|
5016
4953
|
|
5017
|
-
<xsl:copy-of select="node()"/>
|
4954
|
+
<!-- <xsl:copy-of select="node()" /> -->
|
4955
|
+
<xsl:apply-templates mode="simple-table-noid"/>
|
4956
|
+
|
5018
4957
|
</xsl:copy>
|
5019
4958
|
</xsl:for-each>
|
5020
4959
|
|
@@ -5043,7 +4982,7 @@
|
|
5043
4982
|
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
|
5044
4983
|
<xsl:copy>
|
5045
4984
|
<xsl:attribute name="id">
|
5046
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
|
4985
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
|
5047
4986
|
</xsl:attribute>
|
5048
4987
|
<xsl:copy-of select="node()"/>
|
5049
4988
|
</xsl:copy>
|
@@ -5052,6 +4991,24 @@
|
|
5052
4991
|
</xsl:copy>
|
5053
4992
|
|
5054
4993
|
</xsl:template>
|
4994
|
+
|
4995
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p']//*" mode="simple-table-noid">
|
4996
|
+
<xsl:copy>
|
4997
|
+
<xsl:choose>
|
4998
|
+
<xsl:when test="$isGenerateTableIF = 'true'">
|
4999
|
+
<xsl:copy-of select="@*[local-name() != 'id']"/> <!-- to prevent repeat id in colspan/rowspan cells -->
|
5000
|
+
<!-- <xsl:if test="local-name() = 'dl' or local-name() = 'table'">
|
5001
|
+
<xsl:copy-of select="@id"/>
|
5002
|
+
</xsl:if> -->
|
5003
|
+
</xsl:when>
|
5004
|
+
<xsl:otherwise>
|
5005
|
+
<xsl:copy-of select="@*"/>
|
5006
|
+
</xsl:otherwise>
|
5007
|
+
</xsl:choose>
|
5008
|
+
<xsl:apply-templates select="node()" mode="simple-table-noid"/>
|
5009
|
+
</xsl:copy>
|
5010
|
+
</xsl:template>
|
5011
|
+
|
5055
5012
|
<!-- End mode: simple-table-id -->
|
5056
5013
|
<!-- ===================== -->
|
5057
5014
|
<!-- ===================== -->
|
@@ -5061,7 +5018,7 @@
|
|
5061
5018
|
<!-- =============================== -->
|
5062
5019
|
<xsl:template match="@*|node()" mode="td_text_with_formatting">
|
5063
5020
|
<xsl:copy>
|
5064
|
-
|
5021
|
+
<xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
|
5065
5022
|
</xsl:copy>
|
5066
5023
|
</xsl:template>
|
5067
5024
|
|
@@ -5175,6 +5132,10 @@
|
|
5175
5132
|
|
5176
5133
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
5177
5134
|
|
5135
|
+
<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 -->
|
5136
|
+
<!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
|
5137
|
+
</xsl:if>
|
5138
|
+
|
5178
5139
|
<xsl:call-template name="setTrackChangesStyles">
|
5179
5140
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
5180
5141
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
@@ -7061,41 +7022,47 @@
|
|
7061
7022
|
</fo:block>
|
7062
7023
|
</xsl:template>
|
7063
7024
|
|
7064
|
-
<xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
7025
|
+
<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']">
|
7065
7026
|
<fo:block xsl:use-attribute-sets="inherit-style">
|
7066
7027
|
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
7067
7028
|
</fo:block>
|
7068
7029
|
</xsl:template>
|
7069
7030
|
|
7070
|
-
<xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
7031
|
+
<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']">
|
7071
7032
|
<fo:block xsl:use-attribute-sets="description-style">
|
7072
7033
|
<xsl:apply-templates/>
|
7073
7034
|
</fo:block>
|
7074
7035
|
</xsl:template>
|
7075
7036
|
|
7076
|
-
<xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
7037
|
+
<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']">
|
7077
7038
|
<fo:block xsl:use-attribute-sets="specification-style">
|
7078
7039
|
<xsl:apply-templates/>
|
7079
7040
|
</fo:block>
|
7080
7041
|
</xsl:template>
|
7081
7042
|
|
7082
|
-
<xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
7043
|
+
<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']">
|
7083
7044
|
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
7084
7045
|
<xsl:apply-templates/>
|
7085
7046
|
</fo:block>
|
7086
7047
|
</xsl:template>
|
7087
7048
|
|
7088
|
-
<xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
7049
|
+
<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']">
|
7089
7050
|
<fo:block xsl:use-attribute-sets="verification-style">
|
7090
7051
|
<xsl:apply-templates/>
|
7091
7052
|
</fo:block>
|
7092
7053
|
</xsl:template>
|
7093
7054
|
|
7094
|
-
<xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
7055
|
+
<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']">
|
7095
7056
|
<fo:block xsl:use-attribute-sets="import-style">
|
7096
7057
|
<xsl:apply-templates/>
|
7097
7058
|
</fo:block>
|
7098
7059
|
</xsl:template>
|
7060
|
+
|
7061
|
+
<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')]">
|
7062
|
+
<fo:block xsl:use-attribute-sets="component-style">
|
7063
|
+
<xsl:apply-templates/>
|
7064
|
+
</fo:block>
|
7065
|
+
</xsl:template>
|
7099
7066
|
<!-- ========== -->
|
7100
7067
|
<!-- END -->
|
7101
7068
|
<!-- ========== -->
|
@@ -7151,15 +7118,23 @@
|
|
7151
7118
|
|
7152
7119
|
<xsl:template match="*[local-name()='tr']" mode="requirement">
|
7153
7120
|
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
7154
|
-
|
7155
|
-
|
7156
|
-
|
7157
|
-
|
7158
|
-
|
7159
|
-
|
7160
|
-
|
7161
|
-
|
7121
|
+
|
7122
|
+
<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 ')">
|
7123
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
7124
|
+
|
7125
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
7126
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
7127
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
7128
|
+
</xsl:if>
|
7129
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
7130
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
7131
|
+
</xsl:if>
|
7132
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
7133
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
7134
|
+
</xsl:if>
|
7135
|
+
|
7162
7136
|
</xsl:if>
|
7137
|
+
|
7163
7138
|
<xsl:apply-templates mode="requirement"/>
|
7164
7139
|
</fo:table-row>
|
7165
7140
|
</xsl:template>
|
@@ -8669,7 +8644,7 @@
|
|
8669
8644
|
</tbody>
|
8670
8645
|
</xsl:variable>
|
8671
8646
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
8672
|
-
<xsl:call-template name="calculate-column-widths">
|
8647
|
+
<xsl:call-template name="calculate-column-widths-proportional">
|
8673
8648
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
8674
8649
|
<xsl:with-param name="table" select="$toc_table_simple"/>
|
8675
8650
|
</xsl:call-template>
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require_relative "init"
|
2
|
-
require_relative "reqt"
|
3
2
|
require "uuidtools"
|
4
3
|
require_relative "../../relaton/render/general"
|
5
4
|
|
@@ -124,11 +123,6 @@ module IsoDoc
|
|
124
123
|
super
|
125
124
|
end
|
126
125
|
|
127
|
-
def block(docxml)
|
128
|
-
super
|
129
|
-
recommendation_to_table(docxml)
|
130
|
-
end
|
131
|
-
|
132
126
|
def section(docxml)
|
133
127
|
super
|
134
128
|
references(docxml)
|
@@ -190,12 +184,13 @@ module IsoDoc
|
|
190
184
|
::Relaton::Render::Ogc::General.new(language: @lang)
|
191
185
|
end
|
192
186
|
|
193
|
-
def
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
187
|
+
def bibrender_formattedref(formattedref, xml); end
|
188
|
+
|
189
|
+
def bibrender_relaton(xml, renderings)
|
190
|
+
f = renderings[xml["id"]][:formattedref]
|
191
|
+
f &&= "<formattedref>#{f}</formattedref>"
|
192
|
+
keep = "./docidentifier | ./uri | ./note | ./status"
|
193
|
+
xml.children = "#{f}#{xml.xpath(ns(keep)).to_xml}"
|
199
194
|
end
|
200
195
|
|
201
196
|
def display_order(docxml)
|