metanorma-un 0.10.2 → 0.10.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/un/un.plenary-attachment.xsl +29 -12
- data/lib/isodoc/un/un.plenary.xsl +29 -12
- data/lib/isodoc/un/un.recommendation.xsl +29 -12
- data/lib/metanorma/un/biblio.rng +1 -1
- data/lib/metanorma/un/isodoc.rng +1 -1
- data/lib/metanorma/un/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: 41ff83b6e3a4da6dd0d9ecb65321c39aabfcfe70ba20bda707f7ea991ef9eac2
|
4
|
+
data.tar.gz: 709e49ec42a2b2ea48ed225601f2d8a0716cdfdd864d5aec6c775ad454617f1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db75076f8afb99308b895bcd318effaaf271e7c5588334307bf057dd82af901cd62065142a5cc9d13ec99b36609bbb77adc747d18764b4e063ec8ae5651c6580
|
7
|
+
data.tar.gz: 4f7d1c1a7c2295aaab897f2f1322b1d775d8ee1ecb5b2c425752cbd88db67534492cce9a3312654384aebbac3c50f9602761405bace87c524c1220d72560fcae
|
@@ -794,14 +794,14 @@
|
|
794
794
|
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 -->
|
795
795
|
|
796
796
|
<!--
|
797
|
-
<
|
797
|
+
<metanorma-extension>
|
798
798
|
<presentation-metadata>
|
799
799
|
<papersize>letter</papersize>
|
800
800
|
</presentation-metadata>
|
801
|
-
</
|
801
|
+
</metanorma-extension>
|
802
802
|
-->
|
803
803
|
|
804
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
804
|
+
<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'])))"/>
|
805
805
|
<xsl:variable name="papersize_width_">
|
806
806
|
<xsl:choose>
|
807
807
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -916,7 +916,7 @@
|
|
916
916
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
917
917
|
|
918
918
|
<xsl:variable name="title-list-tables">
|
919
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
919
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
920
920
|
<xsl:value-of select="$toc_table_title"/>
|
921
921
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
922
922
|
<xsl:call-template name="getTitle">
|
@@ -926,7 +926,7 @@
|
|
926
926
|
</xsl:variable>
|
927
927
|
|
928
928
|
<xsl:variable name="title-list-figures">
|
929
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
929
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
930
930
|
<xsl:value-of select="$toc_figure_title"/>
|
931
931
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
932
932
|
<xsl:call-template name="getTitle">
|
@@ -936,7 +936,7 @@
|
|
936
936
|
</xsl:variable>
|
937
937
|
|
938
938
|
<xsl:variable name="title-list-recommendations">
|
939
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
939
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
940
940
|
<xsl:value-of select="$toc_requirement_title"/>
|
941
941
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
942
942
|
<xsl:call-template name="getTitle">
|
@@ -1008,7 +1008,7 @@
|
|
1008
1008
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
1009
1009
|
|
1010
1010
|
<xsl:variable name="additional_fonts_">
|
1011
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
1011
|
+
<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']">
|
1012
1012
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
1013
1013
|
</xsl:for-each>
|
1014
1014
|
</xsl:variable>
|
@@ -2061,10 +2061,10 @@
|
|
2061
2061
|
|
2062
2062
|
<xsl:template name="processTablesFigures_Contents">
|
2063
2063
|
<xsl:param name="always"/>
|
2064
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2064
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2065
2065
|
<xsl:call-template name="processTables_Contents"/>
|
2066
2066
|
</xsl:if>
|
2067
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2067
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2068
2068
|
<xsl:call-template name="processFigures_Contents"/>
|
2069
2069
|
</xsl:if>
|
2070
2070
|
</xsl:template>
|
@@ -2406,6 +2406,8 @@
|
|
2406
2406
|
<xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
|
2407
2407
|
</xsl:if>
|
2408
2408
|
|
2409
|
+
<xsl:call-template name="setBordersTableArray"/>
|
2410
|
+
|
2409
2411
|
</xsl:element>
|
2410
2412
|
</xsl:variable>
|
2411
2413
|
|
@@ -2547,6 +2549,10 @@
|
|
2547
2549
|
|
2548
2550
|
</xsl:template>
|
2549
2551
|
|
2552
|
+
<xsl:template name="setBordersTableArray">
|
2553
|
+
|
2554
|
+
</xsl:template>
|
2555
|
+
|
2550
2556
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
2551
2557
|
<xsl:param name="continued"/>
|
2552
2558
|
<xsl:if test="normalize-space() != ''">
|
@@ -3021,6 +3027,8 @@
|
|
3021
3027
|
<fo:table-row>
|
3022
3028
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
3023
3029
|
|
3030
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3031
|
+
|
3024
3032
|
<!-- fn will be processed inside 'note' processing -->
|
3025
3033
|
|
3026
3034
|
<!-- for BSI (not PAS) display Notes before footnotes -->
|
@@ -3142,6 +3150,8 @@
|
|
3142
3150
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
3143
3151
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
3144
3152
|
|
3153
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3154
|
+
|
3145
3155
|
<xsl:call-template name="setTableRowAttributes"/>
|
3146
3156
|
|
3147
3157
|
<xsl:apply-templates/>
|
@@ -3165,6 +3175,8 @@
|
|
3165
3175
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3166
3176
|
</xsl:if>
|
3167
3177
|
|
3178
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3179
|
+
|
3168
3180
|
<xsl:call-template name="setTableRowAttributes"/>
|
3169
3181
|
<xsl:apply-templates/>
|
3170
3182
|
</fo:table-row>
|
@@ -3188,6 +3200,8 @@
|
|
3188
3200
|
<xsl:with-param name="default">center</xsl:with-param>
|
3189
3201
|
</xsl:call-template>
|
3190
3202
|
|
3203
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3204
|
+
|
3191
3205
|
<xsl:if test="$lang = 'ar'">
|
3192
3206
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3193
3207
|
</xsl:if>
|
@@ -3240,6 +3254,8 @@
|
|
3240
3254
|
|
3241
3255
|
<!-- bsi -->
|
3242
3256
|
|
3257
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3258
|
+
|
3243
3259
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
3244
3260
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3245
3261
|
</xsl:if>
|
@@ -6892,7 +6908,7 @@
|
|
6892
6908
|
<!-- sourcecode -->
|
6893
6909
|
<!-- =============== -->
|
6894
6910
|
|
6895
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
6911
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
6896
6912
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
6897
6913
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
6898
6914
|
|
@@ -8937,8 +8953,8 @@
|
|
8937
8953
|
|
8938
8954
|
<xsl:variable name="toc_level">
|
8939
8955
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
8940
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
8941
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
8956
|
+
<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:-->
|
8957
|
+
<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 -->
|
8942
8958
|
<xsl:choose>
|
8943
8959
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
8944
8960
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
@@ -9934,6 +9950,7 @@
|
|
9934
9950
|
<xsl:choose>
|
9935
9951
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
9936
9952
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
9953
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
9937
9954
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
9938
9955
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
9939
9956
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
@@ -794,14 +794,14 @@
|
|
794
794
|
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 -->
|
795
795
|
|
796
796
|
<!--
|
797
|
-
<
|
797
|
+
<metanorma-extension>
|
798
798
|
<presentation-metadata>
|
799
799
|
<papersize>letter</papersize>
|
800
800
|
</presentation-metadata>
|
801
|
-
</
|
801
|
+
</metanorma-extension>
|
802
802
|
-->
|
803
803
|
|
804
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
804
|
+
<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'])))"/>
|
805
805
|
<xsl:variable name="papersize_width_">
|
806
806
|
<xsl:choose>
|
807
807
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -916,7 +916,7 @@
|
|
916
916
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
917
917
|
|
918
918
|
<xsl:variable name="title-list-tables">
|
919
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
919
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
920
920
|
<xsl:value-of select="$toc_table_title"/>
|
921
921
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
922
922
|
<xsl:call-template name="getTitle">
|
@@ -926,7 +926,7 @@
|
|
926
926
|
</xsl:variable>
|
927
927
|
|
928
928
|
<xsl:variable name="title-list-figures">
|
929
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
929
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
930
930
|
<xsl:value-of select="$toc_figure_title"/>
|
931
931
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
932
932
|
<xsl:call-template name="getTitle">
|
@@ -936,7 +936,7 @@
|
|
936
936
|
</xsl:variable>
|
937
937
|
|
938
938
|
<xsl:variable name="title-list-recommendations">
|
939
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
939
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
940
940
|
<xsl:value-of select="$toc_requirement_title"/>
|
941
941
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
942
942
|
<xsl:call-template name="getTitle">
|
@@ -1008,7 +1008,7 @@
|
|
1008
1008
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
1009
1009
|
|
1010
1010
|
<xsl:variable name="additional_fonts_">
|
1011
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
1011
|
+
<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']">
|
1012
1012
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
1013
1013
|
</xsl:for-each>
|
1014
1014
|
</xsl:variable>
|
@@ -2061,10 +2061,10 @@
|
|
2061
2061
|
|
2062
2062
|
<xsl:template name="processTablesFigures_Contents">
|
2063
2063
|
<xsl:param name="always"/>
|
2064
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2064
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2065
2065
|
<xsl:call-template name="processTables_Contents"/>
|
2066
2066
|
</xsl:if>
|
2067
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2067
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2068
2068
|
<xsl:call-template name="processFigures_Contents"/>
|
2069
2069
|
</xsl:if>
|
2070
2070
|
</xsl:template>
|
@@ -2406,6 +2406,8 @@
|
|
2406
2406
|
<xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
|
2407
2407
|
</xsl:if>
|
2408
2408
|
|
2409
|
+
<xsl:call-template name="setBordersTableArray"/>
|
2410
|
+
|
2409
2411
|
</xsl:element>
|
2410
2412
|
</xsl:variable>
|
2411
2413
|
|
@@ -2547,6 +2549,10 @@
|
|
2547
2549
|
|
2548
2550
|
</xsl:template>
|
2549
2551
|
|
2552
|
+
<xsl:template name="setBordersTableArray">
|
2553
|
+
|
2554
|
+
</xsl:template>
|
2555
|
+
|
2550
2556
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
2551
2557
|
<xsl:param name="continued"/>
|
2552
2558
|
<xsl:if test="normalize-space() != ''">
|
@@ -3021,6 +3027,8 @@
|
|
3021
3027
|
<fo:table-row>
|
3022
3028
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
3023
3029
|
|
3030
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3031
|
+
|
3024
3032
|
<!-- fn will be processed inside 'note' processing -->
|
3025
3033
|
|
3026
3034
|
<!-- for BSI (not PAS) display Notes before footnotes -->
|
@@ -3142,6 +3150,8 @@
|
|
3142
3150
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
3143
3151
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
3144
3152
|
|
3153
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3154
|
+
|
3145
3155
|
<xsl:call-template name="setTableRowAttributes"/>
|
3146
3156
|
|
3147
3157
|
<xsl:apply-templates/>
|
@@ -3165,6 +3175,8 @@
|
|
3165
3175
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3166
3176
|
</xsl:if>
|
3167
3177
|
|
3178
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3179
|
+
|
3168
3180
|
<xsl:call-template name="setTableRowAttributes"/>
|
3169
3181
|
<xsl:apply-templates/>
|
3170
3182
|
</fo:table-row>
|
@@ -3188,6 +3200,8 @@
|
|
3188
3200
|
<xsl:with-param name="default">center</xsl:with-param>
|
3189
3201
|
</xsl:call-template>
|
3190
3202
|
|
3203
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3204
|
+
|
3191
3205
|
<xsl:if test="$lang = 'ar'">
|
3192
3206
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3193
3207
|
</xsl:if>
|
@@ -3240,6 +3254,8 @@
|
|
3240
3254
|
|
3241
3255
|
<!-- bsi -->
|
3242
3256
|
|
3257
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3258
|
+
|
3243
3259
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
3244
3260
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3245
3261
|
</xsl:if>
|
@@ -6892,7 +6908,7 @@
|
|
6892
6908
|
<!-- sourcecode -->
|
6893
6909
|
<!-- =============== -->
|
6894
6910
|
|
6895
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
6911
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
6896
6912
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
6897
6913
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
6898
6914
|
|
@@ -8937,8 +8953,8 @@
|
|
8937
8953
|
|
8938
8954
|
<xsl:variable name="toc_level">
|
8939
8955
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
8940
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
8941
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
8956
|
+
<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:-->
|
8957
|
+
<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 -->
|
8942
8958
|
<xsl:choose>
|
8943
8959
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
8944
8960
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
@@ -9934,6 +9950,7 @@
|
|
9934
9950
|
<xsl:choose>
|
9935
9951
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
9936
9952
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
9953
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
9937
9954
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
9938
9955
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
9939
9956
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
@@ -875,14 +875,14 @@
|
|
875
875
|
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 -->
|
876
876
|
|
877
877
|
<!--
|
878
|
-
<
|
878
|
+
<metanorma-extension>
|
879
879
|
<presentation-metadata>
|
880
880
|
<papersize>letter</papersize>
|
881
881
|
</presentation-metadata>
|
882
|
-
</
|
882
|
+
</metanorma-extension>
|
883
883
|
-->
|
884
884
|
|
885
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
885
|
+
<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'])))"/>
|
886
886
|
<xsl:variable name="papersize_width_">
|
887
887
|
<xsl:choose>
|
888
888
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -999,7 +999,7 @@
|
|
999
999
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
1000
1000
|
|
1001
1001
|
<xsl:variable name="title-list-tables">
|
1002
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1002
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
1003
1003
|
<xsl:value-of select="$toc_table_title"/>
|
1004
1004
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
1005
1005
|
<xsl:call-template name="getTitle">
|
@@ -1009,7 +1009,7 @@
|
|
1009
1009
|
</xsl:variable>
|
1010
1010
|
|
1011
1011
|
<xsl:variable name="title-list-figures">
|
1012
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1012
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
1013
1013
|
<xsl:value-of select="$toc_figure_title"/>
|
1014
1014
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
1015
1015
|
<xsl:call-template name="getTitle">
|
@@ -1019,7 +1019,7 @@
|
|
1019
1019
|
</xsl:variable>
|
1020
1020
|
|
1021
1021
|
<xsl:variable name="title-list-recommendations">
|
1022
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1022
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
1023
1023
|
<xsl:value-of select="$toc_requirement_title"/>
|
1024
1024
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
1025
1025
|
<xsl:call-template name="getTitle">
|
@@ -1091,7 +1091,7 @@
|
|
1091
1091
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
1092
1092
|
|
1093
1093
|
<xsl:variable name="additional_fonts_">
|
1094
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
1094
|
+
<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']">
|
1095
1095
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
1096
1096
|
</xsl:for-each>
|
1097
1097
|
</xsl:variable>
|
@@ -2129,10 +2129,10 @@
|
|
2129
2129
|
|
2130
2130
|
<xsl:template name="processTablesFigures_Contents">
|
2131
2131
|
<xsl:param name="always"/>
|
2132
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2132
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2133
2133
|
<xsl:call-template name="processTables_Contents"/>
|
2134
2134
|
</xsl:if>
|
2135
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2135
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
2136
2136
|
<xsl:call-template name="processFigures_Contents"/>
|
2137
2137
|
</xsl:if>
|
2138
2138
|
</xsl:template>
|
@@ -2478,6 +2478,8 @@
|
|
2478
2478
|
<xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
|
2479
2479
|
</xsl:if>
|
2480
2480
|
|
2481
|
+
<xsl:call-template name="setBordersTableArray"/>
|
2482
|
+
|
2481
2483
|
<xsl:if test="ancestor::*[local-name()='sections']">
|
2482
2484
|
<xsl:attribute name="border-top">1.5pt solid black</xsl:attribute>
|
2483
2485
|
<xsl:attribute name="border-bottom">1.5pt solid black</xsl:attribute>
|
@@ -2624,6 +2626,10 @@
|
|
2624
2626
|
|
2625
2627
|
</xsl:template>
|
2626
2628
|
|
2629
|
+
<xsl:template name="setBordersTableArray">
|
2630
|
+
|
2631
|
+
</xsl:template>
|
2632
|
+
|
2627
2633
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
2628
2634
|
<xsl:param name="continued"/>
|
2629
2635
|
<xsl:if test="normalize-space() != ''">
|
@@ -3098,6 +3104,8 @@
|
|
3098
3104
|
<fo:table-row>
|
3099
3105
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
3100
3106
|
|
3107
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3108
|
+
|
3101
3109
|
<!-- fn will be processed inside 'note' processing -->
|
3102
3110
|
|
3103
3111
|
<!-- for BSI (not PAS) display Notes before footnotes -->
|
@@ -3219,6 +3227,8 @@
|
|
3219
3227
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
3220
3228
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
3221
3229
|
|
3230
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3231
|
+
|
3222
3232
|
<xsl:call-template name="setTableRowAttributes"/>
|
3223
3233
|
|
3224
3234
|
<xsl:apply-templates/>
|
@@ -3242,6 +3252,8 @@
|
|
3242
3252
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3243
3253
|
</xsl:if>
|
3244
3254
|
|
3255
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3256
|
+
|
3245
3257
|
<xsl:call-template name="setTableRowAttributes"/>
|
3246
3258
|
<xsl:apply-templates/>
|
3247
3259
|
</fo:table-row>
|
@@ -3261,6 +3273,8 @@
|
|
3261
3273
|
<xsl:with-param name="default">center</xsl:with-param>
|
3262
3274
|
</xsl:call-template>
|
3263
3275
|
|
3276
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3277
|
+
|
3264
3278
|
<xsl:if test="ancestor::*[local-name()='sections']">
|
3265
3279
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
3266
3280
|
<xsl:attribute name="display-align">before</xsl:attribute>
|
@@ -3328,6 +3342,8 @@
|
|
3328
3342
|
|
3329
3343
|
<!-- bsi -->
|
3330
3344
|
|
3345
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3346
|
+
|
3331
3347
|
<xsl:if test="ancestor::*[local-name()='sections']">
|
3332
3348
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
3333
3349
|
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
@@ -6994,7 +7010,7 @@
|
|
6994
7010
|
<!-- sourcecode -->
|
6995
7011
|
<!-- =============== -->
|
6996
7012
|
|
6997
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
7013
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
6998
7014
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
6999
7015
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
7000
7016
|
|
@@ -9039,8 +9055,8 @@
|
|
9039
9055
|
|
9040
9056
|
<xsl:variable name="toc_level">
|
9041
9057
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
9042
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
9043
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
9058
|
+
<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:-->
|
9059
|
+
<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 -->
|
9044
9060
|
<xsl:choose>
|
9045
9061
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
9046
9062
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
@@ -10037,6 +10053,7 @@
|
|
10037
10053
|
<xsl:choose>
|
10038
10054
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
10039
10055
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
10056
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
10040
10057
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
10041
10058
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
10042
10059
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
data/lib/metanorma/un/biblio.rng
CHANGED
@@ -1316,7 +1316,7 @@
|
|
1316
1316
|
<value>commentaryOf</value>
|
1317
1317
|
<value>hasCommentary</value>
|
1318
1318
|
<value>related</value>
|
1319
|
-
<value>
|
1319
|
+
<value>hasComplement</value>
|
1320
1320
|
<value>complementOf</value>
|
1321
1321
|
<value>obsoletes</value>
|
1322
1322
|
<value>obsoletedBy</value>
|
data/lib/metanorma/un/isodoc.rng
CHANGED
data/lib/metanorma/un/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-un
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iso-639
|