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
@@ -1480,8 +1480,18 @@
|
|
1480
1480
|
|
1481
1481
|
<xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
|
1482
1482
|
|
1483
|
+
<xsl:variable name="isApplyAutolayoutAlgorithm_">
|
1484
|
+
true
|
1485
|
+
</xsl:variable>
|
1486
|
+
<xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
|
1487
|
+
|
1483
1488
|
<xsl:variable name="isGenerateTableIF_">
|
1484
|
-
|
1489
|
+
<xsl:choose>
|
1490
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
|
1491
|
+
<xsl:value-of select="normalize-space($table_if) = 'true'"/>
|
1492
|
+
</xsl:when>
|
1493
|
+
<xsl:otherwise>false</xsl:otherwise>
|
1494
|
+
</xsl:choose>
|
1485
1495
|
</xsl:variable>
|
1486
1496
|
<xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
|
1487
1497
|
|
@@ -1944,6 +1954,9 @@
|
|
1944
1954
|
<xsl:attribute-set name="import-style">
|
1945
1955
|
</xsl:attribute-set>
|
1946
1956
|
|
1957
|
+
<xsl:attribute-set name="component-style">
|
1958
|
+
</xsl:attribute-set>
|
1959
|
+
|
1947
1960
|
<xsl:attribute-set name="recommendation-style">
|
1948
1961
|
|
1949
1962
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -2154,9 +2167,8 @@
|
|
2154
2167
|
</xsl:attribute-set>
|
2155
2168
|
|
2156
2169
|
<xsl:attribute-set name="dt-block-style">
|
2157
|
-
<xsl:attribute name="margin-top">
|
2170
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
2158
2171
|
|
2159
|
-
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
2160
2172
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2161
2173
|
|
2162
2174
|
</xsl:attribute-set>
|
@@ -3164,6 +3176,7 @@
|
|
3164
3176
|
|
3165
3177
|
<xsl:variable name="margin-side">
|
3166
3178
|
<xsl:choose>
|
3179
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">0</xsl:when>
|
3167
3180
|
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
3168
3181
|
<xsl:otherwise>0</xsl:otherwise>
|
3169
3182
|
</xsl:choose>
|
@@ -3235,6 +3248,7 @@
|
|
3235
3248
|
</td>
|
3236
3249
|
</tr>
|
3237
3250
|
-->
|
3251
|
+
<!-- Simple_table=<xsl:copy-of select="$simple-table"/> -->
|
3238
3252
|
<xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
|
3239
3253
|
|
3240
3254
|
</xsl:when>
|
@@ -3366,12 +3380,17 @@
|
|
3366
3380
|
<xsl:template name="calculate-column-widths">
|
3367
3381
|
<xsl:param name="table"/>
|
3368
3382
|
<xsl:param name="cols-count"/>
|
3369
|
-
|
3383
|
+
<xsl:choose>
|
3384
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
|
3385
|
+
<xsl:call-template name="get-calculated-column-widths-autolayout-algorithm"/>
|
3386
|
+
</xsl:when>
|
3387
|
+
<xsl:otherwise>
|
3370
3388
|
<xsl:call-template name="calculate-column-widths-proportional">
|
3371
3389
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3372
3390
|
<xsl:with-param name="table" select="$table"/>
|
3373
3391
|
</xsl:call-template>
|
3374
|
-
|
3392
|
+
</xsl:otherwise>
|
3393
|
+
</xsl:choose>
|
3375
3394
|
</xsl:template>
|
3376
3395
|
|
3377
3396
|
<!-- ================================================== -->
|
@@ -3549,6 +3568,7 @@
|
|
3549
3568
|
<!-- (https://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2) -->
|
3550
3569
|
<!-- ================================================== -->
|
3551
3570
|
|
3571
|
+
<!-- INPUT: table with columns widths, generated by table_if.xsl -->
|
3552
3572
|
<xsl:template name="calculate-column-widths-autolayout-algorithm">
|
3553
3573
|
<xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
|
3554
3574
|
|
@@ -3560,67 +3580,6 @@
|
|
3560
3580
|
|
3561
3581
|
<!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
|
3562
3582
|
|
3563
|
-
<!-- get current table id -->
|
3564
|
-
<xsl:variable name="table_id" select="@id"/>
|
3565
|
-
<!-- find table by id in the file 'table_widths' -->
|
3566
|
-
<!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
|
3567
|
-
<xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
|
3568
|
-
|
3569
|
-
<!-- table='<xsl:copy-of select="$table"/>' -->
|
3570
|
-
<!-- table_id='<xsl:value-of select="$table_id"/>\ -->
|
3571
|
-
<!-- table-if='<xsl:copy-of select="$table-if"/>' -->
|
3572
|
-
<!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
|
3573
|
-
|
3574
|
-
<xsl:variable name="table_with_cell_widths_">
|
3575
|
-
<xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
|
3576
|
-
</xsl:variable>
|
3577
|
-
<xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
|
3578
|
-
|
3579
|
-
<!-- <xsl:if test="$table_if_debug = 'true'">
|
3580
|
-
<xsl:copy-of select="$table_with_cell_widths"/>
|
3581
|
-
</xsl:if> -->
|
3582
|
-
|
3583
|
-
<!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
|
3584
|
-
|
3585
|
-
<xsl:variable name="column_widths_">
|
3586
|
-
<!-- iteration of columns -->
|
3587
|
-
<xsl:for-each select="$table_with_cell_widths//tr[1]/td">
|
3588
|
-
<xsl:variable name="pos" select="position()"/>
|
3589
|
-
<column>
|
3590
|
-
<xsl:attribute name="width_max">
|
3591
|
-
<xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
|
3592
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
3593
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
3594
|
-
</xsl:for-each>
|
3595
|
-
</xsl:attribute>
|
3596
|
-
<xsl:attribute name="width_min">
|
3597
|
-
<xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
|
3598
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
3599
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
3600
|
-
</xsl:for-each>
|
3601
|
-
</xsl:attribute>
|
3602
|
-
</column>
|
3603
|
-
</xsl:for-each>
|
3604
|
-
</xsl:variable>
|
3605
|
-
<xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
|
3606
|
-
|
3607
|
-
<!-- <column_widths>
|
3608
|
-
<xsl:copy-of select="$column_widths"/>
|
3609
|
-
</column_widths> -->
|
3610
|
-
|
3611
|
-
<!-- These in turn, are used to find the minimum and maximum width for the table. -->
|
3612
|
-
<xsl:variable name="table_widths_">
|
3613
|
-
<table>
|
3614
|
-
<xsl:attribute name="width_max">
|
3615
|
-
<xsl:value-of select="sum($column_widths/column/@width_max)"/>
|
3616
|
-
</xsl:attribute>
|
3617
|
-
<xsl:attribute name="width_min">
|
3618
|
-
<xsl:value-of select="sum($column_widths/column/@width_min)"/>
|
3619
|
-
</xsl:attribute>
|
3620
|
-
</table>
|
3621
|
-
</xsl:variable>
|
3622
|
-
<xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
|
3623
|
-
|
3624
3583
|
<xsl:variable name="page_width">
|
3625
3584
|
<xsl:choose>
|
3626
3585
|
<xsl:when test="$parent_table_page-width != ''">
|
@@ -3633,16 +3592,13 @@
|
|
3633
3592
|
</xsl:variable>
|
3634
3593
|
|
3635
3594
|
<xsl:if test="$table_if_debug = 'true'">
|
3636
|
-
<
|
3637
|
-
<xsl:copy-of select="$table_widths"/>
|
3638
|
-
</table_width>
|
3639
|
-
<debug>$page_width=<xsl:value-of select="$page_width"/></debug>
|
3595
|
+
<page_width><xsl:value-of select="$page_width"/></page_width>
|
3640
3596
|
</xsl:if>
|
3641
3597
|
|
3642
3598
|
<!-- There are three cases: -->
|
3643
3599
|
<xsl:choose>
|
3644
3600
|
<!-- 1. The minimum table width is equal to or wider than the available space -->
|
3645
|
-
<xsl:when test="
|
3601
|
+
<xsl:when test="@width_min >= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
|
3646
3602
|
<!-- call old algorithm -->
|
3647
3603
|
<case1/>
|
3648
3604
|
<!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
|
@@ -3652,10 +3608,10 @@
|
|
3652
3608
|
</xsl:call-template> -->
|
3653
3609
|
</xsl:when>
|
3654
3610
|
<!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
|
3655
|
-
<xsl:when test="
|
3611
|
+
<xsl:when test="@width_max <= $page_width">
|
3656
3612
|
<case2/>
|
3657
3613
|
<autolayout/>
|
3658
|
-
<xsl:for-each select="
|
3614
|
+
<xsl:for-each select="column/@width_max">
|
3659
3615
|
<column divider="100"><xsl:value-of select="."/></column>
|
3660
3616
|
</xsl:for-each>
|
3661
3617
|
</xsl:when>
|
@@ -3665,19 +3621,19 @@
|
|
3665
3621
|
For each column, let d be the difference between maximum and minimum width of that column.
|
3666
3622
|
Now set the column's width to the minimum width plus d times W over D.
|
3667
3623
|
This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
|
3668
|
-
<xsl:when test="(
|
3624
|
+
<xsl:when test="(@width_max > $page_width and @width_min < $page_width) or (@width_min >= $page_width)">
|
3669
3625
|
<!-- difference between the available space and the minimum table width -->
|
3670
|
-
<xsl:variable name="W" select="$page_width -
|
3626
|
+
<xsl:variable name="W" select="$page_width - @width_min"/>
|
3671
3627
|
<W><xsl:value-of select="$W"/></W>
|
3672
3628
|
<!-- difference between maximum and minimum width of the table -->
|
3673
|
-
<xsl:variable name="D" select="
|
3629
|
+
<xsl:variable name="D" select="@width_max - @width_min"/>
|
3674
3630
|
<D><xsl:value-of select="$D"/></D>
|
3675
3631
|
<case3/>
|
3676
3632
|
<autolayout/>
|
3677
|
-
<xsl:if test="
|
3633
|
+
<xsl:if test="@width_min >= $page_width">
|
3678
3634
|
<split_keep-within-line>true</split_keep-within-line>
|
3679
3635
|
</xsl:if>
|
3680
|
-
<xsl:for-each select="
|
3636
|
+
<xsl:for-each select="column">
|
3681
3637
|
<!-- difference between maximum and minimum width of that column. -->
|
3682
3638
|
<xsl:variable name="d" select="@width_max - @width_min"/>
|
3683
3639
|
<d><xsl:value-of select="$d"/></d>
|
@@ -3703,23 +3659,39 @@
|
|
3703
3659
|
|
3704
3660
|
<parent_element><xsl:value-of select="local-name(..)"/></parent_element>
|
3705
3661
|
|
3662
|
+
<ancestor_tree>
|
3663
|
+
<xsl:for-each select="ancestor::*">
|
3664
|
+
<ancestor><xsl:value-of select="local-name()"/></ancestor>
|
3665
|
+
</xsl:for-each>
|
3666
|
+
</ancestor_tree>
|
3667
|
+
|
3706
3668
|
<xsl:variable name="parent_table_page-width_">
|
3707
3669
|
<xsl:if test="$parent_table_id != ''">
|
3708
3670
|
<!-- determine column number in the parent table -->
|
3709
3671
|
<xsl:variable name="parent_table_column_number">
|
3710
3672
|
<xsl:choose>
|
3711
|
-
<xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
|
3673
|
+
<!-- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when> -->
|
3674
|
+
<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>
|
3712
3675
|
<xsl:otherwise> <!-- parent is table -->
|
3713
3676
|
<xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
|
3714
3677
|
</xsl:otherwise>
|
3715
3678
|
</xsl:choose>
|
3716
3679
|
</xsl:variable>
|
3717
3680
|
<!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
|
3718
|
-
|
3681
|
+
|
3682
|
+
<xsl:variable name="parent_table_column_" select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
|
3683
|
+
<xsl:variable name="parent_table_column" select="xalan:nodeset($parent_table_column_)"/>
|
3684
|
+
<!-- <xsl:variable name="divider">
|
3685
|
+
<xsl:value-of select="$parent_table_column/@divider"/>
|
3686
|
+
<xsl:if test="not($parent_table_column/@divider)">1</xsl:if>
|
3687
|
+
</xsl:variable> -->
|
3688
|
+
<xsl:value-of select="$parent_table_column/text()"/> <!-- * 10 -->
|
3719
3689
|
</xsl:if>
|
3720
3690
|
</xsl:variable>
|
3721
3691
|
<xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
|
3722
3692
|
|
3693
|
+
<parent_table_page-width><xsl:value-of select="$parent_table_page-width"/></parent_table_page-width>
|
3694
|
+
|
3723
3695
|
<!-- get current table id -->
|
3724
3696
|
<xsl:variable name="table_id" select="@id"/>
|
3725
3697
|
|
@@ -3740,50 +3712,6 @@
|
|
3740
3712
|
|
3741
3713
|
</xsl:template> <!-- get-calculated-column-widths-autolayout-algorithm -->
|
3742
3714
|
|
3743
|
-
<!-- ============================= -->
|
3744
|
-
<!-- mode: determine_cell_widths-if -->
|
3745
|
-
<!-- ============================= -->
|
3746
|
-
<xsl:template match="@*|node()" mode="determine_cell_widths-if">
|
3747
|
-
<xsl:copy>
|
3748
|
-
<xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
|
3749
|
-
</xsl:copy>
|
3750
|
-
</xsl:template>
|
3751
|
-
|
3752
|
-
<xsl:template match="td | th" mode="determine_cell_widths-if">
|
3753
|
-
<xsl:copy>
|
3754
|
-
<xsl:copy-of select="@*"/>
|
3755
|
-
|
3756
|
-
<!-- The maximum width is given by the widest line. -->
|
3757
|
-
<xsl:attribute name="width_max">
|
3758
|
-
<xsl:for-each select="p_len">
|
3759
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
3760
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
3761
|
-
</xsl:for-each>
|
3762
|
-
</xsl:attribute>
|
3763
|
-
|
3764
|
-
<!-- The minimum width is given by the widest text element (word, image, etc.) -->
|
3765
|
-
<xsl:variable name="width_min">
|
3766
|
-
<xsl:for-each select="word_len">
|
3767
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
3768
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
3769
|
-
</xsl:for-each>
|
3770
|
-
</xsl:variable>
|
3771
|
-
<xsl:attribute name="width_min">
|
3772
|
-
<xsl:value-of select="$width_min"/>
|
3773
|
-
</xsl:attribute>
|
3774
|
-
|
3775
|
-
<xsl:if test="$width_min = 0">
|
3776
|
-
<xsl:attribute name="width_min">1</xsl:attribute>
|
3777
|
-
</xsl:if>
|
3778
|
-
|
3779
|
-
<xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
|
3780
|
-
|
3781
|
-
</xsl:copy>
|
3782
|
-
</xsl:template>
|
3783
|
-
<!-- ============================= -->
|
3784
|
-
<!-- END mode: determine_cell_widths-if -->
|
3785
|
-
<!-- ============================= -->
|
3786
|
-
|
3787
3715
|
<!-- ================================================== -->
|
3788
3716
|
<!-- Calculate column's width based on HTML4 algorithm -->
|
3789
3717
|
<!-- ================================================== -->
|
@@ -3974,6 +3902,7 @@
|
|
3974
3902
|
<xsl:when test="$table_or_dl = 'table'">
|
3975
3903
|
<xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
|
3976
3904
|
<fo:table-row number-columns-spanned="{$col_count}">
|
3905
|
+
<xsl:copy-of select="../@font-weight"/>
|
3977
3906
|
<!-- <test_table><xsl:copy-of select="."/></test_table> -->
|
3978
3907
|
<xsl:call-template name="td"/>
|
3979
3908
|
</fo:table-row>
|
@@ -4125,7 +4054,7 @@
|
|
4125
4054
|
|
4126
4055
|
<xsl:apply-templates/>
|
4127
4056
|
|
4128
|
-
<xsl:if test="$isGenerateTableIF = 'true'"
|
4057
|
+
<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"/> -->
|
4129
4058
|
|
4130
4059
|
</fo:block>
|
4131
4060
|
</fo:table-cell>
|
@@ -4462,6 +4391,7 @@
|
|
4462
4391
|
<xsl:template match="*[local-name()='dl']">
|
4463
4392
|
<xsl:variable name="isAdded" select="@added"/>
|
4464
4393
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
4394
|
+
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
4465
4395
|
<fo:block-container>
|
4466
4396
|
|
4467
4397
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -4995,21 +4925,16 @@
|
|
4995
4925
|
<!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
|
4996
4926
|
<xsl:template match="*[local-name()='dt']" mode="dl_if">
|
4997
4927
|
<xsl:param name="id"/>
|
4998
|
-
<xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
|
4999
4928
|
<tr>
|
5000
4929
|
<td>
|
5001
4930
|
<xsl:copy-of select="node()"/>
|
5002
4931
|
</td>
|
5003
4932
|
<td>
|
5004
|
-
|
5005
|
-
|
5006
|
-
|
5007
|
-
<!-- get paragraphs from nested 'dl' -->
|
5008
|
-
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
5009
|
-
|
4933
|
+
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
|
4934
|
+
<!-- get paragraphs from nested 'dl' -->
|
4935
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
5010
4936
|
</td>
|
5011
4937
|
</tr>
|
5012
|
-
|
5013
4938
|
</xsl:template>
|
5014
4939
|
<xsl:template match="*[local-name()='dd']" mode="dl_if"/>
|
5015
4940
|
|
@@ -5663,6 +5588,9 @@
|
|
5663
5588
|
<xsl:variable name="td">
|
5664
5589
|
<xsl:element name="td">
|
5665
5590
|
<xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
|
5591
|
+
<xsl:if test="local-name()='th'">
|
5592
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
5593
|
+
</xsl:if>
|
5666
5594
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
5667
5595
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
5668
5596
|
</xsl:element>
|
@@ -5675,6 +5603,9 @@
|
|
5675
5603
|
<xsl:otherwise>
|
5676
5604
|
<xsl:element name="td">
|
5677
5605
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
5606
|
+
<xsl:if test="local-name()='th'">
|
5607
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
5608
|
+
</xsl:if>
|
5678
5609
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
5679
5610
|
</xsl:element>
|
5680
5611
|
</xsl:otherwise>
|
@@ -5804,8 +5735,14 @@
|
|
5804
5735
|
<xsl:copy-of select="@*"/>
|
5805
5736
|
<xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
|
5806
5737
|
<xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
|
5738
|
+
<xsl:variable name="divide">
|
5739
|
+
<xsl:choose>
|
5740
|
+
<xsl:when test="@divide"><xsl:value-of select="@divide"/></xsl:when>
|
5741
|
+
<xsl:otherwise>1</xsl:otherwise>
|
5742
|
+
</xsl:choose>
|
5743
|
+
</xsl:variable>
|
5807
5744
|
<xsl:attribute name="id">
|
5808
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
|
5745
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
|
5809
5746
|
</xsl:attribute>
|
5810
5747
|
|
5811
5748
|
<xsl:for-each select="*[local-name() = 'p']">
|
@@ -5813,10 +5750,12 @@
|
|
5813
5750
|
<xsl:copy-of select="@*"/>
|
5814
5751
|
<xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
|
5815
5752
|
<xsl:attribute name="id">
|
5816
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
|
5753
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
|
5817
5754
|
</xsl:attribute>
|
5818
5755
|
|
5819
|
-
<xsl:copy-of select="node()"/>
|
5756
|
+
<!-- <xsl:copy-of select="node()" /> -->
|
5757
|
+
<xsl:apply-templates mode="simple-table-noid"/>
|
5758
|
+
|
5820
5759
|
</xsl:copy>
|
5821
5760
|
</xsl:for-each>
|
5822
5761
|
|
@@ -5845,7 +5784,7 @@
|
|
5845
5784
|
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
|
5846
5785
|
<xsl:copy>
|
5847
5786
|
<xsl:attribute name="id">
|
5848
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
|
5787
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
|
5849
5788
|
</xsl:attribute>
|
5850
5789
|
<xsl:copy-of select="node()"/>
|
5851
5790
|
</xsl:copy>
|
@@ -5854,6 +5793,24 @@
|
|
5854
5793
|
</xsl:copy>
|
5855
5794
|
|
5856
5795
|
</xsl:template>
|
5796
|
+
|
5797
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p']//*" mode="simple-table-noid">
|
5798
|
+
<xsl:copy>
|
5799
|
+
<xsl:choose>
|
5800
|
+
<xsl:when test="$isGenerateTableIF = 'true'">
|
5801
|
+
<xsl:copy-of select="@*[local-name() != 'id']"/> <!-- to prevent repeat id in colspan/rowspan cells -->
|
5802
|
+
<!-- <xsl:if test="local-name() = 'dl' or local-name() = 'table'">
|
5803
|
+
<xsl:copy-of select="@id"/>
|
5804
|
+
</xsl:if> -->
|
5805
|
+
</xsl:when>
|
5806
|
+
<xsl:otherwise>
|
5807
|
+
<xsl:copy-of select="@*"/>
|
5808
|
+
</xsl:otherwise>
|
5809
|
+
</xsl:choose>
|
5810
|
+
<xsl:apply-templates select="node()" mode="simple-table-noid"/>
|
5811
|
+
</xsl:copy>
|
5812
|
+
</xsl:template>
|
5813
|
+
|
5857
5814
|
<!-- End mode: simple-table-id -->
|
5858
5815
|
<!-- ===================== -->
|
5859
5816
|
<!-- ===================== -->
|
@@ -5863,7 +5820,7 @@
|
|
5863
5820
|
<!-- =============================== -->
|
5864
5821
|
<xsl:template match="@*|node()" mode="td_text_with_formatting">
|
5865
5822
|
<xsl:copy>
|
5866
|
-
|
5823
|
+
<xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
|
5867
5824
|
</xsl:copy>
|
5868
5825
|
</xsl:template>
|
5869
5826
|
|
@@ -5977,6 +5934,10 @@
|
|
5977
5934
|
|
5978
5935
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
5979
5936
|
|
5937
|
+
<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 -->
|
5938
|
+
<!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
|
5939
|
+
</xsl:if>
|
5940
|
+
|
5980
5941
|
<xsl:call-template name="setTrackChangesStyles">
|
5981
5942
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
5982
5943
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
@@ -7902,41 +7863,47 @@
|
|
7902
7863
|
</fo:block>
|
7903
7864
|
</xsl:template>
|
7904
7865
|
|
7905
|
-
<xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
7866
|
+
<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']">
|
7906
7867
|
<fo:block xsl:use-attribute-sets="inherit-style">
|
7907
7868
|
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
7908
7869
|
</fo:block>
|
7909
7870
|
</xsl:template>
|
7910
7871
|
|
7911
|
-
<xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
7872
|
+
<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']">
|
7912
7873
|
<fo:block xsl:use-attribute-sets="description-style">
|
7913
7874
|
<xsl:apply-templates/>
|
7914
7875
|
</fo:block>
|
7915
7876
|
</xsl:template>
|
7916
7877
|
|
7917
|
-
<xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
7878
|
+
<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']">
|
7918
7879
|
<fo:block xsl:use-attribute-sets="specification-style">
|
7919
7880
|
<xsl:apply-templates/>
|
7920
7881
|
</fo:block>
|
7921
7882
|
</xsl:template>
|
7922
7883
|
|
7923
|
-
<xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
7884
|
+
<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']">
|
7924
7885
|
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
7925
7886
|
<xsl:apply-templates/>
|
7926
7887
|
</fo:block>
|
7927
7888
|
</xsl:template>
|
7928
7889
|
|
7929
|
-
<xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
7890
|
+
<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']">
|
7930
7891
|
<fo:block xsl:use-attribute-sets="verification-style">
|
7931
7892
|
<xsl:apply-templates/>
|
7932
7893
|
</fo:block>
|
7933
7894
|
</xsl:template>
|
7934
7895
|
|
7935
|
-
<xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
7896
|
+
<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']">
|
7936
7897
|
<fo:block xsl:use-attribute-sets="import-style">
|
7937
7898
|
<xsl:apply-templates/>
|
7938
7899
|
</fo:block>
|
7939
7900
|
</xsl:template>
|
7901
|
+
|
7902
|
+
<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')]">
|
7903
|
+
<fo:block xsl:use-attribute-sets="component-style">
|
7904
|
+
<xsl:apply-templates/>
|
7905
|
+
</fo:block>
|
7906
|
+
</xsl:template>
|
7940
7907
|
<!-- ========== -->
|
7941
7908
|
<!-- END -->
|
7942
7909
|
<!-- ========== -->
|
@@ -7992,15 +7959,23 @@
|
|
7992
7959
|
|
7993
7960
|
<xsl:template match="*[local-name()='tr']" mode="requirement">
|
7994
7961
|
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
7995
|
-
|
7996
|
-
|
7997
|
-
|
7998
|
-
|
7999
|
-
|
8000
|
-
|
8001
|
-
|
8002
|
-
|
7962
|
+
|
7963
|
+
<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 ')">
|
7964
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
7965
|
+
|
7966
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
7967
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
7968
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
7969
|
+
</xsl:if>
|
7970
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
7971
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
7972
|
+
</xsl:if>
|
7973
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
7974
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
7975
|
+
</xsl:if>
|
7976
|
+
|
8003
7977
|
</xsl:if>
|
7978
|
+
|
8004
7979
|
<xsl:apply-templates mode="requirement"/>
|
8005
7980
|
</fo:table-row>
|
8006
7981
|
</xsl:template>
|
@@ -9503,7 +9478,7 @@
|
|
9503
9478
|
</tbody>
|
9504
9479
|
</xsl:variable>
|
9505
9480
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
9506
|
-
<xsl:call-template name="calculate-column-widths">
|
9481
|
+
<xsl:call-template name="calculate-column-widths-proportional">
|
9507
9482
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
9508
9483
|
<xsl:with-param name="table" select="$toc_table_simple"/>
|
9509
9484
|
</xsl:call-template>
|