metanorma-iso 2.3.5 → 2.3.6
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/html2doc/lists.rb +9 -7
- data/lib/isodoc/iso/base_convert.rb +42 -10
- data/lib/isodoc/iso/html/style-human.css +4 -0
- data/lib/isodoc/iso/html/style-human.scss +6 -0
- data/lib/isodoc/iso/html/style-iso.css +4 -0
- data/lib/isodoc/iso/html/style-iso.scss +7 -0
- data/lib/isodoc/iso/html/wordstyle-dis.css +16 -0
- data/lib/isodoc/iso/html/wordstyle-dis.scss +14 -0
- data/lib/isodoc/iso/html/wordstyle.css +16 -0
- data/lib/isodoc/iso/html/wordstyle.scss +14 -0
- data/lib/isodoc/iso/html_convert.rb +12 -0
- data/lib/isodoc/iso/iso.amendment.xsl +147 -52
- data/lib/isodoc/iso/iso.international-standard.xsl +147 -52
- data/lib/isodoc/iso/presentation_xml_convert.rb +5 -0
- data/lib/isodoc/iso/word_cleanup.rb +12 -2
- data/lib/isodoc/iso/word_convert.rb +44 -9
- data/lib/isodoc/iso/xref.rb +22 -4
- data/lib/metanorma/iso/base.rb +5 -0
- data/lib/metanorma/iso/biblio.rng +11 -1
- data/lib/metanorma/iso/cleanup.rb +0 -10
- data/lib/metanorma/iso/front_id.rb +8 -4
- data/lib/metanorma/iso/isodoc.rng +10 -0
- data/lib/metanorma/iso/version.rb +1 -1
- metadata +2 -2
@@ -44,18 +44,8 @@ module Metanorma
|
|
44
44
|
# ISO as a prefix goes first
|
45
45
|
def docidentifier_cleanup(xmldoc)
|
46
46
|
prefix = get_id_prefix(xmldoc)
|
47
|
-
=begin
|
48
|
-
id = xmldoc.at("//bibdata/docidentifier[@type = 'ISO']") or return
|
49
|
-
id.content = id_prefix(prefix, id)
|
50
|
-
=end
|
51
47
|
id = xmldoc.at("//bibdata/ext/structuredidentifier/project-number") and
|
52
48
|
id.content = id_prefix(prefix, id)
|
53
|
-
=begin
|
54
|
-
%w(iso-with-lang iso-reference iso-undated).each do |t|
|
55
|
-
id = xmldoc.at("//bibdata/docidentifier[@type = '#{t}']") and
|
56
|
-
id.content = id_prefix(prefix, id)
|
57
|
-
end
|
58
|
-
=end
|
59
49
|
end
|
60
50
|
|
61
51
|
def format_ref(ref, type)
|
@@ -46,11 +46,14 @@ module Metanorma
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def metadata_id(node, xml)
|
49
|
-
|
49
|
+
if id = node.attr("docidentifier")
|
50
|
+
xml.docidentifier id, **attr_code(type: "ISO")
|
51
|
+
else iso_id(node, xml)
|
52
|
+
end
|
50
53
|
node.attr("tc-docnumber")&.split(/,\s*/)&.each do |n|
|
51
54
|
xml.docidentifier(n, **attr_code(type: "iso-tc"))
|
52
55
|
end
|
53
|
-
xml.docnumber node
|
56
|
+
xml.docnumber node.attr("docnumber")
|
54
57
|
end
|
55
58
|
|
56
59
|
# @param type [nil, :tr, :ts, :amd, :cor, :guide, :dir, :tc, Type]
|
@@ -62,6 +65,7 @@ module Metanorma
|
|
62
65
|
when "directive" then :dir
|
63
66
|
when "technical-report" then :tr
|
64
67
|
when "technical-specification" then :ts
|
68
|
+
when "publicly-available-specification" then :pas
|
65
69
|
when "guide" then :guide
|
66
70
|
end
|
67
71
|
end
|
@@ -138,7 +142,7 @@ module Metanorma
|
|
138
142
|
xml.docidentifier iso_id_default(params).to_s(with_prf: with_prf),
|
139
143
|
**attr_code(type: "ISO")
|
140
144
|
xml.docidentifier iso_id_reference(params)
|
141
|
-
.to_s(format: :
|
145
|
+
.to_s(format: :ref_num_short, with_prf: with_prf),
|
142
146
|
**attr_code(type: "iso-reference")
|
143
147
|
xml.docidentifier iso_id_reference(params).urn, **attr_code(type: "URN")
|
144
148
|
return if @amd
|
@@ -146,7 +150,7 @@ module Metanorma
|
|
146
150
|
xml.docidentifier iso_id_undated(params).to_s(with_prf: with_prf),
|
147
151
|
**attr_code(type: "iso-undated")
|
148
152
|
xml.docidentifier iso_id_with_lang(params)
|
149
|
-
.to_s(format: :
|
153
|
+
.to_s(format: :ref_num_long, with_prf: with_prf),
|
150
154
|
**attr_code(type: "iso-with-lang")
|
151
155
|
rescue StandardError => e
|
152
156
|
clean_abort("Document identifier: #{e}", xml)
|
@@ -1578,6 +1578,9 @@
|
|
1578
1578
|
<zeroOrMore>
|
1579
1579
|
<ref name="indexsect"/>
|
1580
1580
|
</zeroOrMore>
|
1581
|
+
<optional>
|
1582
|
+
<ref name="colophon"/>
|
1583
|
+
</optional>
|
1581
1584
|
</element>
|
1582
1585
|
</define>
|
1583
1586
|
<define name="misccontainer">
|
@@ -1600,6 +1603,13 @@
|
|
1600
1603
|
</oneOrMore>
|
1601
1604
|
</element>
|
1602
1605
|
</define>
|
1606
|
+
<define name="colophon">
|
1607
|
+
<element name="colophon">
|
1608
|
+
<oneOrMore>
|
1609
|
+
<ref name="content"/>
|
1610
|
+
</oneOrMore>
|
1611
|
+
</element>
|
1612
|
+
</define>
|
1603
1613
|
<define name="foreword">
|
1604
1614
|
<element name="foreword">
|
1605
1615
|
<ref name="Content-Section"/>
|
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.3.
|
4
|
+
version: 2.3.6
|
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-02-
|
11
|
+
date: 2023-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|