metanorma-itu 1.1.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/itu/basicdoc.rng +31 -1
- data/lib/asciidoctor/itu/cleanup.rb +70 -40
- data/lib/asciidoctor/itu/converter.rb +36 -46
- data/lib/asciidoctor/itu/front.rb +2 -31
- data/lib/asciidoctor/itu/isodoc.rng +124 -15
- data/lib/asciidoctor/itu/validate.rb +22 -11
- data/lib/isodoc/itu/base_convert.rb +33 -83
- data/lib/isodoc/itu/html/_coverpage.css +349 -0
- data/lib/isodoc/itu/html/htmlstyle.css +1159 -0
- data/lib/isodoc/itu/html/itu.css +1150 -0
- data/lib/isodoc/itu/html/itu.scss +19 -5
- data/lib/isodoc/itu/html/wordstyle.css +1808 -0
- data/lib/isodoc/itu/html_convert.rb +9 -4
- data/lib/isodoc/itu/i18n-en.yaml +25 -0
- data/lib/isodoc/itu/i18n.rb +14 -0
- data/lib/isodoc/itu/init.rb +29 -0
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +1986 -2070
- data/lib/isodoc/itu/itu.recommendation.xsl +1986 -2070
- data/lib/isodoc/itu/itu.resolution.xsl +1986 -2070
- data/lib/isodoc/itu/metadata.rb +8 -5
- data/lib/isodoc/itu/pdf_convert.rb +0 -1
- data/lib/isodoc/itu/presentation_xml_convert.rb +46 -1
- data/lib/isodoc/itu/ref.rb +10 -9
- data/lib/isodoc/itu/terms.rb +10 -19
- data/lib/isodoc/itu/word_cleanup.rb +152 -0
- data/lib/isodoc/itu/word_convert.rb +14 -126
- data/lib/isodoc/itu/xref.rb +44 -31
- data/lib/metanorma/itu/processor.rb +8 -4
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +2 -2
- metadata +13 -7
- data/lib/asciidoctor/itu/i18n-en.yaml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2928c54fd6da163508649bdf9367bdf62f8e65ec3c2f598f4ab7d66911da6429
|
4
|
+
data.tar.gz: 21886b70fdec2eb308d94580d685bd78a6c7aa0faf5ced0556bd4a3ab59d245e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 782bc386c1bf33a61b33c953e427b9a695ae802e23489734e471a51c6ceca75a63e11111fd0d757864e899f0d2f8af190cf77862146622c29d9eb6f3c9da1804
|
7
|
+
data.tar.gz: ac2dbe62d0dd1eb5f9c9c498c8b3708d29762d4f0865e102476a0848479d51357adbda59b92670ffa787e8386a5d902396a6465da757885f5385283643e30f0d
|
@@ -158,7 +158,17 @@
|
|
158
158
|
<data type="ID"/>
|
159
159
|
</attribute>
|
160
160
|
<oneOrMore>
|
161
|
-
<
|
161
|
+
<choice>
|
162
|
+
<ref name="formula"/>
|
163
|
+
<ref name="ul"/>
|
164
|
+
<ref name="ol"/>
|
165
|
+
<ref name="dl"/>
|
166
|
+
<ref name="quote"/>
|
167
|
+
<ref name="sourcecode"/>
|
168
|
+
<ref name="paragraph"/>
|
169
|
+
<ref name="table"/>
|
170
|
+
<ref name="figure"/>
|
171
|
+
</choice>
|
162
172
|
</oneOrMore>
|
163
173
|
</element>
|
164
174
|
</define>
|
@@ -402,6 +412,16 @@
|
|
402
412
|
</choice>
|
403
413
|
</attribute>
|
404
414
|
</optional>
|
415
|
+
<optional>
|
416
|
+
<attribute name="valign">
|
417
|
+
<choice>
|
418
|
+
<value>top</value>
|
419
|
+
<value>middle</value>
|
420
|
+
<value>bottom</value>
|
421
|
+
<value>baseline</value>
|
422
|
+
</choice>
|
423
|
+
</attribute>
|
424
|
+
</optional>
|
405
425
|
<choice>
|
406
426
|
<zeroOrMore>
|
407
427
|
<ref name="TextElement"/>
|
@@ -429,6 +449,16 @@
|
|
429
449
|
</choice>
|
430
450
|
</attribute>
|
431
451
|
</optional>
|
452
|
+
<optional>
|
453
|
+
<attribute name="valign">
|
454
|
+
<choice>
|
455
|
+
<value>top</value>
|
456
|
+
<value>middle</value>
|
457
|
+
<value>bottom</value>
|
458
|
+
<value>baseline</value>
|
459
|
+
</choice>
|
460
|
+
</attribute>
|
461
|
+
</optional>
|
432
462
|
<choice>
|
433
463
|
<zeroOrMore>
|
434
464
|
<ref name="TextElement"/>
|
@@ -4,13 +4,14 @@ module Asciidoctor
|
|
4
4
|
def sections_cleanup(x)
|
5
5
|
super
|
6
6
|
insert_missing_sections(x) unless @no_insert_missing_sections
|
7
|
+
insert_empty_clauses(x)
|
7
8
|
end
|
8
9
|
|
9
10
|
def table_cleanup(xmldoc)
|
10
11
|
super
|
11
12
|
xmldoc.xpath("//thead/tr[1]/th | //thead/tr[1]/td").each do |t|
|
12
13
|
text = t.at("./descendant::text()") or next
|
13
|
-
text.replace(text.text.
|
14
|
+
text.replace(text.text.capitalize)
|
14
15
|
end
|
15
16
|
end
|
16
17
|
|
@@ -22,16 +23,20 @@ module Asciidoctor
|
|
22
23
|
insert_conventions(x)
|
23
24
|
end
|
24
25
|
|
26
|
+
def add_id
|
27
|
+
%(id="_#{UUIDTools::UUID.random_create}")
|
28
|
+
end
|
29
|
+
|
25
30
|
def insert_scope(x)
|
26
31
|
x.at("./*/sections") or
|
27
32
|
x.at("./*/preface | ./*/boilerplate | ./*/bibdata").next =
|
28
33
|
"<sections><sentinel/></sections>"
|
29
34
|
x.at("./*/sections/*") or x.at("./*/sections") << "<sentinel/>"
|
30
35
|
ins = x.at("//sections").elements.first
|
31
|
-
|
32
|
-
ins.previous =
|
33
|
-
"#{@
|
34
|
-
|
36
|
+
x.at("//sections/clause[@type = 'scope']") or
|
37
|
+
ins.previous =
|
38
|
+
"<clause type='scope' #{add_id}><title>#{@i18n.scope}</title><p>"\
|
39
|
+
"#{@i18n.clause_empty}</p></clause>"
|
35
40
|
x&.at("//sentinel")&.remove
|
36
41
|
end
|
37
42
|
|
@@ -40,42 +45,52 @@ module Asciidoctor
|
|
40
45
|
x.at("./*/annex[last()] | ./*/sections").next =
|
41
46
|
"<bibliography><sentinel/></bibliography>"
|
42
47
|
ins = x.at("//bibliography").elements.first
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
ins.previous = "<references normative='true'><title>References</title>"\
|
47
|
-
"</references>"
|
48
|
-
end
|
48
|
+
x.at("//bibliography/references[@normative = 'true']") or
|
49
|
+
ins.previous = "<references #{add_id} normative='true'>"\
|
50
|
+
"<title>#{@i18n.normref}</title></references>"
|
49
51
|
x&.at("//sentinel")&.remove
|
50
52
|
end
|
51
53
|
|
52
54
|
def insert_terms(x)
|
53
|
-
ins = x.at("//sections/clause
|
54
|
-
|
55
|
-
ins.next = "<terms><title
|
56
|
-
"#{@labels['clause_empty']}</p></terms>"
|
57
|
-
end
|
55
|
+
ins = x.at("//sections/clause[@type = 'scope']")
|
56
|
+
x.at("//sections//terms") or
|
57
|
+
ins.next = "<terms #{add_id}><title>#{@i18n.termsdef}</title></terms>"
|
58
58
|
end
|
59
59
|
|
60
60
|
def insert_symbols(x)
|
61
61
|
ins = x.at("//sections/terms") ||
|
62
62
|
x.at("//sections/clause[descendant::terms]")
|
63
63
|
unless x.at("//sections//definitions")
|
64
|
-
ins.next = "<definitions
|
65
|
-
"
|
64
|
+
ins.next = "<definitions #{add_id}>"\
|
65
|
+
"<title>#{@i18n.symbolsabbrev}</title></definitions>"
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
69
|
def insert_conventions(x)
|
70
70
|
ins = x.at("//sections//definitions") ||
|
71
71
|
x.at("//sections/clause[descendant::definitions]")
|
72
|
-
unless x.at("//sections/clause
|
73
|
-
ins.next = "<clause
|
74
|
-
"<title
|
75
|
-
"#{@
|
72
|
+
unless x.at("//sections/clause[@type = 'conventions']")
|
73
|
+
ins.next = "<clause #{add_id} type='conventions'>"\
|
74
|
+
"<title>#{@i18n.conventions}</title><p>"\
|
75
|
+
"#{@i18n.clause_empty}</p></clause>"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def insert_empty_clauses(x)
|
80
|
+
x.xpath("//terms[not(./term)][not(.//terms)]").each do |c|
|
81
|
+
insert_empty_clauses1(c, @i18n.clause_empty)
|
82
|
+
end
|
83
|
+
x.xpath("//definitions[not(./dl)]").each do |c|
|
84
|
+
insert_empty_clauses1(c, @i18n.clause_empty)
|
76
85
|
end
|
77
86
|
end
|
78
87
|
|
88
|
+
def insert_empty_clauses1(c, text)
|
89
|
+
c.at("./p") and return
|
90
|
+
ins = c.at("./title") or return
|
91
|
+
ins.next = "<p>#{text}</p>"
|
92
|
+
end
|
93
|
+
|
79
94
|
def cleanup(xmldoc)
|
80
95
|
symbols_cleanup(xmldoc)
|
81
96
|
super
|
@@ -94,24 +109,46 @@ module Asciidoctor
|
|
94
109
|
xmldoc
|
95
110
|
end
|
96
111
|
|
97
|
-
def
|
98
|
-
xmldoc.xpath("//term/preferred").each do |p|
|
99
|
-
if ["terms defined elsewhere",
|
100
|
-
"terms defined in this recommendation"].include? p.text.downcase
|
101
|
-
p.name = "title"
|
102
|
-
p.parent.name = "terms"
|
103
|
-
end
|
104
|
-
end
|
105
|
-
super
|
112
|
+
def termdef_boilerplate_cleanup(xmldoc)
|
106
113
|
end
|
107
114
|
|
108
|
-
def
|
115
|
+
def terms_extract(div)
|
116
|
+
internal = div.at("./terms[@type = 'internal']/title")
|
117
|
+
external = div.at("./terms[@type = 'external']/title")
|
118
|
+
[internal, external]
|
119
|
+
end
|
120
|
+
|
121
|
+
def term_defs_boilerplate(div, source, term, preface, isodoc)
|
122
|
+
internal, external = terms_extract(div.parent)
|
123
|
+
internal&.next_element&.name == "term" and
|
124
|
+
internal.next = "<p>#{@i18n.internal_terms_boilerplate}</p>"
|
125
|
+
internal and internal&.next_element == nil and
|
126
|
+
internal.next = "<p>#{@i18n.no_terms_boilerplate}</p>"
|
127
|
+
external&.next_element&.name == "term" and
|
128
|
+
external.next = "<p>#{@i18n.external_terms_boilerplate}</p>"
|
129
|
+
external and external&.next_element == nil and
|
130
|
+
external.next = "<p>#{@i18n.no_terms_boilerplate}</p>"
|
131
|
+
!internal and !external and
|
132
|
+
%w(term terms).include? div&.next_element&.name and
|
133
|
+
div.next = "<p>#{@i18n.term_def_boilerplate}</p>"
|
134
|
+
end
|
135
|
+
|
136
|
+
def section_names_terms_cleanup(x)
|
137
|
+
super
|
138
|
+
replace_title(
|
139
|
+
x, "//terms[@type = 'internal'] | "\
|
140
|
+
"//clause[./terms[@type = 'internal']][not(./terms[@type = 'external'])]",
|
141
|
+
@i18n&.internal_termsdef)
|
142
|
+
replace_title(
|
143
|
+
x, "//terms[@type = 'external'] | "\
|
144
|
+
"//clause[./terms[@type = 'external']][not(./terms[@type = 'internal'])]",
|
145
|
+
@i18n&.external_termsdef)
|
109
146
|
end
|
110
147
|
|
111
148
|
def symbols_cleanup(xmldoc)
|
112
149
|
sym = xmldoc.at("//definitions/title")
|
113
150
|
sym and sym&.next_element&.name == "dl" and
|
114
|
-
sym.next = "<p>#{@symbols_boilerplate}</p>"
|
151
|
+
sym.next = "<p>#{@i18n.symbols_boilerplate}</p>"
|
115
152
|
end
|
116
153
|
|
117
154
|
PUBLISHER = "./contributor[role/@type = 'publisher']/organization".freeze
|
@@ -160,13 +197,6 @@ module Asciidoctor
|
|
160
197
|
biblio_reorder1(r)
|
161
198
|
end
|
162
199
|
end
|
163
|
-
|
164
|
-
def normref_cleanup(xmldoc)
|
165
|
-
super
|
166
|
-
r = xmldoc.at(NORM_REF) || return
|
167
|
-
title = r.at("./title") and
|
168
|
-
title.content = "References"
|
169
|
-
end
|
170
200
|
end
|
171
201
|
end
|
172
202
|
end
|
@@ -39,7 +39,7 @@ module Asciidoctor
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def doctype(node)
|
42
|
-
ret =
|
42
|
+
ret = super || "recommendation"
|
43
43
|
ret = "recommendation" if ret == "article"
|
44
44
|
ret
|
45
45
|
end
|
@@ -56,9 +56,12 @@ module Asciidoctor
|
|
56
56
|
def outputs(node, ret)
|
57
57
|
File.open(@filename + ".xml", "w:UTF-8") { |f| f.write(ret) }
|
58
58
|
presentation_xml_converter(node).convert(@filename + ".xml")
|
59
|
-
html_converter(node).convert(@filename + ".presentation.xml",
|
60
|
-
|
61
|
-
|
59
|
+
html_converter(node).convert(@filename + ".presentation.xml",
|
60
|
+
nil, false, "#{@filename}.html")
|
61
|
+
doc_converter(node).convert(@filename + ".presentation.xml",
|
62
|
+
nil, false, "#{@filename}.doc")
|
63
|
+
pdf_converter(node)&.convert(@filename + ".presentation.xml",
|
64
|
+
nil, false, "#{@filename}.pdf")
|
62
65
|
end
|
63
66
|
|
64
67
|
def validate(doc)
|
@@ -76,56 +79,32 @@ module Asciidoctor
|
|
76
79
|
when "definitions" then "terms and definitions"
|
77
80
|
when "abbreviations and acronyms" then "symbols and abbreviated terms"
|
78
81
|
when "references" then "normative references"
|
82
|
+
when "terms defined elsewhere" then "terms and definitions"
|
83
|
+
when "terms defined in this recommendation" then "terms and definitions"
|
79
84
|
else
|
80
85
|
super
|
81
86
|
end
|
82
87
|
end
|
83
88
|
|
84
|
-
def
|
85
|
-
|
86
|
-
"
|
89
|
+
def sectiontype(node, level = true)
|
90
|
+
ret = super
|
91
|
+
hdr = sectiontype_streamline(node&.attr("heading")&.downcase)
|
92
|
+
return nil if ret == "terms and definitions" &&
|
93
|
+
hdr != "terms and definitions" && node.level > 1
|
94
|
+
return nil if ret == "symbols and abbreviated terms" &&
|
95
|
+
hdr != "symbols and abbreviated terms" && node.level > 1
|
96
|
+
ret
|
87
97
|
end
|
88
98
|
|
89
|
-
def
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
99
|
+
def term_def_subclause_parse(attrs, xml, node)
|
100
|
+
case clausetype = sectiontype1(node)
|
101
|
+
when "terms defined in this recommendation"
|
102
|
+
term_def_parse(attrs.merge(type: "internal"), xml, node, false)
|
103
|
+
when "terms defined elsewhere"
|
104
|
+
term_def_parse(attrs.merge(type: "external"), xml, node, false)
|
105
|
+
else
|
106
|
+
super
|
97
107
|
end
|
98
|
-
[internal, external]
|
99
|
-
end
|
100
|
-
|
101
|
-
def term_defs_boilerplate(div, source, term, preface, isodoc)
|
102
|
-
internal, external = terms_extract(div)
|
103
|
-
internal&.next_element&.name == "term" and
|
104
|
-
internal.next = "<p>#{@internal_terms_boilerplate}</p>"
|
105
|
-
internal and internal&.next_element == nil and
|
106
|
-
internal.next = "<p>#{@no_terms_boilerplate}</p>"
|
107
|
-
external&.next_element&.name == "term" and
|
108
|
-
external.next = "<p>#{@external_terms_boilerplate}</p>"
|
109
|
-
external and external&.next_element == nil and
|
110
|
-
external.next = "<p>#{@no_terms_boilerplate}</p>"
|
111
|
-
!internal and !external and
|
112
|
-
%w(term terms).include? div&.next_element&.name and
|
113
|
-
div.next = "<p>#{@term_def_boilerplate}</p>"
|
114
|
-
end
|
115
|
-
|
116
|
-
def load_yaml(lang, script)
|
117
|
-
y = if @i18nyaml then YAML.load_file(@i18nyaml)
|
118
|
-
elsif lang == "en"
|
119
|
-
YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
|
120
|
-
else
|
121
|
-
YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
|
122
|
-
end
|
123
|
-
@symbols_boilerplate = y["symbols_boilerplate"] || ""
|
124
|
-
super.merge(y)
|
125
|
-
end
|
126
|
-
|
127
|
-
def i18n_init(lang, script)
|
128
|
-
super
|
129
108
|
end
|
130
109
|
|
131
110
|
def metadata_keywords(node, xml)
|
@@ -135,6 +114,17 @@ module Asciidoctor
|
|
135
114
|
end
|
136
115
|
end
|
137
116
|
|
117
|
+
def clause_parse(attrs, xml, node)
|
118
|
+
case clausetype = sectiontype1(node)
|
119
|
+
when "conventions" then attrs = attrs.merge(type: "conventions")
|
120
|
+
when "history"
|
121
|
+
attrs[:preface] and attrs = attrs.merge(type: "history")
|
122
|
+
when "source"
|
123
|
+
attrs[:preface] and attrs = attrs.merge(type: "source")
|
124
|
+
end
|
125
|
+
super
|
126
|
+
end
|
127
|
+
|
138
128
|
def html_extract_attributes(node)
|
139
129
|
super.merge(hierarchical_assets: node.attr("hierarchical-object-numbering"))
|
140
130
|
end
|
@@ -64,24 +64,8 @@ module Asciidoctor
|
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
|
-
def
|
68
|
-
|
69
|
-
c.role **{ type: "author" }
|
70
|
-
c.organization do |a|
|
71
|
-
a.name "International Telecommunication Union"
|
72
|
-
a.abbreviation "ITU"
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
def metadata_publisher(node, xml)
|
78
|
-
xml.contributor do |c|
|
79
|
-
c.role **{ type: "publisher" }
|
80
|
-
c.organization do |a|
|
81
|
-
a.name "International Telecommunication Union"
|
82
|
-
a.abbreviation "ITU"
|
83
|
-
end
|
84
|
-
end
|
67
|
+
def default_publisher
|
68
|
+
"International Telecommunication Union"
|
85
69
|
end
|
86
70
|
|
87
71
|
def metadata_committee(node, xml)
|
@@ -149,19 +133,6 @@ module Asciidoctor
|
|
149
133
|
xml.docnumber { |i| i << node.attr("docnumber") }
|
150
134
|
end
|
151
135
|
|
152
|
-
def metadata_copyright(node, xml)
|
153
|
-
from = node.attr("copyright-year") || Date.today.year
|
154
|
-
xml.copyright do |c|
|
155
|
-
c.from from
|
156
|
-
c.owner do |owner|
|
157
|
-
owner.organization do |o|
|
158
|
-
o.name "International Telecommunication Union"
|
159
|
-
o.abbreviation "ITU"
|
160
|
-
end
|
161
|
-
end
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
136
|
def metadata_series(node, xml)
|
166
137
|
node.attr("series") and
|
167
138
|
xml.series **{ type: "main" } do |s|
|
@@ -42,8 +42,11 @@
|
|
42
42
|
</define>
|
43
43
|
<define name="xref">
|
44
44
|
<element name="xref">
|
45
|
+
<!-- attribute target { xsd:IDREF }, -->
|
45
46
|
<attribute name="target">
|
46
|
-
<data type="
|
47
|
+
<data type="string">
|
48
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
49
|
+
</data>
|
47
50
|
</attribute>
|
48
51
|
<optional>
|
49
52
|
<attribute name="type">
|
@@ -578,6 +581,8 @@
|
|
578
581
|
<ref name="ol"/>
|
579
582
|
<ref name="dl"/>
|
580
583
|
<ref name="formula"/>
|
584
|
+
<ref name="quote"/>
|
585
|
+
<ref name="sourcecode"/>
|
581
586
|
</choice>
|
582
587
|
</oneOrMore>
|
583
588
|
</element>
|
@@ -661,6 +666,16 @@
|
|
661
666
|
</choice>
|
662
667
|
</attribute>
|
663
668
|
</optional>
|
669
|
+
<optional>
|
670
|
+
<attribute name="valign">
|
671
|
+
<choice>
|
672
|
+
<value>top</value>
|
673
|
+
<value>middle</value>
|
674
|
+
<value>bottom</value>
|
675
|
+
<value>baseline</value>
|
676
|
+
</choice>
|
677
|
+
</attribute>
|
678
|
+
</optional>
|
664
679
|
<choice>
|
665
680
|
<zeroOrMore>
|
666
681
|
<choice>
|
@@ -697,6 +712,16 @@
|
|
697
712
|
</choice>
|
698
713
|
</attribute>
|
699
714
|
</optional>
|
715
|
+
<optional>
|
716
|
+
<attribute name="valign">
|
717
|
+
<choice>
|
718
|
+
<value>top</value>
|
719
|
+
<value>middle</value>
|
720
|
+
<value>bottom</value>
|
721
|
+
<value>baseline</value>
|
722
|
+
</choice>
|
723
|
+
</attribute>
|
724
|
+
</optional>
|
700
725
|
<choice>
|
701
726
|
<zeroOrMore>
|
702
727
|
<choice>
|
@@ -922,6 +947,9 @@
|
|
922
947
|
<optional>
|
923
948
|
<attribute name="script"/>
|
924
949
|
</optional>
|
950
|
+
<optional>
|
951
|
+
<attribute name="type"/>
|
952
|
+
</optional>
|
925
953
|
<optional>
|
926
954
|
<attribute name="obligation">
|
927
955
|
<choice>
|
@@ -961,9 +989,6 @@
|
|
961
989
|
</define>
|
962
990
|
<define name="content-subsection">
|
963
991
|
<element name="clause">
|
964
|
-
<optional>
|
965
|
-
<attribute name="type"/>
|
966
|
-
</optional>
|
967
992
|
<ref name="Content-Section"/>
|
968
993
|
</element>
|
969
994
|
</define>
|
@@ -992,6 +1017,9 @@
|
|
992
1017
|
</choice>
|
993
1018
|
</attribute>
|
994
1019
|
</optional>
|
1020
|
+
<optional>
|
1021
|
+
<attribute name="type"/>
|
1022
|
+
</optional>
|
995
1023
|
<optional>
|
996
1024
|
<ref name="section-title"/>
|
997
1025
|
</optional>
|
@@ -1011,9 +1039,6 @@
|
|
1011
1039
|
</define>
|
1012
1040
|
<define name="clause">
|
1013
1041
|
<element name="clause">
|
1014
|
-
<optional>
|
1015
|
-
<attribute name="type"/>
|
1016
|
-
</optional>
|
1017
1042
|
<ref name="Clause-Section"/>
|
1018
1043
|
</element>
|
1019
1044
|
</define>
|
@@ -1042,18 +1067,24 @@
|
|
1042
1067
|
</choice>
|
1043
1068
|
</attribute>
|
1044
1069
|
</optional>
|
1070
|
+
<optional>
|
1071
|
+
<attribute name="type"/>
|
1072
|
+
</optional>
|
1045
1073
|
<optional>
|
1046
1074
|
<ref name="section-title"/>
|
1047
1075
|
</optional>
|
1048
1076
|
<group>
|
1049
|
-
<
|
1050
|
-
<
|
1051
|
-
<
|
1052
|
-
|
1053
|
-
|
1054
|
-
<
|
1055
|
-
|
1056
|
-
|
1077
|
+
<choice>
|
1078
|
+
<group>
|
1079
|
+
<zeroOrMore>
|
1080
|
+
<ref name="BasicBlock"/>
|
1081
|
+
</zeroOrMore>
|
1082
|
+
<zeroOrMore>
|
1083
|
+
<ref name="note"/>
|
1084
|
+
</zeroOrMore>
|
1085
|
+
</group>
|
1086
|
+
<ref name="amend"/>
|
1087
|
+
</choice>
|
1057
1088
|
<zeroOrMore>
|
1058
1089
|
<choice>
|
1059
1090
|
<ref name="clause-subsection"/>
|
@@ -1180,6 +1211,9 @@
|
|
1180
1211
|
<optional>
|
1181
1212
|
<attribute name="script"/>
|
1182
1213
|
</optional>
|
1214
|
+
<optional>
|
1215
|
+
<attribute name="type"/>
|
1216
|
+
</optional>
|
1183
1217
|
<optional>
|
1184
1218
|
<attribute name="obligation">
|
1185
1219
|
<choice>
|
@@ -1501,4 +1535,79 @@
|
|
1501
1535
|
<ref name="CitationType"/>
|
1502
1536
|
</element>
|
1503
1537
|
</define>
|
1538
|
+
<define name="amend">
|
1539
|
+
<element name="amend">
|
1540
|
+
<optional>
|
1541
|
+
<attribute name="id">
|
1542
|
+
<data type="ID"/>
|
1543
|
+
</attribute>
|
1544
|
+
</optional>
|
1545
|
+
<attribute name="change">
|
1546
|
+
<choice>
|
1547
|
+
<value>add</value>
|
1548
|
+
<value>modify</value>
|
1549
|
+
<value>delete</value>
|
1550
|
+
</choice>
|
1551
|
+
</attribute>
|
1552
|
+
<optional>
|
1553
|
+
<attribute name="path"/>
|
1554
|
+
</optional>
|
1555
|
+
<optional>
|
1556
|
+
<attribute name="path_end"/>
|
1557
|
+
</optional>
|
1558
|
+
<optional>
|
1559
|
+
<attribute name="title"/>
|
1560
|
+
</optional>
|
1561
|
+
<optional>
|
1562
|
+
<element name="location">
|
1563
|
+
<zeroOrMore>
|
1564
|
+
<ref name="locality"/>
|
1565
|
+
</zeroOrMore>
|
1566
|
+
</element>
|
1567
|
+
</optional>
|
1568
|
+
<zeroOrMore>
|
1569
|
+
<ref name="autonumber"/>
|
1570
|
+
</zeroOrMore>
|
1571
|
+
<optional>
|
1572
|
+
<element name="description">
|
1573
|
+
<zeroOrMore>
|
1574
|
+
<ref name="BasicBlock"/>
|
1575
|
+
</zeroOrMore>
|
1576
|
+
</element>
|
1577
|
+
</optional>
|
1578
|
+
<optional>
|
1579
|
+
<element name="newcontent">
|
1580
|
+
<zeroOrMore>
|
1581
|
+
<ref name="BasicBlock"/>
|
1582
|
+
</zeroOrMore>
|
1583
|
+
</element>
|
1584
|
+
</optional>
|
1585
|
+
<optional>
|
1586
|
+
<element name="description">
|
1587
|
+
<zeroOrMore>
|
1588
|
+
<ref name="BasicBlock"/>
|
1589
|
+
</zeroOrMore>
|
1590
|
+
</element>
|
1591
|
+
</optional>
|
1592
|
+
</element>
|
1593
|
+
</define>
|
1594
|
+
<define name="autonumber">
|
1595
|
+
<element name="autonumber">
|
1596
|
+
<attribute name="type">
|
1597
|
+
<choice>
|
1598
|
+
<value>requirement</value>
|
1599
|
+
<value>recommendation</value>
|
1600
|
+
<value>permission</value>
|
1601
|
+
<value>table</value>
|
1602
|
+
<value>figure</value>
|
1603
|
+
<value>admonition</value>
|
1604
|
+
<value>formula</value>
|
1605
|
+
<value>sourcecode</value>
|
1606
|
+
<value>example</value>
|
1607
|
+
<value>note</value>
|
1608
|
+
</choice>
|
1609
|
+
</attribute>
|
1610
|
+
<text/>
|
1611
|
+
</element>
|
1612
|
+
</define>
|
1504
1613
|
</grammar>
|