metanorma-itu 2.6.1 → 2.6.3
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/itu/html/_coverpage.css +7 -0
- data/lib/isodoc/itu/html/htmlstyle.css +14 -6
- data/lib/isodoc/itu/html/htmlstyle.scss +2 -0
- data/lib/isodoc/itu/itu.implementers-guide.xsl +618 -248
- data/lib/isodoc/itu/itu.in-force.xsl +618 -248
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +618 -248
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +618 -248
- data/lib/isodoc/itu/itu.recommendation.xsl +618 -248
- data/lib/isodoc/itu/itu.resolution.xsl +618 -248
- data/lib/isodoc/itu/itu.service-publication.xsl +618 -248
- data/lib/isodoc/itu/itu.technical-paper.xsl +618 -248
- data/lib/isodoc/itu/itu.technical-report.xsl +618 -248
- data/lib/isodoc/itu/presentation_ref.rb +8 -4
- data/lib/isodoc/itu/presentation_section.rb +118 -0
- data/lib/isodoc/itu/presentation_xml_convert.rb +20 -132
- data/lib/isodoc/itu/xref.rb +0 -19
- data/lib/metanorma/itu/basicdoc.rng +71 -59
- data/lib/metanorma/itu/front.rb +2 -1
- data/lib/metanorma/itu/isodoc.rng +60 -18
- data/lib/metanorma/itu/validate.rb +0 -1
- data/lib/metanorma/itu/version.rb +1 -1
- metadata +3 -2
@@ -15,12 +15,16 @@ module IsoDoc
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def bibrender_relaton(xml, renderings)
|
18
|
-
f = renderings[xml["id"]][:formattedref]
|
18
|
+
f = renderings[xml["id"]][:formattedref] or return
|
19
19
|
ids = reference_format_start(xml)
|
20
20
|
f &&= "<formattedref>#{ids}#{f}</formattedref>"
|
21
|
-
|
22
|
-
|
23
|
-
xml.children
|
21
|
+
if x = xml.at(ns("./formattedref"))
|
22
|
+
x.replace(f)
|
23
|
+
elsif xml.children.empty?
|
24
|
+
xml << f
|
25
|
+
else
|
26
|
+
xml.children.first.previous = f
|
27
|
+
end
|
24
28
|
end
|
25
29
|
|
26
30
|
def multi_bibitem_ref_code(bib)
|
@@ -0,0 +1,118 @@
|
|
1
|
+
module IsoDoc
|
2
|
+
module Itu
|
3
|
+
class PresentationXMLConvert < IsoDoc::PresentationXMLConvert
|
4
|
+
def clause1(elem)
|
5
|
+
clause1_super?(elem) and return super
|
6
|
+
lbl = @xrefs.anchor(elem["id"], :label, false)
|
7
|
+
oldsuppressheadingnumbers = @suppressheadingnumbers
|
8
|
+
@suppressheadingnumbers = true
|
9
|
+
super
|
10
|
+
@suppressheadingnumbers = oldsuppressheadingnumbers
|
11
|
+
lbl.blank? || elem["unnumbered"] and return
|
12
|
+
elem.previous =
|
13
|
+
"<p keep-with-next='true' class='supertitle'>" \
|
14
|
+
"#{labelled_autonum(@i18n.get['section'].upcase, elem["id"], lbl)}</p>"
|
15
|
+
#"<span element='fmt-element-name'>#{@i18n.get['section'].upcase}</span> #{autonum(elem['id'], lbl)}</p>"
|
16
|
+
end
|
17
|
+
|
18
|
+
def clause1_super?(elem)
|
19
|
+
@doctype != "resolution" ||
|
20
|
+
!%w(sections bibliography).include?(elem.parent.name)
|
21
|
+
end
|
22
|
+
|
23
|
+
def annex1(elem)
|
24
|
+
if @doctype == "resolution"
|
25
|
+
annex1_resolution(elem)
|
26
|
+
else
|
27
|
+
super
|
28
|
+
annex1_non_resolution(elem)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def annex1_resolution(elem)
|
33
|
+
elem.elements.first.previous = annex1_supertitle(elem)
|
34
|
+
# TODO: do not alter title, alter semx/@element = title
|
35
|
+
t = elem.at(ns("./title")) and
|
36
|
+
t.children = "<strong>#{to_xml(t.children)}</strong>"
|
37
|
+
prefix_name(elem, {}, nil, "title")
|
38
|
+
end
|
39
|
+
|
40
|
+
def annex1_non_resolution(elem)
|
41
|
+
info = elem["obligation"] == "informative"
|
42
|
+
ins = elem.at(ns("./fmt-xref-label")) || elem.at(ns("./fmt-title"))
|
43
|
+
p = (info ? @i18n.inform_annex : @i18n.norm_annex)
|
44
|
+
.gsub("%", @i18n.doctype_dict[@meta.get[:doctype_original]] || "")
|
45
|
+
ins.next = %(<p class="annex_obligation"><span class='fmt-obligation'>#{p}</span></p>)
|
46
|
+
end
|
47
|
+
|
48
|
+
def annex1_supertitle(elem)
|
49
|
+
lbl = @xrefs.anchor(elem["id"], :label)
|
50
|
+
res = elem.at(ns("//bibdata/title[@type = 'resolution']"))
|
51
|
+
subhead = @i18n.l10n("(#{@i18n.get['to']} #{to_xml(res.children)})")
|
52
|
+
"<p class='supertitle'>#{autonum(elem['id'], lbl)}<br/>#{subhead}</p>"
|
53
|
+
end
|
54
|
+
|
55
|
+
def middle_title(isoxml)
|
56
|
+
s = isoxml.at(ns("//sections")) or return
|
57
|
+
titfn = isoxml.at(ns("//note[@type = 'title-footnote']"))
|
58
|
+
case @doctype
|
59
|
+
when "resolution"
|
60
|
+
middle_title_resolution(isoxml, s.children.first)
|
61
|
+
when "contribution"
|
62
|
+
else
|
63
|
+
middle_title_recommendation(isoxml, s.children.first)
|
64
|
+
end
|
65
|
+
#titfn and renumber_footnotes(isoxml)
|
66
|
+
end
|
67
|
+
|
68
|
+
# KILL
|
69
|
+
def renumber_footnotesx(isoxml)
|
70
|
+
(isoxml.xpath(ns("//fn")) -
|
71
|
+
isoxml.xpath(ns("//table//fn | //figure//fn")))
|
72
|
+
.each_with_index do |fn, i|
|
73
|
+
fn["reference"] = (i + 1).to_s
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def middle_title_resolution(isoxml, out)
|
78
|
+
res = isoxml.at(ns("//bibdata/title[@type = 'resolution']"))
|
79
|
+
out.previous =
|
80
|
+
"<p class='zzSTDTitle1' align='center'>#{res.children.to_xml}</p>"
|
81
|
+
t = @meta.get[:doctitle] and
|
82
|
+
out.previous = "<p class='zzSTDTitle2'>#{t}</p>"
|
83
|
+
middle_title_resolution_subtitle(isoxml, out)
|
84
|
+
end
|
85
|
+
|
86
|
+
def middle_title_resolution_subtitle(isoxml, out)
|
87
|
+
ret = "<p align='center' class='zzSTDTitle2'><em>("
|
88
|
+
d = isoxml.at(ns("//bibdata/title[@type = 'resolution-placedate']"))
|
89
|
+
ret += "#{d.children.to_xml.strip}</em>)"
|
90
|
+
ret += "#{title_footnotes(isoxml)}</p>"
|
91
|
+
out.previous = ret
|
92
|
+
end
|
93
|
+
|
94
|
+
def middle_title_recommendation(isoxml, out)
|
95
|
+
ret = ""
|
96
|
+
type = @meta.get[:doctype]
|
97
|
+
@meta.get[:unpublished] && @meta.get[:draft_new_doctype] and
|
98
|
+
type = @meta.get[:draft_new_doctype]
|
99
|
+
id = @meta.get[:docnumber] and
|
100
|
+
ret += "<<p class='zzSTDTitle1'>#{type} #{id}</p>"
|
101
|
+
t = @meta.get[:doctitle] and
|
102
|
+
ret += "<p class='zzSTDTitle2'>#{t}"
|
103
|
+
ret += "#{title_footnotes(isoxml)}</p>"
|
104
|
+
s = @meta.get[:docsubtitle] and ret += "<p class='zzSTDTitle3'>#{s}</p>"
|
105
|
+
out.previous = ret
|
106
|
+
end
|
107
|
+
|
108
|
+
def title_footnotes(isoxml)
|
109
|
+
ret = ""
|
110
|
+
isoxml.xpath(ns("//note[@type = 'title-footnote']"))
|
111
|
+
.each_with_index do |f, i|
|
112
|
+
ret += "<fn reference='H#{i}'>#{f.remove.children.to_xml}</fn>"
|
113
|
+
end
|
114
|
+
ret
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
@@ -6,6 +6,7 @@ require_relative "presentation_bibdata"
|
|
6
6
|
require_relative "presentation_preface"
|
7
7
|
require_relative "presentation_ref"
|
8
8
|
require_relative "presentation_contribution"
|
9
|
+
require_relative "presentation_section"
|
9
10
|
require_relative "../../nokogiri/xml"
|
10
11
|
|
11
12
|
module IsoDoc
|
@@ -27,11 +28,6 @@ module IsoDoc
|
|
27
28
|
end
|
28
29
|
end
|
29
30
|
|
30
|
-
# KILL
|
31
|
-
def quotesourcex(docxml)
|
32
|
-
docxml.xpath(ns("//quote//source")).each { |f| eref1(f) }
|
33
|
-
end
|
34
|
-
|
35
31
|
def bracket_opt(text)
|
36
32
|
text.nil? and return
|
37
33
|
/^\[.+\]$/.match?(text) and return text
|
@@ -43,7 +39,7 @@ module IsoDoc
|
|
43
39
|
desgn.name == "preferred" or return
|
44
40
|
out = desgn.parent
|
45
41
|
.at(ns("./fmt-preferred//semx[@element = 'preferred'][last()]"))
|
46
|
-
|
42
|
+
out or return
|
47
43
|
out.text.strip.empty? and return
|
48
44
|
out.children = l10n "#{to_xml out.children}:"
|
49
45
|
end
|
@@ -97,8 +93,24 @@ module IsoDoc
|
|
97
93
|
end
|
98
94
|
end
|
99
95
|
|
100
|
-
def
|
101
|
-
fnote
|
96
|
+
def fn_ref_label(fnote)
|
97
|
+
if fnote.ancestors("table, figure").empty? ||
|
98
|
+
!fnote.ancestors("name, fmt-name").empty?
|
99
|
+
super
|
100
|
+
else
|
101
|
+
"<sup>#{fn_label(fnote)}" \
|
102
|
+
"<span class='fmt-label-delim'>)</span></sup>"
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
def fn_body_label(fnote)
|
107
|
+
if fnote.ancestors("table, figure").empty? ||
|
108
|
+
!fnote.ancestors("name, fmt-name").empty?
|
109
|
+
super
|
110
|
+
else
|
111
|
+
"<sup>#{fn_label(fnote)}" \
|
112
|
+
"<span class='fmt-label-delim'>)</span></sup>"
|
113
|
+
end
|
102
114
|
end
|
103
115
|
|
104
116
|
def get_eref_linkend(node)
|
@@ -122,69 +134,6 @@ module IsoDoc
|
|
122
134
|
{ group: "'" }
|
123
135
|
end
|
124
136
|
|
125
|
-
# KILL
|
126
|
-
def clause1x(elem)
|
127
|
-
clause1_super?(elem) and return super
|
128
|
-
@suppressheadingnumbers || elem["unnumbered"] and return
|
129
|
-
t = elem.at(ns("./title")) and t["depth"] = "1"
|
130
|
-
lbl = @xrefs.anchor(elem["id"], :label, false)
|
131
|
-
lbl.blank? and return
|
132
|
-
elem.previous =
|
133
|
-
"<p keep-with-next='true' class='supertitle'>" \
|
134
|
-
"#{@i18n.get['section'].upcase} #{lbl}</p>"
|
135
|
-
end
|
136
|
-
|
137
|
-
def clause1(elem)
|
138
|
-
clause1_super?(elem) and return super
|
139
|
-
lbl = @xrefs.anchor(elem["id"], :label, false)
|
140
|
-
oldsuppressheadingnumbers = @suppressheadingnumbers
|
141
|
-
@suppressheadingnumbers = true
|
142
|
-
super
|
143
|
-
@suppressheadingnumbers = oldsuppressheadingnumbers
|
144
|
-
lbl.blank? || elem["unnumbered"] and return
|
145
|
-
elem.previous =
|
146
|
-
"<p keep-with-next='true' class='supertitle'>" \
|
147
|
-
"#{labelled_autonum(@i18n.get['section'].upcase, elem["id"], lbl)}</p>"
|
148
|
-
#"<span element='fmt-element-name'>#{@i18n.get['section'].upcase}</span> #{autonum(elem['id'], lbl)}</p>"
|
149
|
-
end
|
150
|
-
|
151
|
-
def clause1_super?(elem)
|
152
|
-
@doctype != "resolution" ||
|
153
|
-
!%w(sections bibliography).include?(elem.parent.name)
|
154
|
-
end
|
155
|
-
|
156
|
-
def annex1(elem)
|
157
|
-
if @doctype == "resolution"
|
158
|
-
annex1_resolution(elem)
|
159
|
-
else
|
160
|
-
super
|
161
|
-
annex1_non_resolution(elem)
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
|
-
def annex1_resolution(elem)
|
166
|
-
elem.elements.first.previous = annex1_supertitle(elem)
|
167
|
-
# TODO: do not alter title, alter semx/@element = title
|
168
|
-
t = elem.at(ns("./title")) and
|
169
|
-
t.children = "<strong>#{to_xml(t.children)}</strong>"
|
170
|
-
prefix_name(elem, {}, nil, "title")
|
171
|
-
end
|
172
|
-
|
173
|
-
def annex1_non_resolution(elem)
|
174
|
-
info = elem["obligation"] == "informative"
|
175
|
-
ins = elem.at(ns("./fmt-xref-label")) || elem.at(ns("./fmt-title"))
|
176
|
-
p = (info ? @i18n.inform_annex : @i18n.norm_annex)
|
177
|
-
.sub("%", @i18n.doctype_dict[@meta.get[:doctype_original]] || "")
|
178
|
-
ins.next = %(<p class="annex_obligation"><span class='fmt-obligation'>#{p}</span></p>)
|
179
|
-
end
|
180
|
-
|
181
|
-
def annex1_supertitle(elem)
|
182
|
-
lbl = @xrefs.anchor(elem["id"], :label)
|
183
|
-
res = elem.at(ns("//bibdata/title[@type = 'resolution']"))
|
184
|
-
subhead = @i18n.l10n("(#{@i18n.get['to']} #{to_xml(res.children)})")
|
185
|
-
"<p class='supertitle'>#{autonum(elem['id'], lbl)}<br/>#{subhead}</p>"
|
186
|
-
end
|
187
|
-
|
188
137
|
def ol_depth(node)
|
189
138
|
node["class"] == "steps" ||
|
190
139
|
node.at(".//ancestor::xmlns:ol[@class = 'steps']") or return super
|
@@ -197,67 +146,6 @@ module IsoDoc
|
|
197
146
|
type
|
198
147
|
end
|
199
148
|
|
200
|
-
def middle_title(isoxml)
|
201
|
-
s = isoxml.at(ns("//sections")) or return
|
202
|
-
titfn = isoxml.at(ns("//note[@type = 'title-footnote']"))
|
203
|
-
case @doctype
|
204
|
-
when "resolution"
|
205
|
-
middle_title_resolution(isoxml, s.children.first)
|
206
|
-
when "contribution"
|
207
|
-
else
|
208
|
-
middle_title_recommendation(isoxml, s.children.first)
|
209
|
-
end
|
210
|
-
titfn and renumber_footnotes(isoxml)
|
211
|
-
end
|
212
|
-
|
213
|
-
def renumber_footnotes(isoxml)
|
214
|
-
(isoxml.xpath(ns("//fn")) -
|
215
|
-
isoxml.xpath(ns("//table//fn | //figure//fn")))
|
216
|
-
.each_with_index do |fn, i|
|
217
|
-
fn["reference"] = (i + 1).to_s
|
218
|
-
end
|
219
|
-
end
|
220
|
-
|
221
|
-
def middle_title_resolution(isoxml, out)
|
222
|
-
res = isoxml.at(ns("//bibdata/title[@type = 'resolution']"))
|
223
|
-
out.previous =
|
224
|
-
"<p class='zzSTDTitle1' align='center'>#{res.children.to_xml}</p>"
|
225
|
-
t = @meta.get[:doctitle] and
|
226
|
-
out.previous = "<p class='zzSTDTitle2'>#{t}</p>"
|
227
|
-
middle_title_resolution_subtitle(isoxml, out)
|
228
|
-
end
|
229
|
-
|
230
|
-
def middle_title_resolution_subtitle(isoxml, out)
|
231
|
-
ret = "<p align='center' class='zzSTDTitle2'><em>("
|
232
|
-
d = isoxml.at(ns("//bibdata/title[@type = 'resolution-placedate']"))
|
233
|
-
ret += "#{d.children.to_xml.strip}</em>)"
|
234
|
-
ret += "#{title_footnotes(isoxml)}</p>"
|
235
|
-
out.previous = ret
|
236
|
-
end
|
237
|
-
|
238
|
-
def middle_title_recommendation(isoxml, out)
|
239
|
-
ret = ""
|
240
|
-
type = @meta.get[:doctype]
|
241
|
-
@meta.get[:unpublished] && @meta.get[:draft_new_doctype] and
|
242
|
-
type = @meta.get[:draft_new_doctype]
|
243
|
-
id = @meta.get[:docnumber] and
|
244
|
-
ret += "<<p class='zzSTDTitle1'>#{type} #{id}</p>"
|
245
|
-
t = @meta.get[:doctitle] and
|
246
|
-
ret += "<p class='zzSTDTitle2'>#{t}"
|
247
|
-
ret += "#{title_footnotes(isoxml)}</p>"
|
248
|
-
s = @meta.get[:docsubtitle] and ret += "<p class='zzSTDTitle3'>#{s}</p>"
|
249
|
-
out.previous = ret
|
250
|
-
end
|
251
|
-
|
252
|
-
def title_footnotes(isoxml)
|
253
|
-
ret = ""
|
254
|
-
isoxml.xpath(ns("//note[@type = 'title-footnote']"))
|
255
|
-
.each_with_index do |f, i|
|
256
|
-
ret += "<fn reference='H#{i}'>#{f.remove.children.to_xml}</fn>"
|
257
|
-
end
|
258
|
-
ret
|
259
|
-
end
|
260
|
-
|
261
149
|
def dl(xml)
|
262
150
|
super
|
263
151
|
(xml.xpath(ns("//dl")) -
|
data/lib/isodoc/itu/xref.rb
CHANGED
@@ -56,16 +56,6 @@ module IsoDoc
|
|
56
56
|
")"
|
57
57
|
end
|
58
58
|
|
59
|
-
# KILL
|
60
|
-
def sequential_figure_bodyx(subfig, counter, elem, klass, container: false)
|
61
|
-
label = counter.print
|
62
|
-
label &&= label + subfigure_label(subfig)
|
63
|
-
@anchors[elem["id"]] = anchor_struct(
|
64
|
-
label, container ? elem : nil, @labels[klass] || klass.capitalize,
|
65
|
-
klass, elem["unnumbered"]
|
66
|
-
)
|
67
|
-
end
|
68
|
-
|
69
59
|
def figure_anchor(elem, sublabel, label, klass, container: false)
|
70
60
|
if sublabel
|
71
61
|
subfigure_anchor(elem, sublabel, label, klass, container: false)
|
@@ -96,15 +86,6 @@ module IsoDoc
|
|
96
86
|
end
|
97
87
|
end
|
98
88
|
|
99
|
-
# KILL
|
100
|
-
def hierarchical_figure_bodyx(num, subfignum, counter, block, klass)
|
101
|
-
label = "#{num}#{hier_separator}#{counter.print}" + subfigure_label(subfignum)
|
102
|
-
@anchors[block["id"]] = anchor_struct(
|
103
|
-
label, nil, @labels[klass] || klass.capitalize,
|
104
|
-
klass, block["unnumbered"]
|
105
|
-
)
|
106
|
-
end
|
107
|
-
|
108
89
|
def sequential_formula_names(clause, container: false)
|
109
90
|
clause.first&.xpath(ns(middle_sections))&.each do |c|
|
110
91
|
if c["id"] && @anchors[c["id"]]
|
@@ -382,33 +382,7 @@ in a document (e.g. sourcecode annotations)</a:documentation>
|
|
382
382
|
<a:documentation>Block intended to capture reviewer comments about some text in the document</a:documentation>
|
383
383
|
<element name="review">
|
384
384
|
<ref name="RequiredId"/>
|
385
|
-
<
|
386
|
-
<a:documentation>The party who has offered the comment</a:documentation>
|
387
|
-
</attribute>
|
388
|
-
<optional>
|
389
|
-
<attribute name="type">
|
390
|
-
<a:documentation>The type of reviewer comment</a:documentation>
|
391
|
-
</attribute>
|
392
|
-
</optional>
|
393
|
-
<optional>
|
394
|
-
<attribute name="date">
|
395
|
-
<a:documentation>The date when the comment was made</a:documentation>
|
396
|
-
<data type="dateTime"/>
|
397
|
-
</attribute>
|
398
|
-
</optional>
|
399
|
-
<optional>
|
400
|
-
<attribute name="from">
|
401
|
-
<a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
|
402
|
-
If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
|
403
|
-
<data type="IDREF"/>
|
404
|
-
</attribute>
|
405
|
-
</optional>
|
406
|
-
<optional>
|
407
|
-
<attribute name="to">
|
408
|
-
<a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
|
409
|
-
<data type="IDREF"/>
|
410
|
-
</attribute>
|
411
|
-
</optional>
|
385
|
+
<ref name="ReviewAttributes"/>
|
412
386
|
<oneOrMore>
|
413
387
|
<ref name="paragraph">
|
414
388
|
<a:documentation>Reviewer comments content</a:documentation>
|
@@ -416,6 +390,35 @@ If not provided, the comment applies in the vicinity of the place it has been in
|
|
416
390
|
</oneOrMore>
|
417
391
|
</element>
|
418
392
|
</define>
|
393
|
+
<define name="ReviewAttributes">
|
394
|
+
<attribute name="reviewer">
|
395
|
+
<a:documentation>The party who has offered the comment</a:documentation>
|
396
|
+
</attribute>
|
397
|
+
<optional>
|
398
|
+
<attribute name="type">
|
399
|
+
<a:documentation>The type of reviewer comment</a:documentation>
|
400
|
+
</attribute>
|
401
|
+
</optional>
|
402
|
+
<optional>
|
403
|
+
<attribute name="date">
|
404
|
+
<a:documentation>The date when the comment was made</a:documentation>
|
405
|
+
<data type="dateTime"/>
|
406
|
+
</attribute>
|
407
|
+
</optional>
|
408
|
+
<optional>
|
409
|
+
<attribute name="from">
|
410
|
+
<a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
|
411
|
+
If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
|
412
|
+
<data type="IDREF"/>
|
413
|
+
</attribute>
|
414
|
+
</optional>
|
415
|
+
<optional>
|
416
|
+
<attribute name="to">
|
417
|
+
<a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
|
418
|
+
<data type="IDREF"/>
|
419
|
+
</attribute>
|
420
|
+
</optional>
|
421
|
+
</define>
|
419
422
|
<define name="NumberingAttributes">
|
420
423
|
<optional>
|
421
424
|
<attribute name="unnumbered">
|
@@ -599,17 +602,9 @@ It is included for convenience, in case processing the citation to extract the a
|
|
599
602
|
<a:documentation>The caption of the block</a:documentation>
|
600
603
|
</ref>
|
601
604
|
</optional>
|
602
|
-
<
|
603
|
-
<
|
604
|
-
|
605
|
-
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
606
|
-
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
607
|
-
</text>
|
608
|
-
<ref name="callout">
|
609
|
-
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
610
|
-
</ref>
|
611
|
-
</choice>
|
612
|
-
</oneOrMore>
|
605
|
+
<ref name="sourcecodebody">
|
606
|
+
<a:documentation>The sourcecode content</a:documentation>
|
607
|
+
</ref>
|
613
608
|
<zeroOrMore>
|
614
609
|
<ref name="annotation">
|
615
610
|
<a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
|
@@ -628,17 +623,9 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
628
623
|
<a:documentation>The caption of the block</a:documentation>
|
629
624
|
</ref>
|
630
625
|
</optional>
|
631
|
-
<
|
632
|
-
<
|
633
|
-
|
634
|
-
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
635
|
-
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
636
|
-
</text>
|
637
|
-
<ref name="callout">
|
638
|
-
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
639
|
-
</ref>
|
640
|
-
</choice>
|
641
|
-
</oneOrMore>
|
626
|
+
<ref name="sourcecodebody">
|
627
|
+
<a:documentation>The sourcecode content</a:documentation>
|
628
|
+
</ref>
|
642
629
|
<zeroOrMore>
|
643
630
|
<ref name="annotation">
|
644
631
|
<a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
|
@@ -651,6 +638,20 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
651
638
|
</ref>
|
652
639
|
</zeroOrMore>
|
653
640
|
</define>
|
641
|
+
<define name="sourcecodebody">
|
642
|
+
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
643
|
+
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
644
|
+
<element name="body">
|
645
|
+
<oneOrMore>
|
646
|
+
<choice>
|
647
|
+
<text/>
|
648
|
+
<ref name="callout">
|
649
|
+
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
650
|
+
</ref>
|
651
|
+
</choice>
|
652
|
+
</oneOrMore>
|
653
|
+
</element>
|
654
|
+
</define>
|
654
655
|
<define name="pre">
|
655
656
|
<a:documentation>Pre-formatted block. Wrapper for text to be rendered with fixed-width typeface, and preserving spaces including line breaks.
|
656
657
|
They are intended for a restricted number of functions, most typically ASCII Art (which is still in prominent use in some
|
@@ -859,6 +860,7 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
859
860
|
<define name="tr">
|
860
861
|
<a:documentation>Sequence of cells to be displayed as a row in a table</a:documentation>
|
861
862
|
<element name="tr">
|
863
|
+
<ref name="TrAttributes"/>
|
862
864
|
<oneOrMore>
|
863
865
|
<choice>
|
864
866
|
<ref name="td">
|
@@ -871,6 +873,9 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
871
873
|
</oneOrMore>
|
872
874
|
</element>
|
873
875
|
</define>
|
876
|
+
<define name="TrAttributes">
|
877
|
+
<empty/>
|
878
|
+
</define>
|
874
879
|
<define name="tr-no-id">
|
875
880
|
<a:documentation>Sequence of cells to be displayed as a row in a table: optional ID attributes recursively (for use in Relaton, metadata)</a:documentation>
|
876
881
|
<element name="tr">
|
@@ -1672,18 +1677,25 @@ which can be bookmarks as well as block or section references</a:documentation>
|
|
1672
1677
|
</optional>
|
1673
1678
|
</define>
|
1674
1679
|
<define name="XrefBody">
|
1675
|
-
<
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
+
<a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `<xx>my link text</xx>`)</a:documentation>
|
1681
|
+
<optional>
|
1682
|
+
<element name="display-text">
|
1683
|
+
<oneOrMore>
|
1684
|
+
<ref name="PureTextElement"/>
|
1685
|
+
</oneOrMore>
|
1686
|
+
</element>
|
1687
|
+
</optional>
|
1680
1688
|
</define>
|
1681
1689
|
<define name="ErefBody">
|
1682
|
-
<
|
1683
|
-
<
|
1684
|
-
<
|
1685
|
-
|
1686
|
-
|
1690
|
+
<optional>
|
1691
|
+
<element name="display-text">
|
1692
|
+
<oneOrMore>
|
1693
|
+
<ref name="PureTextElement">
|
1694
|
+
<a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `<xx>my link text</xx>`)</a:documentation>
|
1695
|
+
</ref>
|
1696
|
+
</oneOrMore>
|
1697
|
+
</element>
|
1698
|
+
</optional>
|
1687
1699
|
</define>
|
1688
1700
|
<define name="fn">
|
1689
1701
|
<a:documentation>Inline reference to a paragraph or paragraphs, appearing as a footnote.
|
data/lib/metanorma/itu/front.rb
CHANGED
@@ -24,7 +24,8 @@ module Metanorma
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def title_defaultlang(node, xml)
|
27
|
-
a = node.attr("title") || node.attr("title-#{@lang}") ||
|
27
|
+
a = node.attr("title") || node.attr("title-#{@lang}") ||
|
28
|
+
node.attr("doctitle")
|
28
29
|
insert_title(xml, "main", @lang, a)
|
29
30
|
if a = node.attr("annextitle") || node.attr("annextitle-#{@lang}")
|
30
31
|
insert_title(xml, "annex", @lang, a)
|