metanorma-iec 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iec/iec.international-standard.xsl +34 -15
- data/lib/metanorma/iec/front.rb +2 -38
- data/lib/metanorma/iec/isodoc.rng +4 -1
- data/lib/metanorma/iec/version.rb +1 -1
- data/metanorma-iec.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e49a111e3553773b174d7d458f732cb59ddab794ebcc759bb62c9bed93bef35b
|
4
|
+
data.tar.gz: 3e4b24d7468c531d78ba6c7af5397692e20e036ac5720f75bbb0b416cafaaadf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40c8f1353dc716f929cfbb62870864dd0d9b0c1c91260f11220f979ee63eead7b2a8ce23cd270a73b625445a05a35f0616c867bd55290020e2e6ebe89c0e2fec
|
7
|
+
data.tar.gz: 3a0763dca6b8742338c89abc9c42c0dfe834f6c13c5e43736045dd51d52b62ba37024af0f1cadccedbc3b5ff5bf057bb7870f0f99ebac4811fa8e83a874cbb46
|
@@ -2424,11 +2424,26 @@
|
|
2424
2424
|
<xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
|
2425
2425
|
</xsl:if>
|
2426
2426
|
|
2427
|
-
<xsl:
|
2427
|
+
<xsl:variable name="font_family" select="."/>
|
2428
2428
|
|
2429
|
-
<xsl:
|
2430
|
-
<xsl:
|
2431
|
-
|
2429
|
+
<xsl:choose>
|
2430
|
+
<xsl:when test="$additional_fonts = ''">
|
2431
|
+
<xsl:value-of select="$font_family"/>
|
2432
|
+
</xsl:when>
|
2433
|
+
<xsl:otherwise> <!-- $additional_fonts != '' -->
|
2434
|
+
<xsl:choose>
|
2435
|
+
<xsl:when test="contains($font_family, ',')">
|
2436
|
+
<xsl:value-of select="substring-before($font_family, ',')"/>
|
2437
|
+
<xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
|
2438
|
+
<xsl:text>, </xsl:text><xsl:value-of select="substring-after($font_family, ',')"/>
|
2439
|
+
</xsl:when>
|
2440
|
+
<xsl:otherwise>
|
2441
|
+
<xsl:value-of select="$font_family"/>
|
2442
|
+
<xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
|
2443
|
+
</xsl:otherwise>
|
2444
|
+
</xsl:choose>
|
2445
|
+
</xsl:otherwise>
|
2446
|
+
</xsl:choose>
|
2432
2447
|
</xsl:attribute>
|
2433
2448
|
</xsl:when>
|
2434
2449
|
<xsl:otherwise>
|
@@ -5077,21 +5092,21 @@
|
|
5077
5092
|
|
5078
5093
|
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
|
5079
5094
|
|
5080
|
-
|
5095
|
+
<fo:block xsl:use-attribute-sets="table-note-style">
|
5081
5096
|
|
5082
|
-
|
5097
|
+
<xsl:call-template name="refine_table-note-style"/>
|
5083
5098
|
|
5084
|
-
|
5085
|
-
|
5099
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
5100
|
+
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
5086
5101
|
|
5087
|
-
|
5102
|
+
<xsl:call-template name="refine_table-note-name-style"/>
|
5088
5103
|
|
5089
|
-
|
5104
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
5090
5105
|
|
5091
|
-
|
5106
|
+
</fo:inline>
|
5092
5107
|
|
5093
|
-
|
5094
|
-
|
5108
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
5109
|
+
</fo:block>
|
5095
5110
|
|
5096
5111
|
</xsl:template> <!-- table/note -->
|
5097
5112
|
|
@@ -8292,8 +8307,12 @@
|
|
8292
8307
|
<xsl:variable name="isAdded" select="../@added"/>
|
8293
8308
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
8294
8309
|
<xsl:choose>
|
8295
|
-
<xsl:when test="ancestor::*[local-name() = 'title']">
|
8310
|
+
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
8296
8311
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
8312
|
+
<xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
8313
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
8314
|
+
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
8315
|
+
</xsl:if>
|
8297
8316
|
<xsl:variable name="src">
|
8298
8317
|
<xsl:call-template name="image_src"/>
|
8299
8318
|
</xsl:variable>
|
@@ -8326,7 +8345,7 @@
|
|
8326
8345
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
8327
8346
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
8328
8347
|
|
8329
|
-
<xsl:if test="@width != '' and @width != 'auto'">
|
8348
|
+
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
8330
8349
|
<xsl:attribute name="width">
|
8331
8350
|
<xsl:value-of select="@width"/>
|
8332
8351
|
</xsl:attribute>
|
data/lib/metanorma/iec/front.rb
CHANGED
@@ -3,44 +3,8 @@ require "pubid-iec"
|
|
3
3
|
module Metanorma
|
4
4
|
module Iec
|
5
5
|
class Converter < ISO::Converter
|
6
|
-
def
|
7
|
-
|
8
|
-
csv_split(publishers)&.each do |p|
|
9
|
-
xml.contributor do |c|
|
10
|
-
c.role type: "author"
|
11
|
-
c.organization do |a|
|
12
|
-
organization(a, p, false, node, !node.attr("publisher"))
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def metadata_publisher(node, xml)
|
19
|
-
publishers = node.attr("publisher") || "IEC"
|
20
|
-
csv_split(publishers)&.each do |p|
|
21
|
-
xml.contributor do |c|
|
22
|
-
c.role type: "publisher"
|
23
|
-
c.organization do |a|
|
24
|
-
organization(a, p, true, node, !node.attr("publisher"))
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def metadata_copyright(node, xml)
|
31
|
-
publishers = node.attr("copyright-holder") || node.attr("publisher") ||
|
32
|
-
"IEC"
|
33
|
-
csv_split(publishers)&.each do |p|
|
34
|
-
xml.copyright do |c|
|
35
|
-
c.from (node.attr("copyright-year") || Date.today.year)
|
36
|
-
c.owner do |owner|
|
37
|
-
owner.organization do |o|
|
38
|
-
organization(o, p, true, node, !node.attr("copyright-holder") ||
|
39
|
-
node.attr("publisher"))
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
6
|
+
def home_agency
|
7
|
+
"IEC"
|
44
8
|
end
|
45
9
|
|
46
10
|
def iso_id(node, xml)
|
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION v1.2.
|
20
|
+
<!-- VERSION v1.2.4 -->
|
21
21
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -2068,6 +2068,9 @@
|
|
2068
2068
|
</define>
|
2069
2069
|
<define name="termdefinition">
|
2070
2070
|
<element name="definition">
|
2071
|
+
<optional>
|
2072
|
+
<attribute name="type"/>
|
2073
|
+
</optional>
|
2071
2074
|
<choice>
|
2072
2075
|
<ref name="verbaldefinition"/>
|
2073
2076
|
<ref name="nonverbalrep"/>
|
data/metanorma-iec.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
31
31
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
32
32
|
|
33
|
-
spec.add_dependency "metanorma-iso", "~> 2.5.
|
33
|
+
spec.add_dependency "metanorma-iso", "~> 2.5.1"
|
34
34
|
spec.add_dependency "pubid-iec"
|
35
35
|
spec.add_dependency "ruby-jing"
|
36
36
|
|
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.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-iso
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.5.
|
19
|
+
version: 2.5.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.5.
|
26
|
+
version: 2.5.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pubid-iec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|