metanorma-iec 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3df1d6637e7c07bd1e152d015eab70efb8907e5b75fdcd988b38bcf9bf4710cd
|
4
|
+
data.tar.gz: 6c00622ff41524f4451c0f3c43f0b36388eeff742c61ac33e5f2533681c57bbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62f8813c4e594dcfb25ac7a681b8507647ec4cfcd18b2df774903cf54e32bafca9816bac62340771b3b2ac88ccbd1864a18e75f5225e14b6c58dd55282ca6955
|
7
|
+
data.tar.gz: 30392d4a42b4fa9d2a9c3c8233c251e96a93b43e930a3653674e5f5ca12dad82c1f1021f0dc7a8fbad46b0dc3adf2e5dcac2970d0af54586b410138dc43ef14c
|
@@ -19,7 +19,7 @@ module IsoDoc
|
|
19
19
|
|
20
20
|
def foreword1(sect, boilerplate, out)
|
21
21
|
out.div **attr_code(id: sect ? sect["id"] : "") do |s|
|
22
|
-
s.h1(
|
22
|
+
s.h1(class: "ForewordTitle") { |h1| h1 << @i18n.foreword }
|
23
23
|
@meta.get[:doctype] == "Amendment" or
|
24
24
|
s.div **attr_code(class: "boilerplate_legal") do |s1|
|
25
25
|
boilerplate&.elements&.each { |e| parse(e, s1) }
|
@@ -29,23 +29,23 @@ module IsoDoc
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def iec_orgname(out)
|
32
|
-
out.p(
|
33
|
-
out.p(
|
34
|
-
out.p(
|
32
|
+
out.p(class: "zzSTDTitle1") { |p| p << @i18n.get["IEC"] }
|
33
|
+
out.p(class: "zzSTDTitle1") { |p| p << "____________" }
|
34
|
+
out.p(class: "zzSTDTitle1") { |p| p << " " }
|
35
35
|
end
|
36
36
|
|
37
37
|
def middle_title(_isoxml, out)
|
38
38
|
title1, title2 = middle_title_parts(out)
|
39
|
-
out.p(
|
39
|
+
out.p(class: "zzSTDTitle1") do |p|
|
40
40
|
p.b { |b| b << title1 }
|
41
41
|
end
|
42
42
|
if title2
|
43
|
-
out.p(
|
44
|
-
out.p(
|
43
|
+
out.p(class: "zzSTDTitle1") { |p| p << " " }
|
44
|
+
out.p(class: "zzSTDTitle2") do |p|
|
45
45
|
p.b { |b| b << title2 }
|
46
46
|
end
|
47
47
|
end
|
48
|
-
out.p(
|
48
|
+
out.p(class: "zzSTDTitle1") { |p| p << " " }
|
49
49
|
end
|
50
50
|
|
51
51
|
def middle_title_parts(_out)
|
@@ -80,7 +80,7 @@ module IsoDoc
|
|
80
80
|
page_break(out)
|
81
81
|
out.div **attr_code(id: node["id"]) do |div|
|
82
82
|
depth = clause_title_depth(node, nil)
|
83
|
-
out.send "h#{depth}",
|
83
|
+
out.send "h#{depth}", class: "zzSTDTitle2" do |p|
|
84
84
|
p.b do |b|
|
85
85
|
node&.at(ns("./title"))&.children&.each { |c2| parse(c2, b) }
|
86
86
|
end
|
@@ -1697,10 +1697,14 @@
|
|
1697
1697
|
<xsl:element name="{$element-name}">
|
1698
1698
|
<xsl:attribute name="text-align">
|
1699
1699
|
<xsl:choose>
|
1700
|
-
<xsl:when test="@align
|
1700
|
+
<xsl:when test="@align = 'justified'">justify</xsl:when>
|
1701
|
+
<xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
|
1701
1702
|
<xsl:otherwise>justify</xsl:otherwise>
|
1702
1703
|
</xsl:choose>
|
1703
1704
|
</xsl:attribute>
|
1705
|
+
<xsl:if test="@align = 'indent'">
|
1706
|
+
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
1707
|
+
</xsl:if>
|
1704
1708
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
1705
1709
|
<xsl:if test="ancestor::iec:definition">
|
1706
1710
|
<xsl:attribute name="margin-top">1pt</xsl:attribute>
|
@@ -2036,14 +2040,14 @@
|
|
2036
2040
|
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 -->
|
2037
2041
|
|
2038
2042
|
<!--
|
2039
|
-
<
|
2043
|
+
<metanorma-extension>
|
2040
2044
|
<presentation-metadata>
|
2041
2045
|
<papersize>letter</papersize>
|
2042
2046
|
</presentation-metadata>
|
2043
|
-
</
|
2047
|
+
</metanorma-extension>
|
2044
2048
|
-->
|
2045
2049
|
|
2046
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2050
|
+
<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'])))"/>
|
2047
2051
|
<xsl:variable name="papersize_width_">
|
2048
2052
|
<xsl:choose>
|
2049
2053
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -2164,7 +2168,7 @@
|
|
2164
2168
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
2165
2169
|
|
2166
2170
|
<xsl:variable name="title-list-tables">
|
2167
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2171
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
2168
2172
|
<xsl:value-of select="$toc_table_title"/>
|
2169
2173
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
2170
2174
|
<xsl:call-template name="getTitle">
|
@@ -2174,7 +2178,7 @@
|
|
2174
2178
|
</xsl:variable>
|
2175
2179
|
|
2176
2180
|
<xsl:variable name="title-list-figures">
|
2177
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2181
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
2178
2182
|
<xsl:value-of select="$toc_figure_title"/>
|
2179
2183
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
2180
2184
|
<xsl:call-template name="getTitle">
|
@@ -2184,7 +2188,7 @@
|
|
2184
2188
|
</xsl:variable>
|
2185
2189
|
|
2186
2190
|
<xsl:variable name="title-list-recommendations">
|
2187
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
2191
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
2188
2192
|
<xsl:value-of select="$toc_requirement_title"/>
|
2189
2193
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
2190
2194
|
<xsl:call-template name="getTitle">
|
@@ -2256,7 +2260,7 @@
|
|
2256
2260
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
2257
2261
|
|
2258
2262
|
<xsl:variable name="additional_fonts_">
|
2259
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
2263
|
+
<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']">
|
2260
2264
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
2261
2265
|
</xsl:for-each>
|
2262
2266
|
</xsl:variable>
|
@@ -3361,10 +3365,10 @@
|
|
3361
3365
|
|
3362
3366
|
<xsl:template name="processTablesFigures_Contents">
|
3363
3367
|
<xsl:param name="always"/>
|
3364
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
3368
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3365
3369
|
<xsl:call-template name="processTables_Contents"/>
|
3366
3370
|
</xsl:if>
|
3367
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
3371
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3368
3372
|
<xsl:call-template name="processFigures_Contents"/>
|
3369
3373
|
</xsl:if>
|
3370
3374
|
</xsl:template>
|
@@ -3708,6 +3712,8 @@
|
|
3708
3712
|
<xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
|
3709
3713
|
</xsl:if>
|
3710
3714
|
|
3715
|
+
<xsl:call-template name="setBordersTableArray"/>
|
3716
|
+
|
3711
3717
|
</xsl:element>
|
3712
3718
|
</xsl:variable>
|
3713
3719
|
|
@@ -3852,6 +3858,15 @@
|
|
3852
3858
|
|
3853
3859
|
</xsl:template>
|
3854
3860
|
|
3861
|
+
<xsl:template name="setBordersTableArray">
|
3862
|
+
|
3863
|
+
<xsl:if test="starts-with(@id, 'array_') or starts-with(ancestor::*[local-name() = 'table'][1]/@id, 'array_')">
|
3864
|
+
<!-- array - table without borders -->
|
3865
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
3866
|
+
</xsl:if>
|
3867
|
+
|
3868
|
+
</xsl:template>
|
3869
|
+
|
3855
3870
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
3856
3871
|
<xsl:param name="continued"/>
|
3857
3872
|
<xsl:if test="normalize-space() != ''">
|
@@ -4326,6 +4341,8 @@
|
|
4326
4341
|
<fo:table-row>
|
4327
4342
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
4328
4343
|
|
4344
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4345
|
+
|
4329
4346
|
<!-- fn will be processed inside 'note' processing -->
|
4330
4347
|
|
4331
4348
|
<xsl:if test="../*[local-name()='note']">
|
@@ -4342,6 +4359,7 @@
|
|
4342
4359
|
|
4343
4360
|
<xsl:if test="../*[local-name()='note']">
|
4344
4361
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
4362
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4345
4363
|
<fo:block font-size="1pt"> </fo:block>
|
4346
4364
|
</fo:block-container>
|
4347
4365
|
</xsl:if>
|
@@ -4457,6 +4475,8 @@
|
|
4457
4475
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
4458
4476
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
4459
4477
|
|
4478
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4479
|
+
|
4460
4480
|
<xsl:call-template name="setTableRowAttributes"/>
|
4461
4481
|
|
4462
4482
|
<xsl:apply-templates/>
|
@@ -4480,6 +4500,8 @@
|
|
4480
4500
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4481
4501
|
</xsl:if>
|
4482
4502
|
|
4503
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4504
|
+
|
4483
4505
|
<xsl:call-template name="setTableRowAttributes"/>
|
4484
4506
|
<xsl:apply-templates/>
|
4485
4507
|
</fo:table-row>
|
@@ -4504,6 +4526,8 @@
|
|
4504
4526
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
4505
4527
|
</xsl:if>
|
4506
4528
|
|
4529
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4530
|
+
|
4507
4531
|
<xsl:if test="$lang = 'ar'">
|
4508
4532
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4509
4533
|
</xsl:if>
|
@@ -4560,6 +4584,8 @@
|
|
4560
4584
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
4561
4585
|
</xsl:if>
|
4562
4586
|
|
4587
|
+
<xsl:call-template name="setBordersTableArray"/>
|
4588
|
+
|
4563
4589
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
4564
4590
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4565
4591
|
</xsl:if>
|
@@ -8229,7 +8255,7 @@
|
|
8229
8255
|
<!-- sourcecode -->
|
8230
8256
|
<!-- =============== -->
|
8231
8257
|
|
8232
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
8258
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
8233
8259
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
8234
8260
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
8235
8261
|
|
@@ -10302,8 +10328,8 @@
|
|
10302
10328
|
|
10303
10329
|
<xsl:variable name="toc_level">
|
10304
10330
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
10305
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
10306
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
10331
|
+
<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:-->
|
10332
|
+
<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 -->
|
10307
10333
|
<xsl:choose>
|
10308
10334
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
10309
10335
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
@@ -11294,6 +11320,7 @@
|
|
11294
11320
|
<xsl:choose>
|
11295
11321
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
11296
11322
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
11323
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
11297
11324
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
11298
11325
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
11299
11326
|
<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-iec
|
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: bin
|
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-iso
|