metanorma-iso 2.3.2 → 2.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/base_convert.rb +1 -0
- data/lib/isodoc/iso/html/html_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html/style-human.css +3 -0
- data/lib/isodoc/iso/html/style-human.scss +4 -0
- data/lib/isodoc/iso/html/style-iso.css +3 -0
- data/lib/isodoc/iso/html/style-iso.scss +4 -0
- data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +1 -1
- data/lib/isodoc/iso/html/word_iso_titlepage-prf.html +1 -1
- data/lib/isodoc/iso/html/word_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html/wordstyle-dis.css +4 -4
- data/lib/isodoc/iso/html/wordstyle-dis.scss +4 -4
- data/lib/isodoc/iso/iso.amendment.xsl +42 -13
- data/lib/isodoc/iso/iso.international-standard.xsl +42 -13
- data/lib/isodoc/iso/metadata.rb +22 -25
- data/lib/isodoc/iso/presentation_bibdata.rb +9 -3
- data/lib/isodoc/iso/presentation_xml_convert.rb +14 -17
- data/lib/isodoc/iso/presentation_xref.rb +3 -3
- data/lib/isodoc/iso/word_dis_cleanup.rb +7 -34
- data/lib/isodoc/iso/word_dis_convert.rb +33 -6
- data/lib/metanorma/iso/basicdoc.rng +0 -1
- data/lib/metanorma/iso/biblio.rng +1 -1
- data/lib/metanorma/iso/cleanup.rb +18 -16
- data/lib/metanorma/iso/front.rb +21 -5
- data/lib/metanorma/iso/front_id.rb +114 -186
- data/lib/metanorma/iso/isodoc.rng +2 -1
- data/lib/metanorma/iso/processor.rb +1 -1
- data/lib/metanorma/iso/section.rb +6 -2
- data/lib/metanorma/iso/version.rb +1 -1
- data/lib/relaton/render/general.rb +1 -0
- data/metanorma-iso.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6252955e2d89211f2f4a54d9d1b3ef9ac843ef27d9501675b231bc71a7d7c293
|
4
|
+
data.tar.gz: ac49bec2ab4bf06ec7ce6d17210f08e028eb87268fa5f0d01b4f241d0e4259f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb52dff522bc328a0c1f6741f7b989124f5f8a2db7d3284f00144c201a1e683a567cca9caf023da7eee525a97ec239007fb472735efb9a62bfff1a8bda5e85d6
|
7
|
+
data.tar.gz: 04ff426186796810778862c44ee7d2e55097379356a5d3e826017d4bb5a13ba5febada40a224b7ce067a3a867a8a54b9b44c9a0d545461fad66c990dacefea68
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<p class="coverpage_docnumber">{{ docnumber_undated }} {{ draftinfo }}</p>
|
20
20
|
{% endif %}
|
21
21
|
|
22
|
-
<p class="coverpage_techcommittee">{{
|
22
|
+
<p class="coverpage_techcommittee">{{ editorialgroup }}</p>
|
23
23
|
|
24
24
|
{% if secretariat %}
|
25
25
|
<p class="coverpage_techcommittee"><a
|
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
<p class="zzCover" style='font-weight:normal;'><span lang="EN-GB">Reference number of project: {{ docnumber_undated }}{% if draftinfo %} {{ draftinfo }}{% endif %}</span></p>
|
22
22
|
|
23
|
-
<p class="zzCover" style='font-weight:normal;'><span lang="EN-GB">Committee identification: {{
|
23
|
+
<p class="zzCover" style='font-weight:normal;'><span lang="EN-GB">Committee identification: {{ approvalgroup }}</span></p>
|
24
24
|
|
25
25
|
<!--
|
26
26
|
{% if doctitleamdlabel %}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<p class="zzCover" align="right" style='text-align:right'><span lang="EN-GB">Date: <span style='mso-no-proof:yes'><b>{{ doc_date }}</b></span></span></p>
|
15
15
|
{% endif %}
|
16
16
|
|
17
|
-
<p class="zzCover" style='font-weight:normal;'><span lang="EN-GB">{{
|
17
|
+
<p class="zzCover" style='font-weight:normal;'><span lang="EN-GB">{{ editorialgroup}}</span></p>
|
18
18
|
|
19
19
|
<!--
|
20
20
|
{% if doctitleamdlabel %}
|
@@ -23,7 +23,7 @@ style='mso-bidi-font-weight:normal'><span lang="EN-GB" style='font-size:14.0pt'>
|
|
23
23
|
{% endif %}
|
24
24
|
|
25
25
|
<p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB"
|
26
|
-
style='mso-no-proof:yes'>{{
|
26
|
+
style='mso-no-proof:yes'>{{ editorialgroup }}</span></p>
|
27
27
|
|
28
28
|
{% if secretariat %}
|
29
29
|
<p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB">{{ labels["secretariat"] }}: <span style='mso-no-proof:yes'>{{ secretariat }}</span></span></p>
|
@@ -1910,10 +1910,10 @@ p.TOCTitle, li.TOCTitle, div.TOCTitle {
|
|
1910
1910
|
margin: 39.7pt 53.85pt 1.0cm 53.85pt;
|
1911
1911
|
mso-header-margin: 35.45pt;
|
1912
1912
|
mso-footer-margin: 14.2pt;
|
1913
|
-
mso-even-header: url("file:///C:/Doc/FILENAME_files/header.html")
|
1914
|
-
mso-header: url("file:///C:/Doc/FILENAME_files/header.html")
|
1915
|
-
mso-even-footer: url("file:///C:/Doc/FILENAME_files/header.html")
|
1916
|
-
mso-footer: url("file:///C:/Doc/FILENAME_files/header.html")
|
1913
|
+
mso-even-header: url("file:///C:/Doc/FILENAME_files/header.html") fh1;
|
1914
|
+
mso-header: url("file:///C:/Doc/FILENAME_files/header.html") fh1;
|
1915
|
+
mso-even-footer: url("file:///C:/Doc/FILENAME_files/header.html") ff1;
|
1916
|
+
mso-footer: url("file:///C:/Doc/FILENAME_files/header.html") ff1;
|
1917
1917
|
mso-first-header: url("file:///C:/Doc/FILENAME_files/header.html") fh1;
|
1918
1918
|
mso-first-footer: url("file:///C:/Doc/FILENAME_files/header.html") ff1;
|
1919
1919
|
mso-paper-source: 0; }
|
@@ -1809,10 +1809,10 @@ p.TOCTitle, li.TOCTitle, div.TOCTitle
|
|
1809
1809
|
margin:39.7pt 53.85pt 1.0cm 53.85pt;
|
1810
1810
|
mso-header-margin:35.45pt;
|
1811
1811
|
mso-footer-margin:14.2pt;
|
1812
|
-
mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html")
|
1813
|
-
mso-header:url("file:///C:/Doc/FILENAME_files/header.html")
|
1814
|
-
mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html")
|
1815
|
-
mso-footer:url("file:///C:/Doc/FILENAME_files/header.html")
|
1812
|
+
mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") fh1;
|
1813
|
+
mso-header:url("file:///C:/Doc/FILENAME_files/header.html") fh1;
|
1814
|
+
mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") ff1;
|
1815
|
+
mso-footer:url("file:///C:/Doc/FILENAME_files/header.html") ff1;
|
1816
1816
|
mso-first-header:url("file:///C:/Doc/FILENAME_files/header.html") fh1;
|
1817
1817
|
mso-first-footer:url("file:///C:/Doc/FILENAME_files/header.html") ff1;
|
1818
1818
|
mso-paper-source:0;}
|
@@ -1974,12 +1974,16 @@
|
|
1974
1974
|
<xsl:attribute name="text-align">
|
1975
1975
|
<xsl:choose>
|
1976
1976
|
<!-- <xsl:when test="ancestor::iso:preface">justify</xsl:when> -->
|
1977
|
-
<xsl:when test="@align
|
1977
|
+
<xsl:when test="@align = 'justified'">justify</xsl:when>
|
1978
|
+
<xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
|
1978
1979
|
<xsl:when test="ancestor::iso:td/@align"><xsl:value-of select="ancestor::iso:td/@align"/></xsl:when>
|
1979
1980
|
<xsl:when test="ancestor::iso:th/@align"><xsl:value-of select="ancestor::iso:th/@align"/></xsl:when>
|
1980
1981
|
<xsl:otherwise>justify</xsl:otherwise><!-- left -->
|
1981
1982
|
</xsl:choose>
|
1982
1983
|
</xsl:attribute>
|
1984
|
+
<xsl:if test="@align = 'indent'">
|
1985
|
+
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
1986
|
+
</xsl:if>
|
1983
1987
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1984
1988
|
<xsl:if test="count(ancestor::iso:li) = 1 and not(ancestor::iso:li[1]/following-sibling::iso:li) and not(following-sibling::iso:p)">
|
1985
1989
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
@@ -2326,14 +2330,14 @@
|
|
2326
2330
|
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 -->
|
2327
2331
|
|
2328
2332
|
<!--
|
2329
|
-
<
|
2333
|
+
<metanorma-extension>
|
2330
2334
|
<presentation-metadata>
|
2331
2335
|
<papersize>letter</papersize>
|
2332
2336
|
</presentation-metadata>
|
2333
|
-
</
|
2337
|
+
</metanorma-extension>
|
2334
2338
|
-->
|
2335
2339
|
|
2336
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2340
|
+
<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'])))"/>
|
2337
2341
|
<xsl:variable name="papersize_width_">
|
2338
2342
|
<xsl:choose>
|
2339
2343
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -2454,7 +2458,7 @@
|
|
2454
2458
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
2455
2459
|
|
2456
2460
|
<xsl:variable name="title-list-tables">
|
2457
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2461
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
2458
2462
|
<xsl:value-of select="$toc_table_title"/>
|
2459
2463
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
2460
2464
|
<xsl:call-template name="getTitle">
|
@@ -2464,7 +2468,7 @@
|
|
2464
2468
|
</xsl:variable>
|
2465
2469
|
|
2466
2470
|
<xsl:variable name="title-list-figures">
|
2467
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2471
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
2468
2472
|
<xsl:value-of select="$toc_figure_title"/>
|
2469
2473
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
2470
2474
|
<xsl:call-template name="getTitle">
|
@@ -2474,7 +2478,7 @@
|
|
2474
2478
|
</xsl:variable>
|
2475
2479
|
|
2476
2480
|
<xsl:variable name="title-list-recommendations">
|
2477
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2481
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
2478
2482
|
<xsl:value-of select="$toc_requirement_title"/>
|
2479
2483
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
2480
2484
|
<xsl:call-template name="getTitle">
|
@@ -2546,7 +2550,7 @@
|
|
2546
2550
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
2547
2551
|
|
2548
2552
|
<xsl:variable name="additional_fonts_">
|
2549
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
2553
|
+
<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']">
|
2550
2554
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
2551
2555
|
</xsl:for-each>
|
2552
2556
|
</xsl:variable>
|
@@ -3655,10 +3659,10 @@
|
|
3655
3659
|
|
3656
3660
|
<xsl:template name="processTablesFigures_Contents">
|
3657
3661
|
<xsl:param name="always"/>
|
3658
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
3662
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3659
3663
|
<xsl:call-template name="processTables_Contents"/>
|
3660
3664
|
</xsl:if>
|
3661
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
3665
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3662
3666
|
<xsl:call-template name="processFigures_Contents"/>
|
3663
3667
|
</xsl:if>
|
3664
3668
|
</xsl:template>
|
@@ -3966,6 +3970,9 @@
|
|
3966
3970
|
<xsl:if test="not(*[local-name() = 'name'])">
|
3967
3971
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
3968
3972
|
</xsl:if>
|
3973
|
+
<xsl:if test="starts-with(@id, 'array_')">
|
3974
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
3975
|
+
</xsl:if>
|
3969
3976
|
|
3970
3977
|
<!-- end table block-container attributes -->
|
3971
3978
|
|
@@ -3996,6 +4003,8 @@
|
|
3996
4003
|
<xsl:attribute name="border"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
|
3997
4004
|
</xsl:if>
|
3998
4005
|
|
4006
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4007
|
+
|
3999
4008
|
</xsl:element>
|
4000
4009
|
</xsl:variable>
|
4001
4010
|
|
@@ -4140,6 +4149,15 @@
|
|
4140
4149
|
|
4141
4150
|
</xsl:template>
|
4142
4151
|
|
4152
|
+
<xsl:template name="setBordersTableArray">
|
4153
|
+
|
4154
|
+
<xsl:if test="starts-with(@id, 'array_') or starts-with(ancestor::*[local-name() = 'table'][1]/@id, 'array_')">
|
4155
|
+
<!-- array - table without borders -->
|
4156
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
4157
|
+
</xsl:if>
|
4158
|
+
|
4159
|
+
</xsl:template>
|
4160
|
+
|
4143
4161
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
4144
4162
|
<xsl:param name="continued"/>
|
4145
4163
|
<xsl:if test="normalize-space() != ''">
|
@@ -4642,6 +4660,8 @@
|
|
4642
4660
|
<fo:table-row>
|
4643
4661
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
4644
4662
|
|
4663
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4664
|
+
|
4645
4665
|
<!-- fn will be processed inside 'note' processing -->
|
4646
4666
|
|
4647
4667
|
<!-- for BSI (not PAS) display Notes before footnotes -->
|
@@ -4818,6 +4838,8 @@
|
|
4818
4838
|
</xsl:when>
|
4819
4839
|
</xsl:choose>
|
4820
4840
|
|
4841
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4842
|
+
|
4821
4843
|
<xsl:call-template name="setTableRowAttributes"/>
|
4822
4844
|
|
4823
4845
|
<xsl:apply-templates/>
|
@@ -4845,6 +4867,8 @@
|
|
4845
4867
|
<xsl:attribute name="border-top"><xsl:value-of select="$table-border"/></xsl:attribute>
|
4846
4868
|
</xsl:if>
|
4847
4869
|
|
4870
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4871
|
+
|
4848
4872
|
<xsl:call-template name="setTableRowAttributes"/>
|
4849
4873
|
<xsl:apply-templates/>
|
4850
4874
|
</fo:table-row>
|
@@ -4869,6 +4893,8 @@
|
|
4869
4893
|
<xsl:attribute name="border-bottom"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
|
4870
4894
|
</xsl:if>
|
4871
4895
|
|
4896
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4897
|
+
|
4872
4898
|
<xsl:if test="$lang = 'ar'">
|
4873
4899
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4874
4900
|
</xsl:if>
|
@@ -4932,6 +4958,8 @@
|
|
4932
4958
|
</xsl:if>
|
4933
4959
|
<!-- <xsl:attribute name="page-break-inside">avoid</xsl:attribute> -->
|
4934
4960
|
|
4961
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4962
|
+
|
4935
4963
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
4936
4964
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4937
4965
|
</xsl:if>
|
@@ -8675,7 +8703,7 @@
|
|
8675
8703
|
<!-- sourcecode -->
|
8676
8704
|
<!-- =============== -->
|
8677
8705
|
|
8678
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
8706
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
8679
8707
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
8680
8708
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
8681
8709
|
|
@@ -10741,8 +10769,8 @@
|
|
10741
10769
|
|
10742
10770
|
<xsl:variable name="toc_level">
|
10743
10771
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
10744
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
10745
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
10772
|
+
<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:-->
|
10773
|
+
<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 -->
|
10746
10774
|
<xsl:choose>
|
10747
10775
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
10748
10776
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
@@ -11846,6 +11874,7 @@
|
|
11846
11874
|
<xsl:choose>
|
11847
11875
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
11848
11876
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
11877
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
11849
11878
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
11850
11879
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
11851
11880
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
@@ -1974,12 +1974,16 @@
|
|
1974
1974
|
<xsl:attribute name="text-align">
|
1975
1975
|
<xsl:choose>
|
1976
1976
|
<!-- <xsl:when test="ancestor::iso:preface">justify</xsl:when> -->
|
1977
|
-
<xsl:when test="@align
|
1977
|
+
<xsl:when test="@align = 'justified'">justify</xsl:when>
|
1978
|
+
<xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
|
1978
1979
|
<xsl:when test="ancestor::iso:td/@align"><xsl:value-of select="ancestor::iso:td/@align"/></xsl:when>
|
1979
1980
|
<xsl:when test="ancestor::iso:th/@align"><xsl:value-of select="ancestor::iso:th/@align"/></xsl:when>
|
1980
1981
|
<xsl:otherwise>justify</xsl:otherwise><!-- left -->
|
1981
1982
|
</xsl:choose>
|
1982
1983
|
</xsl:attribute>
|
1984
|
+
<xsl:if test="@align = 'indent'">
|
1985
|
+
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
1986
|
+
</xsl:if>
|
1983
1987
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1984
1988
|
<xsl:if test="count(ancestor::iso:li) = 1 and not(ancestor::iso:li[1]/following-sibling::iso:li) and not(following-sibling::iso:p)">
|
1985
1989
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
@@ -2326,14 +2330,14 @@
|
|
2326
2330
|
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 -->
|
2327
2331
|
|
2328
2332
|
<!--
|
2329
|
-
<
|
2333
|
+
<metanorma-extension>
|
2330
2334
|
<presentation-metadata>
|
2331
2335
|
<papersize>letter</papersize>
|
2332
2336
|
</presentation-metadata>
|
2333
|
-
</
|
2337
|
+
</metanorma-extension>
|
2334
2338
|
-->
|
2335
2339
|
|
2336
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2340
|
+
<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'])))"/>
|
2337
2341
|
<xsl:variable name="papersize_width_">
|
2338
2342
|
<xsl:choose>
|
2339
2343
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -2454,7 +2458,7 @@
|
|
2454
2458
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
2455
2459
|
|
2456
2460
|
<xsl:variable name="title-list-tables">
|
2457
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2461
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
2458
2462
|
<xsl:value-of select="$toc_table_title"/>
|
2459
2463
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
2460
2464
|
<xsl:call-template name="getTitle">
|
@@ -2464,7 +2468,7 @@
|
|
2464
2468
|
</xsl:variable>
|
2465
2469
|
|
2466
2470
|
<xsl:variable name="title-list-figures">
|
2467
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2471
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
2468
2472
|
<xsl:value-of select="$toc_figure_title"/>
|
2469
2473
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
2470
2474
|
<xsl:call-template name="getTitle">
|
@@ -2474,7 +2478,7 @@
|
|
2474
2478
|
</xsl:variable>
|
2475
2479
|
|
2476
2480
|
<xsl:variable name="title-list-recommendations">
|
2477
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2481
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
2478
2482
|
<xsl:value-of select="$toc_requirement_title"/>
|
2479
2483
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
2480
2484
|
<xsl:call-template name="getTitle">
|
@@ -2546,7 +2550,7 @@
|
|
2546
2550
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
2547
2551
|
|
2548
2552
|
<xsl:variable name="additional_fonts_">
|
2549
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
2553
|
+
<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']">
|
2550
2554
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
2551
2555
|
</xsl:for-each>
|
2552
2556
|
</xsl:variable>
|
@@ -3655,10 +3659,10 @@
|
|
3655
3659
|
|
3656
3660
|
<xsl:template name="processTablesFigures_Contents">
|
3657
3661
|
<xsl:param name="always"/>
|
3658
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
3662
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3659
3663
|
<xsl:call-template name="processTables_Contents"/>
|
3660
3664
|
</xsl:if>
|
3661
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
3665
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3662
3666
|
<xsl:call-template name="processFigures_Contents"/>
|
3663
3667
|
</xsl:if>
|
3664
3668
|
</xsl:template>
|
@@ -3966,6 +3970,9 @@
|
|
3966
3970
|
<xsl:if test="not(*[local-name() = 'name'])">
|
3967
3971
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
3968
3972
|
</xsl:if>
|
3973
|
+
<xsl:if test="starts-with(@id, 'array_')">
|
3974
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
3975
|
+
</xsl:if>
|
3969
3976
|
|
3970
3977
|
<!-- end table block-container attributes -->
|
3971
3978
|
|
@@ -3996,6 +4003,8 @@
|
|
3996
4003
|
<xsl:attribute name="border"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
|
3997
4004
|
</xsl:if>
|
3998
4005
|
|
4006
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4007
|
+
|
3999
4008
|
</xsl:element>
|
4000
4009
|
</xsl:variable>
|
4001
4010
|
|
@@ -4140,6 +4149,15 @@
|
|
4140
4149
|
|
4141
4150
|
</xsl:template>
|
4142
4151
|
|
4152
|
+
<xsl:template name="setBordersTableArray">
|
4153
|
+
|
4154
|
+
<xsl:if test="starts-with(@id, 'array_') or starts-with(ancestor::*[local-name() = 'table'][1]/@id, 'array_')">
|
4155
|
+
<!-- array - table without borders -->
|
4156
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
4157
|
+
</xsl:if>
|
4158
|
+
|
4159
|
+
</xsl:template>
|
4160
|
+
|
4143
4161
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
4144
4162
|
<xsl:param name="continued"/>
|
4145
4163
|
<xsl:if test="normalize-space() != ''">
|
@@ -4642,6 +4660,8 @@
|
|
4642
4660
|
<fo:table-row>
|
4643
4661
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
4644
4662
|
|
4663
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4664
|
+
|
4645
4665
|
<!-- fn will be processed inside 'note' processing -->
|
4646
4666
|
|
4647
4667
|
<!-- for BSI (not PAS) display Notes before footnotes -->
|
@@ -4818,6 +4838,8 @@
|
|
4818
4838
|
</xsl:when>
|
4819
4839
|
</xsl:choose>
|
4820
4840
|
|
4841
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4842
|
+
|
4821
4843
|
<xsl:call-template name="setTableRowAttributes"/>
|
4822
4844
|
|
4823
4845
|
<xsl:apply-templates/>
|
@@ -4845,6 +4867,8 @@
|
|
4845
4867
|
<xsl:attribute name="border-top"><xsl:value-of select="$table-border"/></xsl:attribute>
|
4846
4868
|
</xsl:if>
|
4847
4869
|
|
4870
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4871
|
+
|
4848
4872
|
<xsl:call-template name="setTableRowAttributes"/>
|
4849
4873
|
<xsl:apply-templates/>
|
4850
4874
|
</fo:table-row>
|
@@ -4869,6 +4893,8 @@
|
|
4869
4893
|
<xsl:attribute name="border-bottom"><xsl:value-of select="$table-cell-border"/></xsl:attribute>
|
4870
4894
|
</xsl:if>
|
4871
4895
|
|
4896
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4897
|
+
|
4872
4898
|
<xsl:if test="$lang = 'ar'">
|
4873
4899
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4874
4900
|
</xsl:if>
|
@@ -4932,6 +4958,8 @@
|
|
4932
4958
|
</xsl:if>
|
4933
4959
|
<!-- <xsl:attribute name="page-break-inside">avoid</xsl:attribute> -->
|
4934
4960
|
|
4961
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4962
|
+
|
4935
4963
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
4936
4964
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4937
4965
|
</xsl:if>
|
@@ -8675,7 +8703,7 @@
|
|
8675
8703
|
<!-- sourcecode -->
|
8676
8704
|
<!-- =============== -->
|
8677
8705
|
|
8678
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
8706
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
8679
8707
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
8680
8708
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
8681
8709
|
|
@@ -10741,8 +10769,8 @@
|
|
10741
10769
|
|
10742
10770
|
<xsl:variable name="toc_level">
|
10743
10771
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
10744
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
10745
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
10772
|
+
<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:-->
|
10773
|
+
<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 -->
|
10746
10774
|
<xsl:choose>
|
10747
10775
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
10748
10776
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
@@ -11846,6 +11874,7 @@
|
|
11846
11874
|
<xsl:choose>
|
11847
11875
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
11848
11876
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
11877
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
11849
11878
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
11850
11879
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
11851
11880
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|