metanorma-ogc 2.3.2 → 2.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ogc/base_convert.rb +11 -11
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +29 -12
- data/lib/isodoc/ogc/ogc.best-practice.xsl +29 -12
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +29 -12
- data/lib/isodoc/ogc/ogc.community-practice.xsl +29 -12
- data/lib/isodoc/ogc/ogc.community-standard.xsl +29 -12
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +29 -12
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +29 -12
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +29 -12
- data/lib/isodoc/ogc/ogc.other.xsl +29 -12
- data/lib/isodoc/ogc/ogc.policy.xsl +29 -12
- data/lib/isodoc/ogc/ogc.reference-model.xsl +29 -12
- data/lib/isodoc/ogc/ogc.release-notes.xsl +29 -12
- data/lib/isodoc/ogc/ogc.standard.xsl +29 -12
- data/lib/isodoc/ogc/ogc.test-suite.xsl +29 -12
- data/lib/isodoc/ogc/ogc.user-guide.xsl +29 -12
- data/lib/isodoc/ogc/ogc.white-paper.xsl +29 -12
- data/lib/metanorma/ogc/biblio.rng +1 -1
- data/lib/metanorma/ogc/cleanup.rb +3 -5
- data/lib/metanorma/ogc/isodoc.rng +1 -1
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
@@ -1515,14 +1515,14 @@
|
|
1515
1515
|
BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
|
1516
1516
|
|
1517
1517
|
<!--
|
1518
|
-
<
|
1518
|
+
<metanorma-extension>
|
1519
1519
|
<presentation-metadata>
|
1520
1520
|
<papersize>letter</papersize>
|
1521
1521
|
</presentation-metadata>
|
1522
|
-
</
|
1522
|
+
</metanorma-extension>
|
1523
1523
|
-->
|
1524
1524
|
|
1525
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1525
|
+
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
|
1526
1526
|
<xsl:variable name="papersize_width_">
|
1527
1527
|
<xsl:choose>
|
1528
1528
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -1639,7 +1639,7 @@
|
|
1639
1639
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
1640
1640
|
|
1641
1641
|
<xsl:variable name="title-list-tables">
|
1642
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1642
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
1643
1643
|
<xsl:value-of select="$toc_table_title"/>
|
1644
1644
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
1645
1645
|
<xsl:call-template name="getTitle">
|
@@ -1649,7 +1649,7 @@
|
|
1649
1649
|
</xsl:variable>
|
1650
1650
|
|
1651
1651
|
<xsl:variable name="title-list-figures">
|
1652
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1652
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
1653
1653
|
<xsl:value-of select="$toc_figure_title"/>
|
1654
1654
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
1655
1655
|
<xsl:call-template name="getTitle">
|
@@ -1659,7 +1659,7 @@
|
|
1659
1659
|
</xsl:variable>
|
1660
1660
|
|
1661
1661
|
<xsl:variable name="title-list-recommendations">
|
1662
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1662
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
1663
1663
|
<xsl:value-of select="$toc_requirement_title"/>
|
1664
1664
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
1665
1665
|
<xsl:call-template name="getTitle">
|
@@ -1732,7 +1732,7 @@
|
|
1732
1732
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
1733
1733
|
|
1734
1734
|
<xsl:variable name="additional_fonts_">
|
1735
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
1735
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
|
1736
1736
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
1737
1737
|
</xsl:for-each>
|
1738
1738
|
</xsl:variable>
|
@@ -2895,10 +2895,10 @@
|
|
2895
2895
|
|
2896
2896
|
<xsl:template name="processTablesFigures_Contents">
|
2897
2897
|
<xsl:param name="always"/>
|
2898
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2898
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2899
2899
|
<xsl:call-template name="processTables_Contents"/>
|
2900
2900
|
</xsl:if>
|
2901
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2901
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2902
2902
|
<xsl:call-template name="processFigures_Contents"/>
|
2903
2903
|
</xsl:if>
|
2904
2904
|
</xsl:template>
|
@@ -3249,6 +3249,8 @@
|
|
3249
3249
|
|
3250
3250
|
<xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
|
3251
3251
|
|
3252
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3253
|
+
|
3252
3254
|
</xsl:element>
|
3253
3255
|
</xsl:variable>
|
3254
3256
|
|
@@ -3390,6 +3392,10 @@
|
|
3390
3392
|
|
3391
3393
|
</xsl:template>
|
3392
3394
|
|
3395
|
+
<xsl:template name="setBordersTableArray">
|
3396
|
+
|
3397
|
+
</xsl:template>
|
3398
|
+
|
3393
3399
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
3394
3400
|
<xsl:param name="continued"/>
|
3395
3401
|
<xsl:if test="normalize-space() != ''">
|
@@ -3864,6 +3870,8 @@
|
|
3864
3870
|
<fo:table-row>
|
3865
3871
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
3866
3872
|
|
3873
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3874
|
+
|
3867
3875
|
<!-- fn will be processed inside 'note' processing -->
|
3868
3876
|
|
3869
3877
|
<!-- for BSI (not PAS) display Notes before footnotes -->
|
@@ -3985,6 +3993,8 @@
|
|
3985
3993
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
3986
3994
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
3987
3995
|
|
3996
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3997
|
+
|
3988
3998
|
<xsl:call-template name="setTableRowAttributes"/>
|
3989
3999
|
|
3990
4000
|
<xsl:apply-templates/>
|
@@ -4008,6 +4018,8 @@
|
|
4008
4018
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4009
4019
|
</xsl:if>
|
4010
4020
|
|
4021
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4022
|
+
|
4011
4023
|
<xsl:variable name="number"><xsl:number/></xsl:variable>
|
4012
4024
|
<xsl:attribute name="background-color">
|
4013
4025
|
<xsl:choose>
|
@@ -4035,6 +4047,8 @@
|
|
4035
4047
|
<xsl:with-param name="default">center</xsl:with-param>
|
4036
4048
|
</xsl:call-template>
|
4037
4049
|
|
4050
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4051
|
+
|
4038
4052
|
<xsl:if test="starts-with(ancestor::*[local-name() = 'table'][1]/@type, 'recommend') and normalize-space(@align) = ''">
|
4039
4053
|
<xsl:call-template name="setTextAlignment">
|
4040
4054
|
<xsl:with-param name="default">left</xsl:with-param>
|
@@ -4093,6 +4107,8 @@
|
|
4093
4107
|
|
4094
4108
|
<!-- bsi -->
|
4095
4109
|
|
4110
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4111
|
+
|
4096
4112
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
4097
4113
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4098
4114
|
</xsl:if>
|
@@ -7765,7 +7781,7 @@
|
|
7765
7781
|
<!-- sourcecode -->
|
7766
7782
|
<!-- =============== -->
|
7767
7783
|
|
7768
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
7784
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
7769
7785
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
7770
7786
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
7771
7787
|
|
@@ -9863,8 +9879,8 @@
|
|
9863
9879
|
|
9864
9880
|
<xsl:variable name="toc_level">
|
9865
9881
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
9866
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
9867
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
9882
|
+
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
|
9883
|
+
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
9868
9884
|
<xsl:choose>
|
9869
9885
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
9870
9886
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
@@ -10856,6 +10872,7 @@
|
|
10856
10872
|
<xsl:choose>
|
10857
10873
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
10858
10874
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
10875
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
10859
10876
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
10860
10877
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
10861
10878
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
@@ -1515,14 +1515,14 @@
|
|
1515
1515
|
BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
|
1516
1516
|
|
1517
1517
|
<!--
|
1518
|
-
<
|
1518
|
+
<metanorma-extension>
|
1519
1519
|
<presentation-metadata>
|
1520
1520
|
<papersize>letter</papersize>
|
1521
1521
|
</presentation-metadata>
|
1522
|
-
</
|
1522
|
+
</metanorma-extension>
|
1523
1523
|
-->
|
1524
1524
|
|
1525
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1525
|
+
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
|
1526
1526
|
<xsl:variable name="papersize_width_">
|
1527
1527
|
<xsl:choose>
|
1528
1528
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -1639,7 +1639,7 @@
|
|
1639
1639
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
1640
1640
|
|
1641
1641
|
<xsl:variable name="title-list-tables">
|
1642
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1642
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
1643
1643
|
<xsl:value-of select="$toc_table_title"/>
|
1644
1644
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
1645
1645
|
<xsl:call-template name="getTitle">
|
@@ -1649,7 +1649,7 @@
|
|
1649
1649
|
</xsl:variable>
|
1650
1650
|
|
1651
1651
|
<xsl:variable name="title-list-figures">
|
1652
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1652
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
1653
1653
|
<xsl:value-of select="$toc_figure_title"/>
|
1654
1654
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
1655
1655
|
<xsl:call-template name="getTitle">
|
@@ -1659,7 +1659,7 @@
|
|
1659
1659
|
</xsl:variable>
|
1660
1660
|
|
1661
1661
|
<xsl:variable name="title-list-recommendations">
|
1662
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1662
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
1663
1663
|
<xsl:value-of select="$toc_requirement_title"/>
|
1664
1664
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
1665
1665
|
<xsl:call-template name="getTitle">
|
@@ -1732,7 +1732,7 @@
|
|
1732
1732
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
1733
1733
|
|
1734
1734
|
<xsl:variable name="additional_fonts_">
|
1735
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
1735
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
|
1736
1736
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
1737
1737
|
</xsl:for-each>
|
1738
1738
|
</xsl:variable>
|
@@ -2895,10 +2895,10 @@
|
|
2895
2895
|
|
2896
2896
|
<xsl:template name="processTablesFigures_Contents">
|
2897
2897
|
<xsl:param name="always"/>
|
2898
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2898
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2899
2899
|
<xsl:call-template name="processTables_Contents"/>
|
2900
2900
|
</xsl:if>
|
2901
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2901
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2902
2902
|
<xsl:call-template name="processFigures_Contents"/>
|
2903
2903
|
</xsl:if>
|
2904
2904
|
</xsl:template>
|
@@ -3249,6 +3249,8 @@
|
|
3249
3249
|
|
3250
3250
|
<xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
|
3251
3251
|
|
3252
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3253
|
+
|
3252
3254
|
</xsl:element>
|
3253
3255
|
</xsl:variable>
|
3254
3256
|
|
@@ -3390,6 +3392,10 @@
|
|
3390
3392
|
|
3391
3393
|
</xsl:template>
|
3392
3394
|
|
3395
|
+
<xsl:template name="setBordersTableArray">
|
3396
|
+
|
3397
|
+
</xsl:template>
|
3398
|
+
|
3393
3399
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
3394
3400
|
<xsl:param name="continued"/>
|
3395
3401
|
<xsl:if test="normalize-space() != ''">
|
@@ -3864,6 +3870,8 @@
|
|
3864
3870
|
<fo:table-row>
|
3865
3871
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
3866
3872
|
|
3873
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3874
|
+
|
3867
3875
|
<!-- fn will be processed inside 'note' processing -->
|
3868
3876
|
|
3869
3877
|
<!-- for BSI (not PAS) display Notes before footnotes -->
|
@@ -3985,6 +3993,8 @@
|
|
3985
3993
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
3986
3994
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
3987
3995
|
|
3996
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3997
|
+
|
3988
3998
|
<xsl:call-template name="setTableRowAttributes"/>
|
3989
3999
|
|
3990
4000
|
<xsl:apply-templates/>
|
@@ -4008,6 +4018,8 @@
|
|
4008
4018
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4009
4019
|
</xsl:if>
|
4010
4020
|
|
4021
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4022
|
+
|
4011
4023
|
<xsl:variable name="number"><xsl:number/></xsl:variable>
|
4012
4024
|
<xsl:attribute name="background-color">
|
4013
4025
|
<xsl:choose>
|
@@ -4035,6 +4047,8 @@
|
|
4035
4047
|
<xsl:with-param name="default">center</xsl:with-param>
|
4036
4048
|
</xsl:call-template>
|
4037
4049
|
|
4050
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4051
|
+
|
4038
4052
|
<xsl:if test="starts-with(ancestor::*[local-name() = 'table'][1]/@type, 'recommend') and normalize-space(@align) = ''">
|
4039
4053
|
<xsl:call-template name="setTextAlignment">
|
4040
4054
|
<xsl:with-param name="default">left</xsl:with-param>
|
@@ -4093,6 +4107,8 @@
|
|
4093
4107
|
|
4094
4108
|
<!-- bsi -->
|
4095
4109
|
|
4110
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4111
|
+
|
4096
4112
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
4097
4113
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4098
4114
|
</xsl:if>
|
@@ -7765,7 +7781,7 @@
|
|
7765
7781
|
<!-- sourcecode -->
|
7766
7782
|
<!-- =============== -->
|
7767
7783
|
|
7768
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
7784
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
7769
7785
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
7770
7786
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
7771
7787
|
|
@@ -9863,8 +9879,8 @@
|
|
9863
9879
|
|
9864
9880
|
<xsl:variable name="toc_level">
|
9865
9881
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
9866
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
9867
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
9882
|
+
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
|
9883
|
+
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
9868
9884
|
<xsl:choose>
|
9869
9885
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
9870
9886
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
@@ -10856,6 +10872,7 @@
|
|
10856
10872
|
<xsl:choose>
|
10857
10873
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
10858
10874
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
10875
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
10859
10876
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
10860
10877
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
10861
10878
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
@@ -1515,14 +1515,14 @@
|
|
1515
1515
|
BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
|
1516
1516
|
|
1517
1517
|
<!--
|
1518
|
-
<
|
1518
|
+
<metanorma-extension>
|
1519
1519
|
<presentation-metadata>
|
1520
1520
|
<papersize>letter</papersize>
|
1521
1521
|
</presentation-metadata>
|
1522
|
-
</
|
1522
|
+
</metanorma-extension>
|
1523
1523
|
-->
|
1524
1524
|
|
1525
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1525
|
+
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
|
1526
1526
|
<xsl:variable name="papersize_width_">
|
1527
1527
|
<xsl:choose>
|
1528
1528
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -1639,7 +1639,7 @@
|
|
1639
1639
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
1640
1640
|
|
1641
1641
|
<xsl:variable name="title-list-tables">
|
1642
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1642
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
1643
1643
|
<xsl:value-of select="$toc_table_title"/>
|
1644
1644
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
1645
1645
|
<xsl:call-template name="getTitle">
|
@@ -1649,7 +1649,7 @@
|
|
1649
1649
|
</xsl:variable>
|
1650
1650
|
|
1651
1651
|
<xsl:variable name="title-list-figures">
|
1652
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1652
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
1653
1653
|
<xsl:value-of select="$toc_figure_title"/>
|
1654
1654
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
1655
1655
|
<xsl:call-template name="getTitle">
|
@@ -1659,7 +1659,7 @@
|
|
1659
1659
|
</xsl:variable>
|
1660
1660
|
|
1661
1661
|
<xsl:variable name="title-list-recommendations">
|
1662
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1662
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
1663
1663
|
<xsl:value-of select="$toc_requirement_title"/>
|
1664
1664
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
1665
1665
|
<xsl:call-template name="getTitle">
|
@@ -1732,7 +1732,7 @@
|
|
1732
1732
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
1733
1733
|
|
1734
1734
|
<xsl:variable name="additional_fonts_">
|
1735
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
1735
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
|
1736
1736
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
1737
1737
|
</xsl:for-each>
|
1738
1738
|
</xsl:variable>
|
@@ -2895,10 +2895,10 @@
|
|
2895
2895
|
|
2896
2896
|
<xsl:template name="processTablesFigures_Contents">
|
2897
2897
|
<xsl:param name="always"/>
|
2898
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2898
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2899
2899
|
<xsl:call-template name="processTables_Contents"/>
|
2900
2900
|
</xsl:if>
|
2901
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2901
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2902
2902
|
<xsl:call-template name="processFigures_Contents"/>
|
2903
2903
|
</xsl:if>
|
2904
2904
|
</xsl:template>
|
@@ -3249,6 +3249,8 @@
|
|
3249
3249
|
|
3250
3250
|
<xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
|
3251
3251
|
|
3252
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3253
|
+
|
3252
3254
|
</xsl:element>
|
3253
3255
|
</xsl:variable>
|
3254
3256
|
|
@@ -3390,6 +3392,10 @@
|
|
3390
3392
|
|
3391
3393
|
</xsl:template>
|
3392
3394
|
|
3395
|
+
<xsl:template name="setBordersTableArray">
|
3396
|
+
|
3397
|
+
</xsl:template>
|
3398
|
+
|
3393
3399
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
3394
3400
|
<xsl:param name="continued"/>
|
3395
3401
|
<xsl:if test="normalize-space() != ''">
|
@@ -3864,6 +3870,8 @@
|
|
3864
3870
|
<fo:table-row>
|
3865
3871
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
3866
3872
|
|
3873
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3874
|
+
|
3867
3875
|
<!-- fn will be processed inside 'note' processing -->
|
3868
3876
|
|
3869
3877
|
<!-- for BSI (not PAS) display Notes before footnotes -->
|
@@ -3985,6 +3993,8 @@
|
|
3985
3993
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
3986
3994
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
3987
3995
|
|
3996
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3997
|
+
|
3988
3998
|
<xsl:call-template name="setTableRowAttributes"/>
|
3989
3999
|
|
3990
4000
|
<xsl:apply-templates/>
|
@@ -4008,6 +4018,8 @@
|
|
4008
4018
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4009
4019
|
</xsl:if>
|
4010
4020
|
|
4021
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4022
|
+
|
4011
4023
|
<xsl:variable name="number"><xsl:number/></xsl:variable>
|
4012
4024
|
<xsl:attribute name="background-color">
|
4013
4025
|
<xsl:choose>
|
@@ -4035,6 +4047,8 @@
|
|
4035
4047
|
<xsl:with-param name="default">center</xsl:with-param>
|
4036
4048
|
</xsl:call-template>
|
4037
4049
|
|
4050
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4051
|
+
|
4038
4052
|
<xsl:if test="starts-with(ancestor::*[local-name() = 'table'][1]/@type, 'recommend') and normalize-space(@align) = ''">
|
4039
4053
|
<xsl:call-template name="setTextAlignment">
|
4040
4054
|
<xsl:with-param name="default">left</xsl:with-param>
|
@@ -4093,6 +4107,8 @@
|
|
4093
4107
|
|
4094
4108
|
<!-- bsi -->
|
4095
4109
|
|
4110
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4111
|
+
|
4096
4112
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
4097
4113
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4098
4114
|
</xsl:if>
|
@@ -7765,7 +7781,7 @@
|
|
7765
7781
|
<!-- sourcecode -->
|
7766
7782
|
<!-- =============== -->
|
7767
7783
|
|
7768
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
7784
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
7769
7785
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
7770
7786
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
7771
7787
|
|
@@ -9863,8 +9879,8 @@
|
|
9863
9879
|
|
9864
9880
|
<xsl:variable name="toc_level">
|
9865
9881
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
9866
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
9867
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
9882
|
+
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
|
9883
|
+
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
9868
9884
|
<xsl:choose>
|
9869
9885
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
9870
9886
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
@@ -10856,6 +10872,7 @@
|
|
10856
10872
|
<xsl:choose>
|
10857
10873
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
10858
10874
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
10875
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
10859
10876
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
10860
10877
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
10861
10878
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|