metanorma-iho 0.8.0 → 0.8.2
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 +4 -4
- data/lib/isodoc/iho/iho.specification.xsl +34 -15
- data/lib/isodoc/iho/iho.standard.xsl +34 -15
- data/lib/isodoc/iho/pdf_convert.rb +1 -1
- data/lib/isodoc/iho/xref.rb +11 -13
- data/lib/metanorma/iho/isodoc.rng +4 -1
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.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: 913b4069b7d31fb5f55bf8eda5302e14191f426c40b3a9bddec90cad1ca9e9e1
|
4
|
+
data.tar.gz: 6bb8615883d63dee342945fbc7158132152a99e5a1a8172527a14020145873df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef7027702fb5400193b2a5cf810dfb9e3c905cc431a8abbe382ddf8edbeb89ee423023cf1115ac769e8c51ad66b60bcdf6356c688e02b9182ca0c06ff043afca
|
7
|
+
data.tar.gz: 6dfacb6d8e8fa73afccbd9c5f2e0cac2c3a18c3ffb2b07084f33be5558b15759d3bbdb901d06d3d7094307edcfec47aafa48ac2ccdfcf10d5dee5f6373bc5d0c
|
@@ -1155,11 +1155,26 @@
|
|
1155
1155
|
<xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
|
1156
1156
|
</xsl:if>
|
1157
1157
|
|
1158
|
-
<xsl:
|
1158
|
+
<xsl:variable name="font_family" select="."/>
|
1159
1159
|
|
1160
|
-
<xsl:
|
1161
|
-
<xsl:
|
1162
|
-
|
1160
|
+
<xsl:choose>
|
1161
|
+
<xsl:when test="$additional_fonts = ''">
|
1162
|
+
<xsl:value-of select="$font_family"/>
|
1163
|
+
</xsl:when>
|
1164
|
+
<xsl:otherwise> <!-- $additional_fonts != '' -->
|
1165
|
+
<xsl:choose>
|
1166
|
+
<xsl:when test="contains($font_family, ',')">
|
1167
|
+
<xsl:value-of select="substring-before($font_family, ',')"/>
|
1168
|
+
<xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
|
1169
|
+
<xsl:text>, </xsl:text><xsl:value-of select="substring-after($font_family, ',')"/>
|
1170
|
+
</xsl:when>
|
1171
|
+
<xsl:otherwise>
|
1172
|
+
<xsl:value-of select="$font_family"/>
|
1173
|
+
<xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
|
1174
|
+
</xsl:otherwise>
|
1175
|
+
</xsl:choose>
|
1176
|
+
</xsl:otherwise>
|
1177
|
+
</xsl:choose>
|
1163
1178
|
</xsl:attribute>
|
1164
1179
|
</xsl:when>
|
1165
1180
|
<xsl:otherwise>
|
@@ -3677,21 +3692,21 @@
|
|
3677
3692
|
|
3678
3693
|
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
|
3679
3694
|
|
3680
|
-
|
3695
|
+
<fo:block xsl:use-attribute-sets="table-note-style">
|
3681
3696
|
|
3682
|
-
|
3697
|
+
<xsl:call-template name="refine_table-note-style"/>
|
3683
3698
|
|
3684
|
-
|
3685
|
-
|
3699
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
3700
|
+
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
3686
3701
|
|
3687
|
-
|
3702
|
+
<xsl:call-template name="refine_table-note-name-style"/>
|
3688
3703
|
|
3689
|
-
|
3704
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
3690
3705
|
|
3691
|
-
|
3706
|
+
</fo:inline>
|
3692
3707
|
|
3693
|
-
|
3694
|
-
|
3708
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
3709
|
+
</fo:block>
|
3695
3710
|
|
3696
3711
|
</xsl:template> <!-- table/note -->
|
3697
3712
|
|
@@ -6883,8 +6898,12 @@
|
|
6883
6898
|
<xsl:variable name="isAdded" select="../@added"/>
|
6884
6899
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
6885
6900
|
<xsl:choose>
|
6886
|
-
<xsl:when test="ancestor::*[local-name() = 'title']">
|
6901
|
+
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
6887
6902
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
6903
|
+
<xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
6904
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
6905
|
+
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
6906
|
+
</xsl:if>
|
6888
6907
|
<xsl:variable name="src">
|
6889
6908
|
<xsl:call-template name="image_src"/>
|
6890
6909
|
</xsl:variable>
|
@@ -6917,7 +6936,7 @@
|
|
6917
6936
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
6918
6937
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
6919
6938
|
|
6920
|
-
<xsl:if test="@width != '' and @width != 'auto'">
|
6939
|
+
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
6921
6940
|
<xsl:attribute name="width">
|
6922
6941
|
<xsl:value-of select="@width"/>
|
6923
6942
|
</xsl:attribute>
|
@@ -1155,11 +1155,26 @@
|
|
1155
1155
|
<xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
|
1156
1156
|
</xsl:if>
|
1157
1157
|
|
1158
|
-
<xsl:
|
1158
|
+
<xsl:variable name="font_family" select="."/>
|
1159
1159
|
|
1160
|
-
<xsl:
|
1161
|
-
<xsl:
|
1162
|
-
|
1160
|
+
<xsl:choose>
|
1161
|
+
<xsl:when test="$additional_fonts = ''">
|
1162
|
+
<xsl:value-of select="$font_family"/>
|
1163
|
+
</xsl:when>
|
1164
|
+
<xsl:otherwise> <!-- $additional_fonts != '' -->
|
1165
|
+
<xsl:choose>
|
1166
|
+
<xsl:when test="contains($font_family, ',')">
|
1167
|
+
<xsl:value-of select="substring-before($font_family, ',')"/>
|
1168
|
+
<xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
|
1169
|
+
<xsl:text>, </xsl:text><xsl:value-of select="substring-after($font_family, ',')"/>
|
1170
|
+
</xsl:when>
|
1171
|
+
<xsl:otherwise>
|
1172
|
+
<xsl:value-of select="$font_family"/>
|
1173
|
+
<xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
|
1174
|
+
</xsl:otherwise>
|
1175
|
+
</xsl:choose>
|
1176
|
+
</xsl:otherwise>
|
1177
|
+
</xsl:choose>
|
1163
1178
|
</xsl:attribute>
|
1164
1179
|
</xsl:when>
|
1165
1180
|
<xsl:otherwise>
|
@@ -3677,21 +3692,21 @@
|
|
3677
3692
|
|
3678
3693
|
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
|
3679
3694
|
|
3680
|
-
|
3695
|
+
<fo:block xsl:use-attribute-sets="table-note-style">
|
3681
3696
|
|
3682
|
-
|
3697
|
+
<xsl:call-template name="refine_table-note-style"/>
|
3683
3698
|
|
3684
|
-
|
3685
|
-
|
3699
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
3700
|
+
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
3686
3701
|
|
3687
|
-
|
3702
|
+
<xsl:call-template name="refine_table-note-name-style"/>
|
3688
3703
|
|
3689
|
-
|
3704
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
3690
3705
|
|
3691
|
-
|
3706
|
+
</fo:inline>
|
3692
3707
|
|
3693
|
-
|
3694
|
-
|
3708
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
3709
|
+
</fo:block>
|
3695
3710
|
|
3696
3711
|
</xsl:template> <!-- table/note -->
|
3697
3712
|
|
@@ -6883,8 +6898,12 @@
|
|
6883
6898
|
<xsl:variable name="isAdded" select="../@added"/>
|
6884
6899
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
6885
6900
|
<xsl:choose>
|
6886
|
-
<xsl:when test="ancestor::*[local-name() = 'title']">
|
6901
|
+
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
6887
6902
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
6903
|
+
<xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
6904
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
6905
|
+
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
6906
|
+
</xsl:if>
|
6888
6907
|
<xsl:variable name="src">
|
6889
6908
|
<xsl:call-template name="image_src"/>
|
6890
6909
|
</xsl:variable>
|
@@ -6917,7 +6936,7 @@
|
|
6917
6936
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
6918
6937
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
6919
6938
|
|
6920
|
-
<xsl:if test="@width != '' and @width != 'auto'">
|
6939
|
+
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
6921
6940
|
<xsl:attribute name="width">
|
6922
6941
|
<xsl:value-of select="@width"/>
|
6923
6942
|
</xsl:attribute>
|
data/lib/isodoc/iho/xref.rb
CHANGED
@@ -35,20 +35,18 @@ module IsoDoc
|
|
35
35
|
hierarchical_asset_names(clause, num)
|
36
36
|
end
|
37
37
|
|
38
|
-
def
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
i = Counter.new("@", skip_i: true)
|
48
|
-
docxml.xpath(ns("//annex[not(@obligation = 'informative')]"))
|
38
|
+
def clause_order_annex(_docxml)
|
39
|
+
[{ path: "//annex[not(@obligation = 'informative')]", multi: true },
|
40
|
+
{ path: "//annex[@obligation = 'informative']", multi: true }]
|
41
|
+
end
|
42
|
+
|
43
|
+
def annex_anchor_names(docxml)
|
44
|
+
clause_order_annex(docxml).each_with_index do |a, i|
|
45
|
+
n = i.zero? ? Counter.new("@", skip_i: true) : Counter.new
|
46
|
+
docxml.xpath(ns(a[:path]))
|
49
47
|
.each do |c|
|
50
|
-
|
51
|
-
|
48
|
+
annex_names(c, n.increment(c).print)
|
49
|
+
a[:multi] or break
|
52
50
|
end
|
53
51
|
end
|
54
52
|
end
|
@@ -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-iho.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
29
29
|
|
30
|
-
spec.add_dependency "metanorma-generic", "~> 2.5.
|
30
|
+
spec.add_dependency "metanorma-generic", "~> 2.5.2"
|
31
31
|
|
32
32
|
spec.add_development_dependency "debug"
|
33
33
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.5.
|
19
|
+
version: 2.5.2
|
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.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|