metanorma-itu 1.1.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7125f1d6d17254c0460f7398d24a43683b2099bc07f0cd7c483ce2725ab847b
4
- data.tar.gz: bb3b19af63382c527698bdb6402cc314f6e0fd0dfd3e90e6fae6d64d6afe5918
3
+ metadata.gz: 5ba47f749671a89645723abe98c885b11763bc82af7f2ae51dd61bf258c6c020
4
+ data.tar.gz: d7d9ca77cb3378430bb1c9d93c3027609c2f4154e4387178f394536f505742f0
5
5
  SHA512:
6
- metadata.gz: 8637b27bbb50cc729c8be856154330a9cd6ba7fdd60dcc3eb5f3605609fd62384e266e92370178fc603585330522e38fdde42fed426eeab9c5237f2072945c5b
7
- data.tar.gz: 8ae3568058d7a603c2f875eaaea6f507874249b4ed6bfafca084a220a416cf8186f0c48f6f12fe23b4545f3eddd7055fc7e5385892c250f21c5f38e114f2eea9
6
+ metadata.gz: 1587f02fd05eade3ee88febabfb053f0a295e982bf1285b067d99d81eba1a34c593ee4971ad6e3c909424193a8852ba0f4061ecf4c5c5622416289006f7d1a53
7
+ data.tar.gz: 85573c130621858588e1f0910a10d99ff874c930acf191b793abaea98c63d17492de7ab95bc402f2dab2ff22844e0763d7d3f69f568e19d173109fde53a71ae2
@@ -402,6 +402,16 @@
402
402
  </choice>
403
403
  </attribute>
404
404
  </optional>
405
+ <optional>
406
+ <attribute name="valign">
407
+ <choice>
408
+ <value>top</value>
409
+ <value>middle</value>
410
+ <value>bottom</value>
411
+ <value>baseline</value>
412
+ </choice>
413
+ </attribute>
414
+ </optional>
405
415
  <choice>
406
416
  <zeroOrMore>
407
417
  <ref name="TextElement"/>
@@ -429,6 +439,16 @@
429
439
  </choice>
430
440
  </attribute>
431
441
  </optional>
442
+ <optional>
443
+ <attribute name="valign">
444
+ <choice>
445
+ <value>top</value>
446
+ <value>middle</value>
447
+ <value>bottom</value>
448
+ <value>baseline</value>
449
+ </choice>
450
+ </attribute>
451
+ </optional>
432
452
  <choice>
433
453
  <zeroOrMore>
434
454
  <ref name="TextElement"/>
@@ -998,6 +1018,9 @@
998
1018
  <value>alphabet_upper</value>
999
1019
  </choice>
1000
1020
  </attribute>
1021
+ <optional>
1022
+ <attribute name="start"/>
1023
+ </optional>
1001
1024
  <oneOrMore>
1002
1025
  <ref name="li"/>
1003
1026
  </oneOrMore>
@@ -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.titlecase)
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
- unless x.at("//sections/clause/title[text() = 'Scope']")
32
- ins.previous = "<clause><title>Scope</title><p>"\
33
- "#{@labels['clause_empty']}</p></clause>"
34
- end
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
- unless x.at("//bibliography/references[@normative = 'true']")
44
- #ins.previous = "<references normative='true'><title>References</title><p>"\
45
- # "#{@labels['clause_empty']}</p></references>"
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/title[text() = 'Scope']/..")
54
- unless x.at("//sections//terms")
55
- ins.next = "<terms><title>Definitions</title><p>"\
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><title>Abbreviations and acronyms</title><p>"\
65
- "#{@labels['clause_empty']}</p></definitions>"
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/title[text() = 'Conventions']")
73
- ins.next = "<clause id='_#{UUIDTools::UUID.random_create}'>"\
74
- "<title>Conventions</title><p>"\
75
- "#{@labels['clause_empty']}</p></clause>"
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 termdef_cleanup(xmldoc)
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 termdef_boilerplate_cleanup(xmldoc)
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 = node.attr("doctype") || "recommendation"
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", nil, false, "#{@filename}.html")
60
- doc_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.doc")
61
- pdf_converter(node)&.convert(@filename + ".presentation.xml", nil, false, "#{@filename}.pdf")
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 term_def_title(toplevel, node)
85
- return node.title unless toplevel
86
- "Definitions"
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 terms_extract(div)
90
- internal = nil
91
- external = nil
92
- div.parent.xpath("./terms/title").each do |t|
93
- case t&.text&.downcase
94
- when "terms defined elsewhere" then external = t
95
- when "terms defined in this recommendation" then internal = t
96
- end
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 metadata_author(node, xml)
68
- xml.contributor do |c|
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="IDREF"/>
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">
@@ -61,6 +64,11 @@
61
64
  </choice>
62
65
  </attribute>
63
66
  </optional>
67
+ <optional>
68
+ <attribute name="droploc">
69
+ <data type="boolean"/>
70
+ </attribute>
71
+ </optional>
64
72
  <text/>
65
73
  </element>
66
74
  </define>
@@ -578,6 +586,8 @@
578
586
  <ref name="ol"/>
579
587
  <ref name="dl"/>
580
588
  <ref name="formula"/>
589
+ <ref name="quote"/>
590
+ <ref name="sourcecode"/>
581
591
  </choice>
582
592
  </oneOrMore>
583
593
  </element>
@@ -661,6 +671,16 @@
661
671
  </choice>
662
672
  </attribute>
663
673
  </optional>
674
+ <optional>
675
+ <attribute name="valign">
676
+ <choice>
677
+ <value>top</value>
678
+ <value>middle</value>
679
+ <value>bottom</value>
680
+ <value>baseline</value>
681
+ </choice>
682
+ </attribute>
683
+ </optional>
664
684
  <choice>
665
685
  <zeroOrMore>
666
686
  <choice>
@@ -697,6 +717,16 @@
697
717
  </choice>
698
718
  </attribute>
699
719
  </optional>
720
+ <optional>
721
+ <attribute name="valign">
722
+ <choice>
723
+ <value>top</value>
724
+ <value>middle</value>
725
+ <value>bottom</value>
726
+ <value>baseline</value>
727
+ </choice>
728
+ </attribute>
729
+ </optional>
700
730
  <choice>
701
731
  <zeroOrMore>
702
732
  <choice>
@@ -834,6 +864,13 @@
834
864
  </define>
835
865
  <define name="standard-document">
836
866
  <element name="standard-document">
867
+ <attribute name="version"/>
868
+ <attribute name="type">
869
+ <choice>
870
+ <value>semantic</value>
871
+ <value>presentation</value>
872
+ </choice>
873
+ </attribute>
837
874
  <ref name="bibdata"/>
838
875
  <optional>
839
876
  <ref name="boilerplate"/>
@@ -855,7 +892,7 @@
855
892
  <oneOrMore>
856
893
  <choice>
857
894
  <ref name="content"/>
858
- <ref name="preface_abstract"/>
895
+ <ref name="abstract"/>
859
896
  <ref name="foreword"/>
860
897
  <ref name="introduction"/>
861
898
  <ref name="acknowledgements"/>
@@ -922,6 +959,9 @@
922
959
  <optional>
923
960
  <attribute name="script"/>
924
961
  </optional>
962
+ <optional>
963
+ <attribute name="type"/>
964
+ </optional>
925
965
  <optional>
926
966
  <attribute name="obligation">
927
967
  <choice>
@@ -961,9 +1001,6 @@
961
1001
  </define>
962
1002
  <define name="content-subsection">
963
1003
  <element name="clause">
964
- <optional>
965
- <attribute name="type"/>
966
- </optional>
967
1004
  <ref name="Content-Section"/>
968
1005
  </element>
969
1006
  </define>
@@ -992,6 +1029,9 @@
992
1029
  </choice>
993
1030
  </attribute>
994
1031
  </optional>
1032
+ <optional>
1033
+ <attribute name="type"/>
1034
+ </optional>
995
1035
  <optional>
996
1036
  <ref name="section-title"/>
997
1037
  </optional>
@@ -1011,9 +1051,6 @@
1011
1051
  </define>
1012
1052
  <define name="clause">
1013
1053
  <element name="clause">
1014
- <optional>
1015
- <attribute name="type"/>
1016
- </optional>
1017
1054
  <ref name="Clause-Section"/>
1018
1055
  </element>
1019
1056
  </define>
@@ -1042,18 +1079,24 @@
1042
1079
  </choice>
1043
1080
  </attribute>
1044
1081
  </optional>
1082
+ <optional>
1083
+ <attribute name="type"/>
1084
+ </optional>
1045
1085
  <optional>
1046
1086
  <ref name="section-title"/>
1047
1087
  </optional>
1048
1088
  <group>
1049
- <group>
1050
- <zeroOrMore>
1051
- <ref name="BasicBlock"/>
1052
- </zeroOrMore>
1053
- <zeroOrMore>
1054
- <ref name="note"/>
1055
- </zeroOrMore>
1056
- </group>
1089
+ <choice>
1090
+ <group>
1091
+ <zeroOrMore>
1092
+ <ref name="BasicBlock"/>
1093
+ </zeroOrMore>
1094
+ <zeroOrMore>
1095
+ <ref name="note"/>
1096
+ </zeroOrMore>
1097
+ </group>
1098
+ <ref name="amend"/>
1099
+ </choice>
1057
1100
  <zeroOrMore>
1058
1101
  <choice>
1059
1102
  <ref name="clause-subsection"/>
@@ -1180,6 +1223,9 @@
1180
1223
  <optional>
1181
1224
  <attribute name="script"/>
1182
1225
  </optional>
1226
+ <optional>
1227
+ <attribute name="type"/>
1228
+ </optional>
1183
1229
  <optional>
1184
1230
  <attribute name="obligation">
1185
1231
  <choice>
@@ -1447,11 +1493,6 @@
1447
1493
  </optional>
1448
1494
  </element>
1449
1495
  </define>
1450
- <define name="preface_abstract">
1451
- <element name="abstract">
1452
- <ref name="Basic-Section"/>
1453
- </element>
1454
- </define>
1455
1496
  <define name="term-clause">
1456
1497
  <element name="clause">
1457
1498
  <optional>
@@ -1501,4 +1542,79 @@
1501
1542
  <ref name="CitationType"/>
1502
1543
  </element>
1503
1544
  </define>
1545
+ <define name="amend">
1546
+ <element name="amend">
1547
+ <optional>
1548
+ <attribute name="id">
1549
+ <data type="ID"/>
1550
+ </attribute>
1551
+ </optional>
1552
+ <attribute name="change">
1553
+ <choice>
1554
+ <value>add</value>
1555
+ <value>modify</value>
1556
+ <value>delete</value>
1557
+ </choice>
1558
+ </attribute>
1559
+ <optional>
1560
+ <attribute name="path"/>
1561
+ </optional>
1562
+ <optional>
1563
+ <attribute name="path_end"/>
1564
+ </optional>
1565
+ <optional>
1566
+ <attribute name="title"/>
1567
+ </optional>
1568
+ <optional>
1569
+ <element name="location">
1570
+ <zeroOrMore>
1571
+ <ref name="locality"/>
1572
+ </zeroOrMore>
1573
+ </element>
1574
+ </optional>
1575
+ <zeroOrMore>
1576
+ <ref name="autonumber"/>
1577
+ </zeroOrMore>
1578
+ <optional>
1579
+ <element name="description">
1580
+ <zeroOrMore>
1581
+ <ref name="BasicBlock"/>
1582
+ </zeroOrMore>
1583
+ </element>
1584
+ </optional>
1585
+ <optional>
1586
+ <element name="newcontent">
1587
+ <zeroOrMore>
1588
+ <ref name="BasicBlock"/>
1589
+ </zeroOrMore>
1590
+ </element>
1591
+ </optional>
1592
+ <optional>
1593
+ <element name="description">
1594
+ <zeroOrMore>
1595
+ <ref name="BasicBlock"/>
1596
+ </zeroOrMore>
1597
+ </element>
1598
+ </optional>
1599
+ </element>
1600
+ </define>
1601
+ <define name="autonumber">
1602
+ <element name="autonumber">
1603
+ <attribute name="type">
1604
+ <choice>
1605
+ <value>requirement</value>
1606
+ <value>recommendation</value>
1607
+ <value>permission</value>
1608
+ <value>table</value>
1609
+ <value>figure</value>
1610
+ <value>admonition</value>
1611
+ <value>formula</value>
1612
+ <value>sourcecode</value>
1613
+ <value>example</value>
1614
+ <value>note</value>
1615
+ </choice>
1616
+ </attribute>
1617
+ <text/>
1618
+ </element>
1619
+ </define>
1504
1620
  </grammar>