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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fc9c0bc51e804a7f6f333abdc8f18509fda087d9ad9978d1d3f09873745b4c0
|
4
|
+
data.tar.gz: 75e291d2155ff6fc9b81342b8a817485f3ae283c77c407f9dd066f9d1bf4cf2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d12c68acab1037cf2b67970d99d2c21ff0b9a67afcf1080518c4e5913ddba67df0e842ab545ca48fe0d9d03ace9ae512d7efcf8994400344fbefa43214aee385
|
7
|
+
data.tar.gz: 3d99691f22c7c95a52f00232a79eebe9e94c4be5a3938508427309d8413ab26fdc0e3d9ec40cf85b8e309481730139c62b37e25676fd56024b5e0489a58cea2d
|
@@ -14,7 +14,7 @@ module IsoDoc
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def hi_parse(node, out)
|
17
|
-
out.span
|
17
|
+
out.span class: "hi" do |e|
|
18
18
|
node.children.each { |n| parse(n, e) }
|
19
19
|
end
|
20
20
|
end
|
@@ -41,7 +41,7 @@ module IsoDoc
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def term_cleanup_merge_admitted(term)
|
44
|
-
term.xpath("./following-sibling::p[@class = 'AltTerms' or "\
|
44
|
+
term.xpath("./following-sibling::p[@class = 'AltTerms' or " \
|
45
45
|
"@class = 'DeprecatedTerms']").each do |a|
|
46
46
|
term << " "
|
47
47
|
term << a.children
|
@@ -50,20 +50,20 @@ module IsoDoc
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def deprecated_term_parse(node, out)
|
53
|
-
out.p
|
53
|
+
out.p class: "DeprecatedTerms" do |p|
|
54
54
|
node.children.each { |c| parse(c, p) }
|
55
55
|
p << " "
|
56
|
-
p.span
|
56
|
+
p.span class: "AdmittedLabel" do |s|
|
57
57
|
s << l10n(@i18n.deprecated)
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
62
|
def admitted_term_parse(node, out)
|
63
|
-
out.p
|
63
|
+
out.p class: "AltTerms" do |p|
|
64
64
|
node.children.each { |c| parse(c, p) }
|
65
65
|
p << " "
|
66
|
-
p.span
|
66
|
+
p.span class: "AdmittedLabel" do |s|
|
67
67
|
s << l10n(@i18n.admitted)
|
68
68
|
end
|
69
69
|
end
|
@@ -78,13 +78,13 @@ module IsoDoc
|
|
78
78
|
def example_label(node, div, name); end
|
79
79
|
|
80
80
|
def example_name_parse(_node, div, name)
|
81
|
-
div.p
|
81
|
+
div.p class: "SourceTitle", style: "text-align:center;" do |p|
|
82
82
|
name&.children&.each { |n| parse(n, p) }
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
86
|
def middle_clause(_docxml)
|
87
|
-
"//clause[parent::sections][not(@type = 'scope' or "\
|
87
|
+
"//clause[parent::sections][not(@type = 'scope' or " \
|
88
88
|
"@type = 'conformance')][not(descendant::terms)]"
|
89
89
|
end
|
90
90
|
|
@@ -111,15 +111,15 @@ module IsoDoc
|
|
111
111
|
ret = super
|
112
112
|
%w(recommendation requirement permission).include?(node["class"]) and
|
113
113
|
ret = ret.merge(class: node["type"], style:
|
114
|
-
"border-collapse:collapse;border-spacing:0;"\
|
114
|
+
"border-collapse:collapse;border-spacing:0;" \
|
115
115
|
"#{keep_style(node)}")
|
116
116
|
ret
|
117
117
|
end
|
118
118
|
|
119
119
|
def make_tr_attr(cell, row, totalrows, header, bordered)
|
120
120
|
ret = super
|
121
|
-
if cell.at("./ancestor::xmlns:table[@class = 'recommendation'] | "\
|
122
|
-
"./ancestor::xmlns:table[@class = 'requirement'] | "\
|
121
|
+
if cell.at("./ancestor::xmlns:table[@class = 'recommendation'] | " \
|
122
|
+
"./ancestor::xmlns:table[@class = 'requirement'] | " \
|
123
123
|
"./ancestor::xmlns:table[@class = 'permission']")
|
124
124
|
ret[:style] = "vertical-align:top;"
|
125
125
|
ret[:class] = "recommend"
|
@@ -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>
|