metanorma-itu 1.3.9 → 1.3.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/Rakefile +2 -2
- data/bin/rspec +1 -2
- data/lib/asciidoctor/itu/basicdoc.rng +21 -4
- data/lib/asciidoctor/itu/cleanup.rb +64 -59
- data/lib/asciidoctor/itu/converter.rb +3 -7
- data/lib/asciidoctor/itu/front.rb +5 -61
- data/lib/asciidoctor/itu/front_id.rb +67 -0
- data/lib/asciidoctor/itu/isodoc.rng +241 -61
- data/lib/asciidoctor/itu/itu.rng +3 -8
- data/lib/asciidoctor/itu/reqt.rng +23 -2
- data/lib/asciidoctor/itu.rb +0 -1
- data/lib/isodoc/itu/base_convert.rb +5 -2
- data/lib/isodoc/itu/html/htmlstyle.css +6 -0
- data/lib/isodoc/itu/html/htmlstyle.scss +7 -0
- data/lib/isodoc/itu/html/wordstyle.css +29 -8
- data/lib/isodoc/itu/html/wordstyle.scss +29 -8
- data/lib/isodoc/itu/i18n-ar.yaml +1 -0
- data/lib/isodoc/itu/i18n-de.yaml +1 -0
- data/lib/isodoc/itu/i18n-en.yaml +1 -0
- data/lib/isodoc/itu/i18n-es.yaml +1 -0
- data/lib/isodoc/itu/i18n-fr.yaml +1 -0
- data/lib/isodoc/itu/i18n-ru.yaml +1 -0
- data/lib/isodoc/itu/i18n-zh-Hans.yaml +1 -0
- data/lib/isodoc/itu/i18n.rb +1 -2
- data/lib/isodoc/itu/init.rb +1 -2
- data/lib/isodoc/itu/itu.implementers-guide.xsl +462 -173
- data/lib/isodoc/itu/itu.in-force.xsl +462 -173
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +462 -173
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +462 -173
- data/lib/isodoc/itu/itu.recommendation.xsl +462 -173
- data/lib/isodoc/itu/itu.resolution.xsl +462 -173
- data/lib/isodoc/itu/itu.service-publication.xsl +462 -173
- data/lib/isodoc/itu/itu.technical-paper.xsl +462 -173
- data/lib/isodoc/itu/itu.technical-report.xsl +462 -173
- data/lib/isodoc/itu/metadata.rb +19 -18
- data/lib/isodoc/itu/pdf_convert.rb +5 -4
- data/lib/isodoc/itu/presentation_xml_convert.rb +86 -75
- data/lib/isodoc/itu/word_cleanup.rb +30 -21
- data/lib/isodoc/itu.rb +0 -1
- data/lib/metanorma/itu/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0da762646b3253c450a7c952b40b3c71a6f30ba371831b617167e2ea5ae8813c
|
4
|
+
data.tar.gz: daf355300a1de0a3c3a2920b9d5bcf52eb934890e29b33ef407263104ca6be97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7227280e92249dd3dbc8b6c3fb566b709e3fde581b9d9a96d961b04081c76109f55380e14a90cbd812939caabc7c9ac861428ed3c308cb0e3612902e2cf6105a
|
7
|
+
data.tar.gz: 1009519227cf310c3c187c0f7c5536752098ca50e2a5f814712af1694bb56bddab71cd4a67aec589c46fbebc6a91504ac0c8719860af4ca4dd6c136e8d89b2f7
|
data/Gemfile
CHANGED
@@ -6,6 +6,6 @@ git_source(:github) { |repo| "https://github.com/#{repo}" }
|
|
6
6
|
|
7
7
|
gemspec
|
8
8
|
|
9
|
-
if File.exist?
|
10
|
-
eval File.read(
|
9
|
+
if File.exist? "Gemfile.devel"
|
10
|
+
eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
|
11
11
|
end
|
data/Rakefile
CHANGED
data/bin/rspec
CHANGED
@@ -624,6 +624,9 @@
|
|
624
624
|
<choice>
|
625
625
|
<ref name="PureTextElement"/>
|
626
626
|
<ref name="stem"/>
|
627
|
+
<ref name="eref"/>
|
628
|
+
<ref name="xref"/>
|
629
|
+
<ref name="hyperlink"/>
|
627
630
|
</choice>
|
628
631
|
</zeroOrMore>
|
629
632
|
</element>
|
@@ -634,6 +637,9 @@
|
|
634
637
|
<choice>
|
635
638
|
<ref name="PureTextElement"/>
|
636
639
|
<ref name="stem"/>
|
640
|
+
<ref name="eref"/>
|
641
|
+
<ref name="xref"/>
|
642
|
+
<ref name="hyperlink"/>
|
637
643
|
</choice>
|
638
644
|
</zeroOrMore>
|
639
645
|
</element>
|
@@ -641,7 +647,12 @@
|
|
641
647
|
<define name="tt">
|
642
648
|
<element name="tt">
|
643
649
|
<zeroOrMore>
|
644
|
-
<
|
650
|
+
<choice>
|
651
|
+
<ref name="PureTextElement"/>
|
652
|
+
<ref name="eref"/>
|
653
|
+
<ref name="xref"/>
|
654
|
+
<ref name="hyperlink"/>
|
655
|
+
</choice>
|
645
656
|
</zeroOrMore>
|
646
657
|
</element>
|
647
658
|
</define>
|
@@ -822,7 +833,9 @@
|
|
822
833
|
<attribute name="alt"/>
|
823
834
|
</optional>
|
824
835
|
<ref name="CitationType"/>
|
825
|
-
<
|
836
|
+
<oneOrMore>
|
837
|
+
<ref name="PureTextElement"/>
|
838
|
+
</oneOrMore>
|
826
839
|
</define>
|
827
840
|
<define name="hyperlink">
|
828
841
|
<element name="link">
|
@@ -835,7 +848,9 @@
|
|
835
848
|
<optional>
|
836
849
|
<attribute name="alt"/>
|
837
850
|
</optional>
|
838
|
-
<
|
851
|
+
<oneOrMore>
|
852
|
+
<ref name="PureTextElement"/>
|
853
|
+
</oneOrMore>
|
839
854
|
</element>
|
840
855
|
</define>
|
841
856
|
<define name="xref">
|
@@ -849,7 +864,9 @@
|
|
849
864
|
<optional>
|
850
865
|
<attribute name="alt"/>
|
851
866
|
</optional>
|
852
|
-
<
|
867
|
+
<oneOrMore>
|
868
|
+
<ref name="PureTextElement"/>
|
869
|
+
</oneOrMore>
|
853
870
|
</element>
|
854
871
|
</define>
|
855
872
|
<define name="fn">
|
@@ -1,17 +1,19 @@
|
|
1
1
|
module Asciidoctor
|
2
2
|
module ITU
|
3
3
|
class Converter < Standoc::Converter
|
4
|
-
def sections_cleanup(
|
4
|
+
def sections_cleanup(xml)
|
5
5
|
super
|
6
|
-
insert_missing_sections(
|
7
|
-
insert_empty_clauses(
|
8
|
-
resolution_inline_header(
|
6
|
+
insert_missing_sections(xml) unless @no_insert_missing_sections
|
7
|
+
insert_empty_clauses(xml)
|
8
|
+
resolution_inline_header(xml)
|
9
9
|
end
|
10
10
|
|
11
|
-
def resolution_inline_header(
|
12
|
-
return unless
|
13
|
-
|
14
|
-
|
11
|
+
def resolution_inline_header(xml)
|
12
|
+
return unless xml&.at("//bibdata/ext/doctype")&.text == "resolution"
|
13
|
+
|
14
|
+
xml.xpath("//clause//clause").each do |c|
|
15
|
+
next if (title = c.at("./title")) && !title&.text&.empty?
|
16
|
+
|
15
17
|
c["inline-header"] = true
|
16
18
|
end
|
17
19
|
end
|
@@ -36,67 +38,67 @@ module Asciidoctor
|
|
36
38
|
%(id="_#{UUIDTools::UUID.random_create}")
|
37
39
|
end
|
38
40
|
|
39
|
-
def insert_scope(
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
ins =
|
45
|
-
|
41
|
+
def insert_scope(xml)
|
42
|
+
xml.at("./*/sections") or
|
43
|
+
xml.at("./*/preface | ./*/boilerplate | ./*/bibdata").next =
|
44
|
+
"<sections><sentinel/></sections>"
|
45
|
+
xml.at("./*/sections/*") or xml.at("./*/sections") << "<sentinel/>"
|
46
|
+
ins = xml.at("//sections").elements.first
|
47
|
+
xml.at("//sections/clause[@type = 'scope']") or
|
46
48
|
ins.previous =
|
47
49
|
"<clause type='scope' #{add_id}><title>#{@i18n.scope}</title><p>"\
|
48
50
|
"#{@i18n.clause_empty}</p></clause>"
|
49
|
-
|
51
|
+
xml&.at("//sentinel")&.remove
|
50
52
|
end
|
51
53
|
|
52
|
-
def insert_norm_ref(
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
ins =
|
57
|
-
|
54
|
+
def insert_norm_ref(xml)
|
55
|
+
xml.at("//bibliography") or
|
56
|
+
xml.at("./*/annex[last()] | ./*/sections").next =
|
57
|
+
"<bibliography><sentinel/></bibliography>"
|
58
|
+
ins = xml.at("//bibliography").elements.first
|
59
|
+
xml.at("//bibliography/references[@normative = 'true']") or
|
58
60
|
ins.previous = "<references #{add_id} normative='true'>"\
|
59
|
-
|
60
|
-
|
61
|
+
"<title>#{@i18n.normref}</title></references>"
|
62
|
+
xml&.at("//sentinel")&.remove
|
61
63
|
end
|
62
64
|
|
63
|
-
def insert_terms(
|
64
|
-
ins =
|
65
|
-
|
65
|
+
def insert_terms(xml)
|
66
|
+
ins = xml.at("//sections/clause[@type = 'scope']")
|
67
|
+
xml.at("//sections//terms") or
|
66
68
|
ins.next = "<terms #{add_id}><title>#{@i18n.termsdef}</title></terms>"
|
67
69
|
end
|
68
70
|
|
69
|
-
def insert_symbols(
|
70
|
-
ins =
|
71
|
-
|
72
|
-
unless
|
71
|
+
def insert_symbols(xml)
|
72
|
+
ins = xml.at("//sections/terms") ||
|
73
|
+
xml.at("//sections/clause[descendant::terms]")
|
74
|
+
unless xml.at("//sections//definitions")
|
73
75
|
ins.next = "<definitions #{add_id}>"\
|
74
|
-
|
76
|
+
"<title>#{@i18n.symbolsabbrev}</title></definitions>"
|
75
77
|
end
|
76
78
|
end
|
77
79
|
|
78
|
-
def insert_conventions(
|
79
|
-
ins =
|
80
|
-
|
81
|
-
unless
|
80
|
+
def insert_conventions(xml)
|
81
|
+
ins = xml.at("//sections//definitions") ||
|
82
|
+
xml.at("//sections/clause[descendant::definitions]")
|
83
|
+
unless xml.at("//sections/clause[@type = 'conventions']")
|
82
84
|
ins.next = "<clause #{add_id} type='conventions'>"\
|
83
|
-
|
84
|
-
|
85
|
+
"<title>#{@i18n.conventions}</title><p>"\
|
86
|
+
"#{@i18n.clause_empty}</p></clause>"
|
85
87
|
end
|
86
88
|
end
|
87
89
|
|
88
|
-
def insert_empty_clauses(
|
89
|
-
|
90
|
+
def insert_empty_clauses(xml)
|
91
|
+
xml.xpath("//terms[not(./term)][not(.//terms)]").each do |c|
|
90
92
|
insert_empty_clauses1(c, @i18n.clause_empty)
|
91
93
|
end
|
92
|
-
|
94
|
+
xml.xpath("//definitions[not(./dl)]").each do |c|
|
93
95
|
insert_empty_clauses1(c, @i18n.clause_empty)
|
94
96
|
end
|
95
97
|
end
|
96
98
|
|
97
|
-
def insert_empty_clauses1(
|
98
|
-
|
99
|
-
ins =
|
99
|
+
def insert_empty_clauses1(clause, text)
|
100
|
+
clause.at("./p") and return
|
101
|
+
ins = clause.at("./title") or return
|
100
102
|
ins.next = "<p>#{text}</p>"
|
101
103
|
end
|
102
104
|
|
@@ -114,14 +116,14 @@ module Asciidoctor
|
|
114
116
|
next unless n.text?
|
115
117
|
|
116
118
|
n.replace(HTMLEntities.new.encode(
|
117
|
-
|
118
|
-
|
119
|
+
n.text.gsub(/\u2019|\u2018|\u201a|\u201b/, "'")
|
120
|
+
.gsub(/\u201c|\u201d|\u201e|\u201f/, '"'), :basic
|
121
|
+
))
|
119
122
|
end
|
120
123
|
xmldoc
|
121
124
|
end
|
122
125
|
|
123
|
-
def termdef_boilerplate_cleanup(xmldoc)
|
124
|
-
end
|
126
|
+
def termdef_boilerplate_cleanup(xmldoc); end
|
125
127
|
|
126
128
|
def terms_extract(div)
|
127
129
|
internal = div.at("./terms[@type = 'internal']/title")
|
@@ -129,7 +131,7 @@ module Asciidoctor
|
|
129
131
|
[internal, external]
|
130
132
|
end
|
131
133
|
|
132
|
-
def term_defs_boilerplate(div,
|
134
|
+
def term_defs_boilerplate(div, _source, _term, _preface, _isodoc)
|
133
135
|
internal, external = terms_extract(div.parent)
|
134
136
|
internal&.next_element&.name == "term" and
|
135
137
|
internal.next = "<p>#{@i18n.internal_terms_boilerplate}</p>"
|
@@ -144,16 +146,20 @@ module Asciidoctor
|
|
144
146
|
div.next = "<p>#{@i18n.term_def_boilerplate}</p>"
|
145
147
|
end
|
146
148
|
|
147
|
-
def section_names_terms_cleanup(
|
149
|
+
def section_names_terms_cleanup(xml)
|
148
150
|
super
|
149
151
|
replace_title(
|
150
|
-
|
151
|
-
|
152
|
-
|
152
|
+
xml, "//terms[@type = 'internal'] | "\
|
153
|
+
"//clause[./terms[@type = 'internal']]"\
|
154
|
+
"[not(./terms[@type = 'external'])]",
|
155
|
+
@i18n&.internal_termsdef
|
156
|
+
)
|
153
157
|
replace_title(
|
154
|
-
|
155
|
-
|
156
|
-
|
158
|
+
xml, "//terms[@type = 'external'] | "\
|
159
|
+
"//clause[./terms[@type = 'external']]"\
|
160
|
+
"[not(./terms[@type = 'internal'])]",
|
161
|
+
@i18n&.external_termsdef
|
162
|
+
)
|
157
163
|
end
|
158
164
|
|
159
165
|
def symbols_cleanup(xmldoc)
|
@@ -193,12 +199,11 @@ module Asciidoctor
|
|
193
199
|
# then title
|
194
200
|
def sort_biblio_key(bib)
|
195
201
|
pubclass = pub_class(bib)
|
196
|
-
num = bib&.at("./docnumber")&.text
|
197
202
|
id = bib&.at("./docidentifier[not(@type = 'DOI' or @type = "\
|
198
203
|
"'metanorma' or @type = 'ISSN' or @type = 'ISBN')]")
|
199
204
|
metaid = bib&.at("./docidentifier[@type = 'metanorma']")&.text
|
200
|
-
abbrid = metaid unless /^\[\d+\]$/.match(metaid)
|
201
|
-
type = id[
|
205
|
+
abbrid = metaid unless /^\[\d+\]$/.match?(metaid)
|
206
|
+
type = id["type"] if id
|
202
207
|
title = bib&.at("./title[@type = 'main']")&.text ||
|
203
208
|
bib&.at("./title")&.text || bib&.at("./formattedref")&.text
|
204
209
|
"#{pubclass} :: #{type} :: #{id&.text || metaid} :: #{title}"
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require "asciidoctor"
|
2
2
|
require "asciidoctor/standoc/converter"
|
3
3
|
require "fileutils"
|
4
|
+
require "metanorma-utils"
|
4
5
|
require_relative "./front"
|
5
6
|
require_relative "./validate"
|
6
7
|
require_relative "./cleanup"
|
@@ -107,16 +108,11 @@ module Asciidoctor
|
|
107
108
|
return unless node.attr("keywords")
|
108
109
|
|
109
110
|
node.attr("keywords").split(/, */).sort.each_with_index do |kw, i|
|
110
|
-
|
111
|
+
kw_out = i.zero? ? Metanorma::Utils.strict_capitalize_first(kw) : kw
|
112
|
+
xml.keyword kw_out
|
111
113
|
end
|
112
114
|
end
|
113
115
|
|
114
|
-
def strict_capitalize(str)
|
115
|
-
letters = str.split("")
|
116
|
-
letters.first.upcase!
|
117
|
-
letters.join
|
118
|
-
end
|
119
|
-
|
120
116
|
def clause_parse(attrs, xml, node)
|
121
117
|
node.option?("unnumbered") and attrs[:unnumbered] = true
|
122
118
|
case sectiontype1(node)
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require "asciidoctor"
|
2
2
|
require "asciidoctor/standoc/converter"
|
3
3
|
require "fileutils"
|
4
|
+
require_relative "./front_id"
|
4
5
|
|
5
6
|
module Asciidoctor
|
6
7
|
module ITU
|
@@ -13,6 +14,10 @@ module Asciidoctor
|
|
13
14
|
end
|
14
15
|
end
|
15
16
|
|
17
|
+
def relaton_relations
|
18
|
+
super + %w(complements)
|
19
|
+
end
|
20
|
+
|
16
21
|
def title_attr(type, lang = "en")
|
17
22
|
{ language: lang, format: "text/plain", type: type }
|
18
23
|
end
|
@@ -109,55 +114,6 @@ module Asciidoctor
|
|
109
114
|
end
|
110
115
|
end
|
111
116
|
|
112
|
-
def metadata_id(node, xml)
|
113
|
-
provisional_id(node, xml)
|
114
|
-
itu_id(node, xml)
|
115
|
-
recommendation_id(node, xml)
|
116
|
-
end
|
117
|
-
|
118
|
-
def provisional_id(node, xml)
|
119
|
-
return unless node.attr("provisional-name")
|
120
|
-
|
121
|
-
xml.docidentifier **{ type: "ITU-provisional" } do |i|
|
122
|
-
i << node.attr("provisional-name")
|
123
|
-
end
|
124
|
-
end
|
125
|
-
|
126
|
-
ITULANG = { "en" => "E", "fr" => "F", "ar" => "A", "es" => "S",
|
127
|
-
"zh" => "C", "ru" => "R" }.freeze
|
128
|
-
|
129
|
-
def itu_id1(node, lang)
|
130
|
-
bureau = node.attr("bureau") || "T"
|
131
|
-
id = if doctype(node) == "service-publication"
|
132
|
-
@i18n.annex_to_itu_ob_abbrev.sub(/%/, node.attr("docnumber"))
|
133
|
-
else
|
134
|
-
"ITU-#{bureau} #{node.attr('docnumber')}"
|
135
|
-
end
|
136
|
-
id + (lang ? "-#{ITULANG[@lang]}" : "")
|
137
|
-
end
|
138
|
-
|
139
|
-
def itu_id(node, xml)
|
140
|
-
return unless node.attr("docnumber")
|
141
|
-
|
142
|
-
xml.docidentifier **{ type: "ITU" } do |i|
|
143
|
-
i << itu_id1(node, false)
|
144
|
-
end
|
145
|
-
xml.docidentifier **{ type: "ITU-lang" } do |i|
|
146
|
-
i << itu_id1(node, true)
|
147
|
-
end
|
148
|
-
xml.docnumber { |i| i << node.attr("docnumber") }
|
149
|
-
end
|
150
|
-
|
151
|
-
def recommendation_id(node, xml)
|
152
|
-
return unless node.attr("recommendationnumber")
|
153
|
-
|
154
|
-
node.attr("recommendationnumber").split("/").each do |s|
|
155
|
-
xml.docidentifier **{ type: "ITU-Recommendation" } do |i|
|
156
|
-
i << s
|
157
|
-
end
|
158
|
-
end
|
159
|
-
end
|
160
|
-
|
161
117
|
def metadata_series(node, xml)
|
162
118
|
node.attr("series") and
|
163
119
|
xml.series **{ type: "main" } do |s|
|
@@ -191,18 +147,6 @@ module Asciidoctor
|
|
191
147
|
xml.ip_notice_received (node.attr("ip-notice-received") || "false")
|
192
148
|
end
|
193
149
|
|
194
|
-
def structured_id(node, xml)
|
195
|
-
return unless node.attr("docnumber")
|
196
|
-
|
197
|
-
xml.structuredidentifier do |i|
|
198
|
-
i.bureau node.attr("bureau") || "T"
|
199
|
-
i.docnumber node.attr("docnumber")
|
200
|
-
a = node.attr("annexid") and i.annexid a
|
201
|
-
a = node.attr("amendment-number") and i.amendment a
|
202
|
-
a = node.attr("corrigendum-number") and i.corrigendum a
|
203
|
-
end
|
204
|
-
end
|
205
|
-
|
206
150
|
def metadata_techreport(node, xml)
|
207
151
|
a = node.attr("meeting") and
|
208
152
|
metadata_meeting(a, node.attr("meeting-acronym"), xml)
|
@@ -0,0 +1,67 @@
|
|
1
|
+
module Asciidoctor
|
2
|
+
module ITU
|
3
|
+
class Converter < Standoc::Converter
|
4
|
+
def metadata_id(node, xml)
|
5
|
+
provisional_id(node, xml)
|
6
|
+
itu_id(node, xml)
|
7
|
+
recommendation_id(node, xml)
|
8
|
+
end
|
9
|
+
|
10
|
+
def provisional_id(node, xml)
|
11
|
+
return unless node.attr("provisional-name")
|
12
|
+
|
13
|
+
xml.docidentifier **{ type: "ITU-provisional" } do |i|
|
14
|
+
i << node.attr("provisional-name")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
ITULANG = { "en" => "E", "fr" => "F", "ar" => "A", "es" => "S",
|
19
|
+
"zh" => "C", "ru" => "R" }.freeze
|
20
|
+
|
21
|
+
def itu_id1(node, lang)
|
22
|
+
bureau = node.attr("bureau") || "T"
|
23
|
+
id = if doctype(node) == "service-publication"
|
24
|
+
@i18n.annex_to_itu_ob_abbrev.sub(/%/,
|
25
|
+
node.attr("docnumber"))
|
26
|
+
else
|
27
|
+
"ITU-#{bureau} #{node.attr('docnumber')}"
|
28
|
+
end
|
29
|
+
id + (lang ? "-#{ITULANG[@lang]}" : "")
|
30
|
+
end
|
31
|
+
|
32
|
+
def itu_id(node, xml)
|
33
|
+
return unless node.attr("docnumber")
|
34
|
+
|
35
|
+
xml.docidentifier **{ type: "ITU" } do |i|
|
36
|
+
i << itu_id1(node, false)
|
37
|
+
end
|
38
|
+
xml.docidentifier **{ type: "ITU-lang" } do |i|
|
39
|
+
i << itu_id1(node, true)
|
40
|
+
end
|
41
|
+
xml.docnumber { |i| i << node.attr("docnumber") }
|
42
|
+
end
|
43
|
+
|
44
|
+
def recommendation_id(node, xml)
|
45
|
+
return unless node.attr("recommendationnumber")
|
46
|
+
|
47
|
+
node.attr("recommendationnumber").split("/").each do |s|
|
48
|
+
xml.docidentifier **{ type: "ITU-Recommendation" } do |i|
|
49
|
+
i << s
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def structured_id(node, xml)
|
55
|
+
return unless node.attr("docnumber")
|
56
|
+
|
57
|
+
xml.structuredidentifier do |i|
|
58
|
+
i.bureau node.attr("bureau") || "T"
|
59
|
+
i.docnumber node.attr("docnumber")
|
60
|
+
a = node.attr("annexid") and i.annexid a
|
61
|
+
a = node.attr("amendment-number") and i.amendment a
|
62
|
+
a = node.attr("corrigendum-number") and i.corrigendum a
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|