metanorma-iso 2.7.0 → 2.7.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/iso/iso.amendment.xsl +1143 -385
- data/lib/isodoc/iso/iso.international-standard.xsl +1143 -385
- data/lib/metanorma/iso/base.rb +12 -0
- data/lib/metanorma/iso/basicdoc.rng +3 -0
- data/lib/metanorma/iso/front.rb +7 -4
- data/lib/metanorma/iso/isodoc.rng +4 -1
- data/lib/metanorma/iso/processor.rb +1 -0
- data/lib/metanorma/iso/version.rb +1 -1
- metadata +2 -2
data/lib/metanorma/iso/base.rb
CHANGED
@@ -79,6 +79,18 @@ module Metanorma
|
|
79
79
|
name
|
80
80
|
end
|
81
81
|
|
82
|
+
def document_scheme(node)
|
83
|
+
node.attr("document-scheme") || "2024"
|
84
|
+
end
|
85
|
+
|
86
|
+
def metadata_attrs(node)
|
87
|
+
ret = super
|
88
|
+
a = document_scheme(node) and
|
89
|
+
ret += "<presentation-metadata><name>document-scheme</name>" \
|
90
|
+
"<value>#{a}</value></presentation-metadata>"
|
91
|
+
ret
|
92
|
+
end
|
93
|
+
|
82
94
|
def outputs(node, ret)
|
83
95
|
File.open("#{@filename}.xml", "w:UTF-8") { |f| f.write(ret) }
|
84
96
|
presentation_xml_converter(node).convert("#{@filename}.xml")
|
data/lib/metanorma/iso/front.rb
CHANGED
@@ -25,9 +25,12 @@ module Metanorma
|
|
25
25
|
|
26
26
|
def metadata_stage(node, xml)
|
27
27
|
id = iso_id_default(iso_id_params(node))
|
28
|
-
id.stage
|
29
|
-
|
30
|
-
|
28
|
+
id.stage or return
|
29
|
+
if abbr = id.typed_stage_abbrev
|
30
|
+
abbr = abbr.to_s.upcase.strip
|
31
|
+
end
|
32
|
+
xml.stagename metadata_stagename(id)&.strip,
|
33
|
+
**attr_code(abbreviation: abbr)
|
31
34
|
rescue *STAGE_ERROR
|
32
35
|
end
|
33
36
|
|
@@ -52,7 +55,7 @@ module Metanorma
|
|
52
55
|
def metadata_status(node, xml)
|
53
56
|
stage = get_stage(node)
|
54
57
|
substage = get_substage(node)
|
55
|
-
abbrev = iso_id_default(iso_id_params(node)).stage&.abbr
|
58
|
+
abbrev = iso_id_default(iso_id_params(node)).stage&.abbr&.upcase
|
56
59
|
xml.status do |s|
|
57
60
|
s.stage stage, **attr_code(abbreviation: abbrev)
|
58
61
|
s.substage substage
|
@@ -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.
|
20
|
+
<!-- VERSION v1.3.0 -->
|
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">
|
@@ -146,6 +146,9 @@
|
|
146
146
|
<data type="boolean"/>
|
147
147
|
</attribute>
|
148
148
|
</optional>
|
149
|
+
<optional>
|
150
|
+
<attribute name="style"/>
|
151
|
+
</optional>
|
149
152
|
<oneOrMore>
|
150
153
|
<ref name="PureTextElement"/>
|
151
154
|
</oneOrMore>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.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: 2024-
|
11
|
+
date: 2024-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|