metanorma-bipm 2.2.2 → 2.2.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/bipm/base_convert.rb +3 -3
- data/lib/isodoc/bipm/bipm.brochure.xsl +29 -12
- data/lib/isodoc/bipm/bipm.guide.xsl +29 -12
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +29 -12
- data/lib/isodoc/bipm/bipm.rapport.xsl +29 -12
- data/lib/isodoc/bipm/jcgm.standard.xsl +29 -12
- data/lib/metanorma/bipm/biblio.rng +1 -1
- data/lib/metanorma/bipm/isodoc.rng +1 -1
- data/lib/metanorma/bipm/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: 35c5ab21f229cea538768c183e03a233d111f888778ab2854eb38230d281c27f
|
4
|
+
data.tar.gz: 54afcb5e5381ad9f32d977d5edb7dbf5aec9959f5edd88bcd8b7d67dd5352629
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e23ed3b3c67bfda7c19d9c4b483e4c906535d4b7cbe266d2489b9c90a80e2f3d0954d2612038290c36b1ac6a7ff21f513db67e4736f6a5e0e2ae286de403d19
|
7
|
+
data.tar.gz: a456e30efc6e8a75fb041fada6d134cc43369745278e5971e744dcffa2715809cb743909f8ab3b307414e684a96522144c6ba3e8e827d14ddb714ce3b392608a
|
@@ -35,15 +35,15 @@ module IsoDoc
|
|
35
35
|
|
36
36
|
def render_identifier(ident)
|
37
37
|
ret = super
|
38
|
-
ret[:sdo] = ret[:sdo]&.sub(/^(BIPM)
|
39
|
-
"\\1
|
38
|
+
ret[:sdo] = ret[:sdo]&.sub(/^(BIPM)([ ])(PV|CR)([ ])(\d.*)$/,
|
39
|
+
"\\1\\2<strong>\\3</strong>,\\4\\5")
|
40
40
|
ret
|
41
41
|
end
|
42
42
|
|
43
43
|
def implicit_reference(bib)
|
44
44
|
b = bib.at(ns("./docidentifier[@primary = 'true'][@type = 'BIPM']"))
|
45
45
|
doctype = bib.at(ns("//bibdata/ext/doctype"))&.text
|
46
|
-
return true if doctype == "brochure" && /^(CGPM|CIPM|CCDS|CCTF)
|
46
|
+
return true if doctype == "brochure" && /^(CGPM|CIPM|CCDS|CCTF)[ ]
|
47
47
|
(Resolution|Recommendation|Declaration|Decision|Recommendation|Meeting)/x
|
48
48
|
.match?(b&.text)
|
49
49
|
|
@@ -3897,14 +3897,14 @@
|
|
3897
3897
|
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 -->
|
3898
3898
|
|
3899
3899
|
<!--
|
3900
|
-
<
|
3900
|
+
<metanorma-extension>
|
3901
3901
|
<presentation-metadata>
|
3902
3902
|
<papersize>letter</papersize>
|
3903
3903
|
</presentation-metadata>
|
3904
|
-
</
|
3904
|
+
</metanorma-extension>
|
3905
3905
|
-->
|
3906
3906
|
|
3907
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
3907
|
+
<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'])))"/>
|
3908
3908
|
<xsl:variable name="papersize_width_">
|
3909
3909
|
<xsl:choose>
|
3910
3910
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -4023,7 +4023,7 @@
|
|
4023
4023
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
4024
4024
|
|
4025
4025
|
<xsl:variable name="title-list-tables">
|
4026
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
4026
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
4027
4027
|
<xsl:value-of select="$toc_table_title"/>
|
4028
4028
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
4029
4029
|
<xsl:call-template name="getTitle">
|
@@ -4033,7 +4033,7 @@
|
|
4033
4033
|
</xsl:variable>
|
4034
4034
|
|
4035
4035
|
<xsl:variable name="title-list-figures">
|
4036
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
4036
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
4037
4037
|
<xsl:value-of select="$toc_figure_title"/>
|
4038
4038
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
4039
4039
|
<xsl:call-template name="getTitle">
|
@@ -4043,7 +4043,7 @@
|
|
4043
4043
|
</xsl:variable>
|
4044
4044
|
|
4045
4045
|
<xsl:variable name="title-list-recommendations">
|
4046
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
4046
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
4047
4047
|
<xsl:value-of select="$toc_requirement_title"/>
|
4048
4048
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
4049
4049
|
<xsl:call-template name="getTitle">
|
@@ -4115,7 +4115,7 @@
|
|
4115
4115
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
4116
4116
|
|
4117
4117
|
<xsl:variable name="additional_fonts_">
|
4118
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
4118
|
+
<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']">
|
4119
4119
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
4120
4120
|
</xsl:for-each>
|
4121
4121
|
</xsl:variable>
|
@@ -5181,10 +5181,10 @@
|
|
5181
5181
|
|
5182
5182
|
<xsl:template name="processTablesFigures_Contents">
|
5183
5183
|
<xsl:param name="always"/>
|
5184
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
5184
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
5185
5185
|
<xsl:call-template name="processTables_Contents"/>
|
5186
5186
|
</xsl:if>
|
5187
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
5187
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
5188
5188
|
<xsl:call-template name="processFigures_Contents"/>
|
5189
5189
|
</xsl:if>
|
5190
5190
|
</xsl:template>
|
@@ -5537,6 +5537,8 @@
|
|
5537
5537
|
<xsl:attribute name="border-bottom">0.5pt solid black</xsl:attribute>
|
5538
5538
|
</xsl:if>
|
5539
5539
|
|
5540
|
+
<xsl:call-template name="setBordersTableArray"/>
|
5541
|
+
|
5540
5542
|
</xsl:element>
|
5541
5543
|
</xsl:variable>
|
5542
5544
|
|
@@ -5678,6 +5680,10 @@
|
|
5678
5680
|
|
5679
5681
|
</xsl:template>
|
5680
5682
|
|
5683
|
+
<xsl:template name="setBordersTableArray">
|
5684
|
+
|
5685
|
+
</xsl:template>
|
5686
|
+
|
5681
5687
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
5682
5688
|
<xsl:param name="continued"/>
|
5683
5689
|
<xsl:if test="normalize-space() != ''">
|
@@ -6172,6 +6178,8 @@
|
|
6172
6178
|
<fo:table-row>
|
6173
6179
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
6174
6180
|
|
6181
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6182
|
+
|
6175
6183
|
<!-- fn will be processed inside 'note' processing -->
|
6176
6184
|
|
6177
6185
|
<xsl:if test="count(ancestor::bipm:table//*[local-name()='note']) > 1">
|
@@ -6303,6 +6311,8 @@
|
|
6303
6311
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
6304
6312
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
6305
6313
|
|
6314
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6315
|
+
|
6306
6316
|
<xsl:call-template name="setTableRowAttributes"/>
|
6307
6317
|
|
6308
6318
|
<xsl:apply-templates/>
|
@@ -6326,6 +6336,8 @@
|
|
6326
6336
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
6327
6337
|
</xsl:if>
|
6328
6338
|
|
6339
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6340
|
+
|
6329
6341
|
<xsl:call-template name="setTableRowAttributes"/>
|
6330
6342
|
<xsl:apply-templates/>
|
6331
6343
|
</fo:table-row>
|
@@ -6363,6 +6375,8 @@
|
|
6363
6375
|
<xsl:attribute name="display-align">before</xsl:attribute>
|
6364
6376
|
</xsl:if>
|
6365
6377
|
|
6378
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6379
|
+
|
6366
6380
|
<xsl:if test="$lang = 'ar'">
|
6367
6381
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
6368
6382
|
</xsl:if>
|
@@ -6426,6 +6440,8 @@
|
|
6426
6440
|
|
6427
6441
|
<!-- bsi -->
|
6428
6442
|
|
6443
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6444
|
+
|
6429
6445
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
6430
6446
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
6431
6447
|
</xsl:if>
|
@@ -10171,7 +10187,7 @@
|
|
10171
10187
|
<!-- sourcecode -->
|
10172
10188
|
<!-- =============== -->
|
10173
10189
|
|
10174
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
10190
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
10175
10191
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
10176
10192
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
10177
10193
|
|
@@ -12229,8 +12245,8 @@
|
|
12229
12245
|
|
12230
12246
|
<xsl:variable name="toc_level">
|
12231
12247
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
12232
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
12233
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
12248
|
+
<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:-->
|
12249
|
+
<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 -->
|
12234
12250
|
<xsl:choose>
|
12235
12251
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
12236
12252
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
@@ -13222,6 +13238,7 @@
|
|
13222
13238
|
<xsl:choose>
|
13223
13239
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
13224
13240
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
13241
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
13225
13242
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
13226
13243
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
13227
13244
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
@@ -3897,14 +3897,14 @@
|
|
3897
3897
|
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 -->
|
3898
3898
|
|
3899
3899
|
<!--
|
3900
|
-
<
|
3900
|
+
<metanorma-extension>
|
3901
3901
|
<presentation-metadata>
|
3902
3902
|
<papersize>letter</papersize>
|
3903
3903
|
</presentation-metadata>
|
3904
|
-
</
|
3904
|
+
</metanorma-extension>
|
3905
3905
|
-->
|
3906
3906
|
|
3907
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
3907
|
+
<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'])))"/>
|
3908
3908
|
<xsl:variable name="papersize_width_">
|
3909
3909
|
<xsl:choose>
|
3910
3910
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -4023,7 +4023,7 @@
|
|
4023
4023
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
4024
4024
|
|
4025
4025
|
<xsl:variable name="title-list-tables">
|
4026
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
4026
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
4027
4027
|
<xsl:value-of select="$toc_table_title"/>
|
4028
4028
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
4029
4029
|
<xsl:call-template name="getTitle">
|
@@ -4033,7 +4033,7 @@
|
|
4033
4033
|
</xsl:variable>
|
4034
4034
|
|
4035
4035
|
<xsl:variable name="title-list-figures">
|
4036
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
4036
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
4037
4037
|
<xsl:value-of select="$toc_figure_title"/>
|
4038
4038
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
4039
4039
|
<xsl:call-template name="getTitle">
|
@@ -4043,7 +4043,7 @@
|
|
4043
4043
|
</xsl:variable>
|
4044
4044
|
|
4045
4045
|
<xsl:variable name="title-list-recommendations">
|
4046
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
4046
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
4047
4047
|
<xsl:value-of select="$toc_requirement_title"/>
|
4048
4048
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
4049
4049
|
<xsl:call-template name="getTitle">
|
@@ -4115,7 +4115,7 @@
|
|
4115
4115
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
4116
4116
|
|
4117
4117
|
<xsl:variable name="additional_fonts_">
|
4118
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
4118
|
+
<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']">
|
4119
4119
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
4120
4120
|
</xsl:for-each>
|
4121
4121
|
</xsl:variable>
|
@@ -5181,10 +5181,10 @@
|
|
5181
5181
|
|
5182
5182
|
<xsl:template name="processTablesFigures_Contents">
|
5183
5183
|
<xsl:param name="always"/>
|
5184
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
5184
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
5185
5185
|
<xsl:call-template name="processTables_Contents"/>
|
5186
5186
|
</xsl:if>
|
5187
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
5187
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
5188
5188
|
<xsl:call-template name="processFigures_Contents"/>
|
5189
5189
|
</xsl:if>
|
5190
5190
|
</xsl:template>
|
@@ -5537,6 +5537,8 @@
|
|
5537
5537
|
<xsl:attribute name="border-bottom">0.5pt solid black</xsl:attribute>
|
5538
5538
|
</xsl:if>
|
5539
5539
|
|
5540
|
+
<xsl:call-template name="setBordersTableArray"/>
|
5541
|
+
|
5540
5542
|
</xsl:element>
|
5541
5543
|
</xsl:variable>
|
5542
5544
|
|
@@ -5678,6 +5680,10 @@
|
|
5678
5680
|
|
5679
5681
|
</xsl:template>
|
5680
5682
|
|
5683
|
+
<xsl:template name="setBordersTableArray">
|
5684
|
+
|
5685
|
+
</xsl:template>
|
5686
|
+
|
5681
5687
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
5682
5688
|
<xsl:param name="continued"/>
|
5683
5689
|
<xsl:if test="normalize-space() != ''">
|
@@ -6172,6 +6178,8 @@
|
|
6172
6178
|
<fo:table-row>
|
6173
6179
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
6174
6180
|
|
6181
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6182
|
+
|
6175
6183
|
<!-- fn will be processed inside 'note' processing -->
|
6176
6184
|
|
6177
6185
|
<xsl:if test="count(ancestor::bipm:table//*[local-name()='note']) > 1">
|
@@ -6303,6 +6311,8 @@
|
|
6303
6311
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
6304
6312
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
6305
6313
|
|
6314
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6315
|
+
|
6306
6316
|
<xsl:call-template name="setTableRowAttributes"/>
|
6307
6317
|
|
6308
6318
|
<xsl:apply-templates/>
|
@@ -6326,6 +6336,8 @@
|
|
6326
6336
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
6327
6337
|
</xsl:if>
|
6328
6338
|
|
6339
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6340
|
+
|
6329
6341
|
<xsl:call-template name="setTableRowAttributes"/>
|
6330
6342
|
<xsl:apply-templates/>
|
6331
6343
|
</fo:table-row>
|
@@ -6363,6 +6375,8 @@
|
|
6363
6375
|
<xsl:attribute name="display-align">before</xsl:attribute>
|
6364
6376
|
</xsl:if>
|
6365
6377
|
|
6378
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6379
|
+
|
6366
6380
|
<xsl:if test="$lang = 'ar'">
|
6367
6381
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
6368
6382
|
</xsl:if>
|
@@ -6426,6 +6440,8 @@
|
|
6426
6440
|
|
6427
6441
|
<!-- bsi -->
|
6428
6442
|
|
6443
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6444
|
+
|
6429
6445
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
6430
6446
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
6431
6447
|
</xsl:if>
|
@@ -10171,7 +10187,7 @@
|
|
10171
10187
|
<!-- sourcecode -->
|
10172
10188
|
<!-- =============== -->
|
10173
10189
|
|
10174
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
10190
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
10175
10191
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
10176
10192
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
10177
10193
|
|
@@ -12229,8 +12245,8 @@
|
|
12229
12245
|
|
12230
12246
|
<xsl:variable name="toc_level">
|
12231
12247
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
12232
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
12233
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
12248
|
+
<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:-->
|
12249
|
+
<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 -->
|
12234
12250
|
<xsl:choose>
|
12235
12251
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
12236
12252
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
@@ -13222,6 +13238,7 @@
|
|
13222
13238
|
<xsl:choose>
|
13223
13239
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
13224
13240
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
13241
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
13225
13242
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
13226
13243
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
13227
13244
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
@@ -3897,14 +3897,14 @@
|
|
3897
3897
|
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 -->
|
3898
3898
|
|
3899
3899
|
<!--
|
3900
|
-
<
|
3900
|
+
<metanorma-extension>
|
3901
3901
|
<presentation-metadata>
|
3902
3902
|
<papersize>letter</papersize>
|
3903
3903
|
</presentation-metadata>
|
3904
|
-
</
|
3904
|
+
</metanorma-extension>
|
3905
3905
|
-->
|
3906
3906
|
|
3907
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
3907
|
+
<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'])))"/>
|
3908
3908
|
<xsl:variable name="papersize_width_">
|
3909
3909
|
<xsl:choose>
|
3910
3910
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -4023,7 +4023,7 @@
|
|
4023
4023
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
4024
4024
|
|
4025
4025
|
<xsl:variable name="title-list-tables">
|
4026
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
4026
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
4027
4027
|
<xsl:value-of select="$toc_table_title"/>
|
4028
4028
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
4029
4029
|
<xsl:call-template name="getTitle">
|
@@ -4033,7 +4033,7 @@
|
|
4033
4033
|
</xsl:variable>
|
4034
4034
|
|
4035
4035
|
<xsl:variable name="title-list-figures">
|
4036
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
4036
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
4037
4037
|
<xsl:value-of select="$toc_figure_title"/>
|
4038
4038
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
4039
4039
|
<xsl:call-template name="getTitle">
|
@@ -4043,7 +4043,7 @@
|
|
4043
4043
|
</xsl:variable>
|
4044
4044
|
|
4045
4045
|
<xsl:variable name="title-list-recommendations">
|
4046
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
4046
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
4047
4047
|
<xsl:value-of select="$toc_requirement_title"/>
|
4048
4048
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
4049
4049
|
<xsl:call-template name="getTitle">
|
@@ -4115,7 +4115,7 @@
|
|
4115
4115
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
4116
4116
|
|
4117
4117
|
<xsl:variable name="additional_fonts_">
|
4118
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
4118
|
+
<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']">
|
4119
4119
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
4120
4120
|
</xsl:for-each>
|
4121
4121
|
</xsl:variable>
|
@@ -5181,10 +5181,10 @@
|
|
5181
5181
|
|
5182
5182
|
<xsl:template name="processTablesFigures_Contents">
|
5183
5183
|
<xsl:param name="always"/>
|
5184
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
5184
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
5185
5185
|
<xsl:call-template name="processTables_Contents"/>
|
5186
5186
|
</xsl:if>
|
5187
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
5187
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
5188
5188
|
<xsl:call-template name="processFigures_Contents"/>
|
5189
5189
|
</xsl:if>
|
5190
5190
|
</xsl:template>
|
@@ -5537,6 +5537,8 @@
|
|
5537
5537
|
<xsl:attribute name="border-bottom">0.5pt solid black</xsl:attribute>
|
5538
5538
|
</xsl:if>
|
5539
5539
|
|
5540
|
+
<xsl:call-template name="setBordersTableArray"/>
|
5541
|
+
|
5540
5542
|
</xsl:element>
|
5541
5543
|
</xsl:variable>
|
5542
5544
|
|
@@ -5678,6 +5680,10 @@
|
|
5678
5680
|
|
5679
5681
|
</xsl:template>
|
5680
5682
|
|
5683
|
+
<xsl:template name="setBordersTableArray">
|
5684
|
+
|
5685
|
+
</xsl:template>
|
5686
|
+
|
5681
5687
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
5682
5688
|
<xsl:param name="continued"/>
|
5683
5689
|
<xsl:if test="normalize-space() != ''">
|
@@ -6172,6 +6178,8 @@
|
|
6172
6178
|
<fo:table-row>
|
6173
6179
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
6174
6180
|
|
6181
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6182
|
+
|
6175
6183
|
<!-- fn will be processed inside 'note' processing -->
|
6176
6184
|
|
6177
6185
|
<xsl:if test="count(ancestor::bipm:table//*[local-name()='note']) > 1">
|
@@ -6303,6 +6311,8 @@
|
|
6303
6311
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
6304
6312
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
6305
6313
|
|
6314
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6315
|
+
|
6306
6316
|
<xsl:call-template name="setTableRowAttributes"/>
|
6307
6317
|
|
6308
6318
|
<xsl:apply-templates/>
|
@@ -6326,6 +6336,8 @@
|
|
6326
6336
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
6327
6337
|
</xsl:if>
|
6328
6338
|
|
6339
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6340
|
+
|
6329
6341
|
<xsl:call-template name="setTableRowAttributes"/>
|
6330
6342
|
<xsl:apply-templates/>
|
6331
6343
|
</fo:table-row>
|
@@ -6363,6 +6375,8 @@
|
|
6363
6375
|
<xsl:attribute name="display-align">before</xsl:attribute>
|
6364
6376
|
</xsl:if>
|
6365
6377
|
|
6378
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6379
|
+
|
6366
6380
|
<xsl:if test="$lang = 'ar'">
|
6367
6381
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
6368
6382
|
</xsl:if>
|
@@ -6426,6 +6440,8 @@
|
|
6426
6440
|
|
6427
6441
|
<!-- bsi -->
|
6428
6442
|
|
6443
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6444
|
+
|
6429
6445
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
6430
6446
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
6431
6447
|
</xsl:if>
|
@@ -10171,7 +10187,7 @@
|
|
10171
10187
|
<!-- sourcecode -->
|
10172
10188
|
<!-- =============== -->
|
10173
10189
|
|
10174
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
10190
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
10175
10191
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
10176
10192
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
10177
10193
|
|
@@ -12229,8 +12245,8 @@
|
|
12229
12245
|
|
12230
12246
|
<xsl:variable name="toc_level">
|
12231
12247
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
12232
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
12233
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
12248
|
+
<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:-->
|
12249
|
+
<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 -->
|
12234
12250
|
<xsl:choose>
|
12235
12251
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
12236
12252
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
@@ -13222,6 +13238,7 @@
|
|
13222
13238
|
<xsl:choose>
|
13223
13239
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
13224
13240
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
13241
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
13225
13242
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
13226
13243
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
13227
13244
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
@@ -3897,14 +3897,14 @@
|
|
3897
3897
|
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 -->
|
3898
3898
|
|
3899
3899
|
<!--
|
3900
|
-
<
|
3900
|
+
<metanorma-extension>
|
3901
3901
|
<presentation-metadata>
|
3902
3902
|
<papersize>letter</papersize>
|
3903
3903
|
</presentation-metadata>
|
3904
|
-
</
|
3904
|
+
</metanorma-extension>
|
3905
3905
|
-->
|
3906
3906
|
|
3907
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
3907
|
+
<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'])))"/>
|
3908
3908
|
<xsl:variable name="papersize_width_">
|
3909
3909
|
<xsl:choose>
|
3910
3910
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -4023,7 +4023,7 @@
|
|
4023
4023
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
4024
4024
|
|
4025
4025
|
<xsl:variable name="title-list-tables">
|
4026
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
4026
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
4027
4027
|
<xsl:value-of select="$toc_table_title"/>
|
4028
4028
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
4029
4029
|
<xsl:call-template name="getTitle">
|
@@ -4033,7 +4033,7 @@
|
|
4033
4033
|
</xsl:variable>
|
4034
4034
|
|
4035
4035
|
<xsl:variable name="title-list-figures">
|
4036
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
4036
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
4037
4037
|
<xsl:value-of select="$toc_figure_title"/>
|
4038
4038
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
4039
4039
|
<xsl:call-template name="getTitle">
|
@@ -4043,7 +4043,7 @@
|
|
4043
4043
|
</xsl:variable>
|
4044
4044
|
|
4045
4045
|
<xsl:variable name="title-list-recommendations">
|
4046
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
4046
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
4047
4047
|
<xsl:value-of select="$toc_requirement_title"/>
|
4048
4048
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
4049
4049
|
<xsl:call-template name="getTitle">
|
@@ -4115,7 +4115,7 @@
|
|
4115
4115
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
4116
4116
|
|
4117
4117
|
<xsl:variable name="additional_fonts_">
|
4118
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
4118
|
+
<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']">
|
4119
4119
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
4120
4120
|
</xsl:for-each>
|
4121
4121
|
</xsl:variable>
|
@@ -5181,10 +5181,10 @@
|
|
5181
5181
|
|
5182
5182
|
<xsl:template name="processTablesFigures_Contents">
|
5183
5183
|
<xsl:param name="always"/>
|
5184
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
5184
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
5185
5185
|
<xsl:call-template name="processTables_Contents"/>
|
5186
5186
|
</xsl:if>
|
5187
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
5187
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
5188
5188
|
<xsl:call-template name="processFigures_Contents"/>
|
5189
5189
|
</xsl:if>
|
5190
5190
|
</xsl:template>
|
@@ -5537,6 +5537,8 @@
|
|
5537
5537
|
<xsl:attribute name="border-bottom">0.5pt solid black</xsl:attribute>
|
5538
5538
|
</xsl:if>
|
5539
5539
|
|
5540
|
+
<xsl:call-template name="setBordersTableArray"/>
|
5541
|
+
|
5540
5542
|
</xsl:element>
|
5541
5543
|
</xsl:variable>
|
5542
5544
|
|
@@ -5678,6 +5680,10 @@
|
|
5678
5680
|
|
5679
5681
|
</xsl:template>
|
5680
5682
|
|
5683
|
+
<xsl:template name="setBordersTableArray">
|
5684
|
+
|
5685
|
+
</xsl:template>
|
5686
|
+
|
5681
5687
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
5682
5688
|
<xsl:param name="continued"/>
|
5683
5689
|
<xsl:if test="normalize-space() != ''">
|
@@ -6172,6 +6178,8 @@
|
|
6172
6178
|
<fo:table-row>
|
6173
6179
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
6174
6180
|
|
6181
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6182
|
+
|
6175
6183
|
<!-- fn will be processed inside 'note' processing -->
|
6176
6184
|
|
6177
6185
|
<xsl:if test="count(ancestor::bipm:table//*[local-name()='note']) > 1">
|
@@ -6303,6 +6311,8 @@
|
|
6303
6311
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
6304
6312
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
6305
6313
|
|
6314
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6315
|
+
|
6306
6316
|
<xsl:call-template name="setTableRowAttributes"/>
|
6307
6317
|
|
6308
6318
|
<xsl:apply-templates/>
|
@@ -6326,6 +6336,8 @@
|
|
6326
6336
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
6327
6337
|
</xsl:if>
|
6328
6338
|
|
6339
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6340
|
+
|
6329
6341
|
<xsl:call-template name="setTableRowAttributes"/>
|
6330
6342
|
<xsl:apply-templates/>
|
6331
6343
|
</fo:table-row>
|
@@ -6363,6 +6375,8 @@
|
|
6363
6375
|
<xsl:attribute name="display-align">before</xsl:attribute>
|
6364
6376
|
</xsl:if>
|
6365
6377
|
|
6378
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6379
|
+
|
6366
6380
|
<xsl:if test="$lang = 'ar'">
|
6367
6381
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
6368
6382
|
</xsl:if>
|
@@ -6426,6 +6440,8 @@
|
|
6426
6440
|
|
6427
6441
|
<!-- bsi -->
|
6428
6442
|
|
6443
|
+
<xsl:call-template name="setBordersTableArray"/>
|
6444
|
+
|
6429
6445
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
6430
6446
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
6431
6447
|
</xsl:if>
|
@@ -10171,7 +10187,7 @@
|
|
10171
10187
|
<!-- sourcecode -->
|
10172
10188
|
<!-- =============== -->
|
10173
10189
|
|
10174
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
10190
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
10175
10191
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
10176
10192
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
10177
10193
|
|
@@ -12229,8 +12245,8 @@
|
|
12229
12245
|
|
12230
12246
|
<xsl:variable name="toc_level">
|
12231
12247
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
12232
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
12233
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
12248
|
+
<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:-->
|
12249
|
+
<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 -->
|
12234
12250
|
<xsl:choose>
|
12235
12251
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
12236
12252
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
@@ -13222,6 +13238,7 @@
|
|
13222
13238
|
<xsl:choose>
|
13223
13239
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
13224
13240
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
13241
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
13225
13242
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
13226
13243
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
13227
13244
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
@@ -1750,14 +1750,14 @@
|
|
1750
1750
|
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 -->
|
1751
1751
|
|
1752
1752
|
<!--
|
1753
|
-
<
|
1753
|
+
<metanorma-extension>
|
1754
1754
|
<presentation-metadata>
|
1755
1755
|
<papersize>letter</papersize>
|
1756
1756
|
</presentation-metadata>
|
1757
|
-
</
|
1757
|
+
</metanorma-extension>
|
1758
1758
|
-->
|
1759
1759
|
|
1760
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1760
|
+
<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'])))"/>
|
1761
1761
|
<xsl:variable name="papersize_width_">
|
1762
1762
|
<xsl:choose>
|
1763
1763
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -1872,7 +1872,7 @@
|
|
1872
1872
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
1873
1873
|
|
1874
1874
|
<xsl:variable name="title-list-tables">
|
1875
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1875
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
1876
1876
|
<xsl:value-of select="$toc_table_title"/>
|
1877
1877
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
1878
1878
|
<xsl:call-template name="getTitle">
|
@@ -1882,7 +1882,7 @@
|
|
1882
1882
|
</xsl:variable>
|
1883
1883
|
|
1884
1884
|
<xsl:variable name="title-list-figures">
|
1885
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1885
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
1886
1886
|
<xsl:value-of select="$toc_figure_title"/>
|
1887
1887
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
1888
1888
|
<xsl:call-template name="getTitle">
|
@@ -1892,7 +1892,7 @@
|
|
1892
1892
|
</xsl:variable>
|
1893
1893
|
|
1894
1894
|
<xsl:variable name="title-list-recommendations">
|
1895
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
1895
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
1896
1896
|
<xsl:value-of select="$toc_requirement_title"/>
|
1897
1897
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
1898
1898
|
<xsl:call-template name="getTitle">
|
@@ -1964,7 +1964,7 @@
|
|
1964
1964
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
1965
1965
|
|
1966
1966
|
<xsl:variable name="additional_fonts_">
|
1967
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
1967
|
+
<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']">
|
1968
1968
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
1969
1969
|
</xsl:for-each>
|
1970
1970
|
</xsl:variable>
|
@@ -3055,10 +3055,10 @@
|
|
3055
3055
|
|
3056
3056
|
<xsl:template name="processTablesFigures_Contents">
|
3057
3057
|
<xsl:param name="always"/>
|
3058
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
3058
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3059
3059
|
<xsl:call-template name="processTables_Contents"/>
|
3060
3060
|
</xsl:if>
|
3061
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
3061
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3062
3062
|
<xsl:call-template name="processFigures_Contents"/>
|
3063
3063
|
</xsl:if>
|
3064
3064
|
</xsl:template>
|
@@ -3383,6 +3383,8 @@
|
|
3383
3383
|
|
3384
3384
|
<xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
|
3385
3385
|
|
3386
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3387
|
+
|
3386
3388
|
<xsl:if test="*[local-name()='thead']">
|
3387
3389
|
<xsl:attribute name="border-top">1pt solid black</xsl:attribute>
|
3388
3390
|
</xsl:if>
|
@@ -3531,6 +3533,10 @@
|
|
3531
3533
|
|
3532
3534
|
</xsl:template>
|
3533
3535
|
|
3536
|
+
<xsl:template name="setBordersTableArray">
|
3537
|
+
|
3538
|
+
</xsl:template>
|
3539
|
+
|
3534
3540
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
3535
3541
|
<xsl:param name="continued"/>
|
3536
3542
|
<xsl:if test="normalize-space() != ''">
|
@@ -4020,6 +4026,8 @@
|
|
4020
4026
|
<fo:table-row>
|
4021
4027
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
4022
4028
|
|
4029
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4030
|
+
|
4023
4031
|
<!-- fn will be processed inside 'note' processing -->
|
4024
4032
|
|
4025
4033
|
<!-- for BSI (not PAS) display Notes before footnotes -->
|
@@ -4182,6 +4190,8 @@
|
|
4182
4190
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
4183
4191
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
4184
4192
|
|
4193
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4194
|
+
|
4185
4195
|
<xsl:choose>
|
4186
4196
|
<xsl:when test="position() = 1">
|
4187
4197
|
<xsl:attribute name="border-top">solid black 1.5pt</xsl:attribute>
|
@@ -4216,6 +4226,8 @@
|
|
4216
4226
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4217
4227
|
</xsl:if>
|
4218
4228
|
|
4229
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4230
|
+
|
4219
4231
|
<xsl:call-template name="setTableRowAttributes"/>
|
4220
4232
|
<xsl:apply-templates/>
|
4221
4233
|
</fo:table-row>
|
@@ -4235,6 +4247,8 @@
|
|
4235
4247
|
<xsl:with-param name="default">center</xsl:with-param>
|
4236
4248
|
</xsl:call-template>
|
4237
4249
|
|
4250
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4251
|
+
|
4238
4252
|
<xsl:if test="$lang = 'ar'">
|
4239
4253
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4240
4254
|
</xsl:if>
|
@@ -4287,6 +4301,8 @@
|
|
4287
4301
|
|
4288
4302
|
<!-- bsi -->
|
4289
4303
|
|
4304
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4305
|
+
|
4290
4306
|
<xsl:if test="count(*) = 1 and (local-name(*[1]) = 'stem' or local-name(*[1]) = 'figure')">
|
4291
4307
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
4292
4308
|
</xsl:if>
|
@@ -7955,7 +7971,7 @@
|
|
7955
7971
|
<!-- sourcecode -->
|
7956
7972
|
<!-- =============== -->
|
7957
7973
|
|
7958
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
7974
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
7959
7975
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
7960
7976
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
7961
7977
|
|
@@ -10032,8 +10048,8 @@
|
|
10032
10048
|
|
10033
10049
|
<xsl:variable name="toc_level">
|
10034
10050
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
10035
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
10036
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
10051
|
+
<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:-->
|
10052
|
+
<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 -->
|
10037
10053
|
<xsl:choose>
|
10038
10054
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
10039
10055
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
@@ -11027,6 +11043,7 @@
|
|
11027
11043
|
<xsl:choose>
|
11028
11044
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
11029
11045
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
11046
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
11030
11047
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
11031
11048
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
11032
11049
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
@@ -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>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-bipm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.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: metanorma-generic
|