metanorma-nist 1.1.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.adoc +14 -0
  3. data/lib/asciidoctor/nist/basicdoc.rng +23 -0
  4. data/lib/asciidoctor/nist/boilerplate.rb +2 -2
  5. data/lib/asciidoctor/nist/cleanup.rb +34 -4
  6. data/lib/asciidoctor/nist/converter.rb +20 -6
  7. data/lib/asciidoctor/nist/front.rb +37 -46
  8. data/lib/asciidoctor/nist/front_id.rb +1 -1
  9. data/lib/asciidoctor/nist/isodoc.rng +137 -21
  10. data/lib/asciidoctor/nist/nist.rng +26 -1
  11. data/lib/asciidoctor/nist/validate.rb +16 -9
  12. data/lib/isodoc/nist/base_convert.rb +26 -75
  13. data/lib/isodoc/nist/html/nist.css +22 -10
  14. data/lib/isodoc/nist/html/nist.scss +24 -10
  15. data/lib/isodoc/nist/html/nist_cswp.css +21 -9
  16. data/lib/isodoc/nist/html/nist_cswp.scss +23 -9
  17. data/lib/isodoc/nist/html/wordstyle.css +83 -3
  18. data/lib/isodoc/nist/html/wordstyle.scss +74 -3
  19. data/lib/isodoc/nist/html/wordstyle_cswp.css +77 -2
  20. data/lib/isodoc/nist/html/wordstyle_cswp.scss +68 -2
  21. data/lib/isodoc/nist/html_convert.rb +3 -0
  22. data/lib/isodoc/nist/i18n-en.yaml +3 -0
  23. data/lib/isodoc/nist/i18n.rb +10 -0
  24. data/lib/isodoc/nist/init.rb +37 -0
  25. data/lib/isodoc/nist/metadata_id.rb +3 -1
  26. data/lib/isodoc/nist/nist.cswp.xsl +1954 -2232
  27. data/lib/isodoc/nist/nist.sp.xsl +2176 -2217
  28. data/lib/isodoc/nist/pdf_convert.rb +0 -1
  29. data/lib/isodoc/nist/presentation_xml_convert.rb +71 -1
  30. data/lib/isodoc/nist/refs.rb +2 -17
  31. data/lib/isodoc/nist/render.rb +2 -1
  32. data/lib/isodoc/nist/render_contributors.rb +1 -1
  33. data/lib/isodoc/nist/render_dates.rb +0 -25
  34. data/lib/isodoc/nist/section.rb +26 -13
  35. data/lib/isodoc/nist/word_convert.rb +47 -13
  36. data/lib/isodoc/nist/xref.rb +1 -24
  37. data/lib/metanorma/nist/version.rb +1 -1
  38. data/metanorma-nist.gemspec +2 -2
  39. metadata +8 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79b2cd1ac9a7ff463c23371e7bfa9e29ec244601341ed33e603f7e0354f4d9e6
4
- data.tar.gz: 5aca2aca01a5ff7066b71df1f73c1e3e2c83c3ee786170e7a50fa107f3e6a9f2
3
+ metadata.gz: 0fccac1954f210d0d2d8c3bc75a3061c258e6845506b8bac3459eedbf5d96081
4
+ data.tar.gz: 6e83a19e2381028a6542f3df7d18a44665c3139639125d64f9a08a796a8aee31
5
5
  SHA512:
6
- metadata.gz: d0dd3462d1f337597610e80f572727ce6a49097fa9501cbd1eaa47d3b22fc67d1cea85c7012d23b51dac3718e3f8caf28c25ac0a4bb2bef439cbb638555c46d1
7
- data.tar.gz: f8cdb2613aee57ba726feedd3b4c48dab082f1ab69363056dd3d80432db3a2398a95e96a378aeefd724914f975a80884d095c464e129828d7a9a10509f3432bb
6
+ metadata.gz: cd062e38d19de3e2b1661726c3817cddbc83f24bcd4778e407fff66b19d0e6201f430f243ac8b53e831ee8718b62eccb35807620cdfea45991266f312d544d62
7
+ data.tar.gz: 35e16075338432c4b5c33568a2f0e474b0a3f7a37f8b18105d4950608f69e90f26d75ab088ce5c0c5a38e40372e836409e41024dd8b37df1489ac0d4337e16c9
@@ -659,6 +659,20 @@ Errata tables must have a header row containing the headings _Date, Type, Change
659
659
  |===
660
660
  ----
661
661
 
662
+ === Lists
663
+
664
+ If an ordered list is intended to describe “steps” within a process, it should start with Arabic numbers and should be encoded with the class `steps`:
665
+
666
+ Encoding an ordered list as steps:
667
+
668
+ [source, asciidoctor]
669
+ ----
670
+ [class=steps]
671
+ . First Step
672
+ . Second Step
673
+ . Third Step
674
+ ----
675
+
662
676
  === Glosaries
663
677
 
664
678
  Glossaries are given as definition lists with role attribute `[.glossary]`:
@@ -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>
@@ -94,8 +94,8 @@ module Asciidoctor
94
94
 
95
95
  def boilerplate_isodoc(xmldoc)
96
96
  conv = super
97
- conv.labels = conv.labels.merge({nist_division: @nistdivision,
98
- nist_division_address: @nistdivisionaddress})
97
+ conv.i18n.set(:nist_division, @nistdivision)
98
+ conv.i18n.set(:nist_division_address, @nistdivisionaddress)
99
99
  conv
100
100
  end
101
101
 
@@ -3,9 +3,15 @@ module Asciidoctor
3
3
  class Converter < Standoc::Converter
4
4
  def cleanup(xmldoc)
5
5
  sourcecode_cleanup(xmldoc)
6
+ annex_rename(xmldoc)
6
7
  super
7
8
  end
8
9
 
10
+ def annex_rename(xmldoc)
11
+ return unless xmldoc.xpath("//references").size == 1
12
+ replace_title(xmldoc, "//annex[references]", @i18n&.normref, true)
13
+ end
14
+
9
15
  def sourcecode_cleanup(xmldoc)
10
16
  xmldoc.xpath("//sourcecode").each do |x|
11
17
  x.traverse do |n|
@@ -37,7 +43,7 @@ module Asciidoctor
37
43
  move_execsummary_into_preface(x, preface)
38
44
  end
39
45
 
40
- def move_clauses_into_preface1(x, preface)
46
+ def move_clauses_into_preface1(x, preface)
41
47
  x.xpath("//clause[@preface]").each do |c|
42
48
  c.delete("preface")
43
49
  title = c&.at("./title")&.text.downcase
@@ -45,9 +51,9 @@ module Asciidoctor
45
51
  c.name = "executivesummary" if title == "executive summary"
46
52
  preface.add_child c.remove
47
53
  end
48
- end
54
+ end
49
55
 
50
- def move_execsummary_into_preface(x, preface)
56
+ def move_execsummary_into_preface(x, preface)
51
57
  x.xpath("//clause[@executivesummary]").each do |c|
52
58
  c.delete("executivesummary")
53
59
  title = c&.at("./title")&.text.downcase
@@ -150,7 +156,7 @@ module Asciidoctor
150
156
  elsif metaid = bib&.at("./docidentifier[@type = 'NIST']")&.text
151
157
  key = metaid.sub(/-(\d+)/) {|m| sprintf "-%09d", ($1.to_i) }
152
158
  elsif metaid = bib&.at("./docidentifier[not(@type = 'DOI' or "\
153
- "@type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN')]")&.text
159
+ "@type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN')]")&.text
154
160
  key = metaid.sub(/-(\d+)/) {|m| sprintf "-%09d", ($1.to_i) }
155
161
  else # no usable docid
156
162
  key = "000000000" + bib["id"]
@@ -171,6 +177,30 @@ module Asciidoctor
171
177
  end
172
178
  acc
173
179
  end
180
+
181
+ def section_names_refs_cleanup(x)
182
+ replace_title(x, "//bibliography//references[@normative = 'true']",
183
+ @i18n&.normref, true)
184
+ replace_title(x, "//bibliography//references[@normative = 'false']",
185
+ @i18n&.bibliography, true)
186
+ end
187
+
188
+ def section_names_terms_cleanup(x)
189
+ replace_title(x, "//definitions[@type = 'symbols']", @i18n&.symbols)
190
+ replace_title(x, "//definitions[@type = 'abbreviated_terms']", @i18n&.abbrev)
191
+ replace_title(x, "//definitions[not(@type)]", @i18n&.symbolsabbrev)
192
+ replace_title(x, "//sections//terms#{SYMnoABBR} | //sections//clause[.//terms]#{SYMnoABBR}",
193
+ @i18n&.termsdefsymbols, true)
194
+ replace_title(x, "//sections//terms#{ABBRnoSYM} | //sections//clause[.//terms]#{ABBRnoSYM}",
195
+ @i18n&.termsdefabbrev, true)
196
+ replace_title(x, "//sections//terms#{SYMABBR} | //sections//clause[.//terms]#{SYMABBR}",
197
+ @i18n&.termsdefsymbolsabbrev, true)
198
+ replace_title(x, "//sections//terms#{NO_SYMABBR} | //sections//clause[.//terms]#{NO_SYMABBR}",
199
+ @i18n&.termsdefsymbolsabbrev, true)
200
+ replace_title(
201
+ x, "//sections//terms[not(.//definitions)] | //sections//clause[.//terms][not(.//definitions)]",
202
+ @i18n&.termsdef, true)
203
+ end
174
204
  end
175
205
  end
176
206
  end
@@ -61,6 +61,15 @@ module Asciidoctor
61
61
  super
62
62
  end
63
63
 
64
+ def olist(node)
65
+ id = Asciidoctor::Standoc::Utils::anchor_or_uuid(node)
66
+ noko do |xml|
67
+ xml.ol **attr_code(id: id, class: node.attr("class")) do |xml_ol|
68
+ node.items.each { |item| li(xml_ol, item) }
69
+ end
70
+ end.join("\n")
71
+ end
72
+
64
73
  def glossary(node)
65
74
  noko do |xml|
66
75
  xml.dl **{id: Asciidoctor::Standoc::Utils::anchor_or_uuid(node),
@@ -79,8 +88,8 @@ module Asciidoctor
79
88
  end
80
89
 
81
90
  def doctype(node)
82
- d = node.attr("doctype")
83
- d = "standard" if d == "article" # article is Asciidoctor default
91
+ d = super || "standard"
92
+ d = "standard" if d == "article" # article is Asciidoctor default
84
93
  d
85
94
  end
86
95
 
@@ -100,9 +109,12 @@ module Asciidoctor
100
109
  def outputs(node, ret)
101
110
  File.open(@filename + ".xml", "w:UTF-8") { |f| f.write(ret) }
102
111
  presentation_xml_converter(node).convert(@filename + ".xml")
103
- html_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.html")
104
- doc_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.doc")
105
- pdf_converter(node)&.convert(@filename + ".presentation.xml", nil, false, "#{@filename}.pdf")
112
+ html_converter(node).convert(@filename + ".presentation.xml",
113
+ nil, false, "#{@filename}.html")
114
+ doc_converter(node).convert(@filename + ".presentation.xml",
115
+ nil, false, "#{@filename}.doc")
116
+ pdf_converter(node)&.convert(@filename + ".presentation.xml",
117
+ nil, false, "#{@filename}.pdf")
106
118
  end
107
119
 
108
120
  def clause_parse(attrs, xml, node)
@@ -137,6 +149,8 @@ module Asciidoctor
137
149
  case ret
138
150
  when "glossary", "terminology"
139
151
  "terms and definitions"
152
+ when "introduction"
153
+ "donotrecognise_introduction"
140
154
  else
141
155
  super
142
156
  end
@@ -159,7 +173,7 @@ module Asciidoctor
159
173
  def bibliography_annex_parse(attrs, xml, node)
160
174
  attrs1 = attrs.merge(id: "_" + UUIDTools::UUID.random_create)
161
175
  xml.annex **attr_code(attrs1) do |xml_section|
162
- xml_section.title { |t| t << "Bibliography" }
176
+ xml_section.title { |t| t << node.title }
163
177
  @biblio = true
164
178
  xml.references **attr_code(attrs.merge(normative: true)) do |r|
165
179
  r << node.content
@@ -5,14 +5,7 @@ require_relative "./front_id.rb"
5
5
 
6
6
  module Asciidoctor
7
7
  module NIST
8
- # A {Converter} implementation that generates RSD output, and a document
9
- # schema encapsulation of the document for validation
10
-
11
8
  class Converter < Standoc::Converter
12
- def doctype(node)
13
- node.attr("doctype") || "sp-800"
14
- end
15
-
16
9
  def datetypes
17
10
  super + %w(abandoned superseded)
18
11
  end
@@ -27,31 +20,35 @@ module Asciidoctor
27
20
  end
28
21
  end
29
22
 
23
+ def asciidoc_sub(text)
24
+ Asciidoctor::Standoc::Utils::asciidoc_sub(text)
25
+ end
26
+
30
27
  def title_subtitle(node, t, at)
31
28
  return unless node.attr("title-sub")
32
29
  t.title(**attr_code(at.merge(type: "subtitle"))) do |t1|
33
- t1 << Asciidoctor::Standoc::Utils::asciidoc_sub(node.attr("title-sub"))
30
+ t1 << asciidoc_sub(node.attr("title-sub"))
34
31
  end
35
32
  node.attr("title-sub-short") and
36
33
  t.title(**attr_code(at.merge(type: "short-subtitle"))) do |t1|
37
- t1 << Asciidoctor::Standoc::Utils::asciidoc_sub(node.attr("title-sub-short"))
34
+ t1 << asciidoc_sub(node.attr("title-sub-short"))
38
35
  end
39
36
  end
40
37
 
41
38
  def title_document_class(node, t, at)
42
39
  return unless node.attr("title-document-class")
43
40
  t.title(**attr_code(at.merge(type: "document-class"))) do |t1|
44
- t1 << Asciidoctor::Standoc::Utils::asciidoc_sub(node.attr("title-document-class"))
41
+ t1 << asciidoc_sub(node.attr("title-document-class"))
45
42
  end
46
43
  end
47
44
 
48
45
  def title_main(node, t, at)
49
46
  t.title(**attr_code(at.merge(type: "main"))) do |t1|
50
- t1 << (Asciidoctor::Standoc::Utils::asciidoc_sub(node.attr("title-main")) || node.title)
47
+ t1 << (asciidoc_sub(node.attr("title-main")) || node.title)
51
48
  end
52
49
  node.attr("title-main-short") and
53
50
  t.title(**attr_code(at.merge(type: "short-title"))) do |t1|
54
- t1 << Asciidoctor::Standoc::Utils::asciidoc_sub(node.attr("title-main-short"))
51
+ t1 << asciidoc_sub(node.attr("title-main-short"))
55
52
  end
56
53
  end
57
54
 
@@ -68,12 +65,21 @@ module Asciidoctor
68
65
  personal_author(node, xml)
69
66
  end
70
67
 
68
+ def default_publisher
69
+ "National Institute of Standards and Technology"
70
+ end
71
+
71
72
  def metadata_publisher(node, xml)
72
- xml.contributor do |c|
73
- c.role **{ type: "publisher" }
74
- c.organization do |a|
75
- a.name "NIST"
76
- d = node.attr("nist-division") and a.subdivision d
73
+ publishers = node.attr("publisher") || default_publisher
74
+ csv_split(publishers)&.each do |p|
75
+ xml.contributor do |c|
76
+ c.role **{ type: "publisher" }
77
+ c.organization do |a|
78
+ a.name p
79
+ if p == default_publisher
80
+ d = node.attr("nist-division") and a.subdivision d
81
+ end
82
+ end
77
83
  end
78
84
  end
79
85
  end
@@ -86,9 +92,10 @@ module Asciidoctor
86
92
  node.attr("technical-committee") and
87
93
  a.committee(node.attr("technical-committee"))
88
94
  node.attr("subcommittee") and
89
- a.subcommittee(node.attr("subcommittee"),
90
- **attr_code(type: node.attr("subcommittee-type"),
91
- number: node.attr("subcommittee-number")))
95
+ a.subcommittee(
96
+ node.attr("subcommittee"),
97
+ **attr_code(type: node.attr("subcommittee-type"),
98
+ number: node.attr("subcommittee-number")))
92
99
  (node.attr("workgroup") || node.attr("workinggroup")) and
93
100
  a.workgroup(node.attr("workgroup") || node.attr("workinggroup"),
94
101
  **attr_code(type: node.attr("workgroup-type"),
@@ -105,19 +112,6 @@ module Asciidoctor
105
112
  end
106
113
  end
107
114
 
108
- def metadata_copyright(node, xml)
109
- from = node.attr("copyright-year") || node.attr("copyrightyear") ||
110
- Date.today.year
111
- xml.copyright do |c|
112
- c.from from
113
- c.owner do |owner|
114
- owner.organization do |o|
115
- o.name "NIST"
116
- end
117
- end
118
- end
119
- end
120
-
121
115
  def metadata_source(node, xml)
122
116
  super
123
117
  node.attr("doc-email") && xml.uri(node.attr("doc-email"), type: "email")
@@ -149,14 +143,13 @@ module Asciidoctor
149
143
  end
150
144
 
151
145
  def relaton_relation_descriptions
152
- super.merge({
153
- "supersedes" => "obsoletes",
154
- "superseded-by" => "obsoleted-by",
155
- })
146
+ super.merge({ "supersedes" => "obsoletes",
147
+ "superseded-by" => "obsoleted-by", })
156
148
  end
157
149
 
158
150
  def metadata_getrelation(node, xml, type, desc = nil)
159
- if type == "obsoleted-by" and desc.nil? and node.attr("superseding-status")
151
+ if type == "obsoleted-by" and desc.nil? and
152
+ node.attr("superseding-status")
160
153
  metadata_superseding_doc(node, xml)
161
154
  end
162
155
  super
@@ -166,10 +159,8 @@ module Asciidoctor
166
159
  xml.relation **{ type: "obsoletedBy" } do |r|
167
160
  r.bibitem **{ type: "standard" } do |b|
168
161
  metadata_superseding_titles(b, node)
169
- doi = node.attr("superseding-doi") and
170
- b.uri doi, **{ type: "doi" }
171
- url = node.attr("superseding-url") and
172
- b.uri url, **{ type: "uri" }
162
+ doi = node.attr("superseding-doi") and b.uri doi, **{ type: "doi" }
163
+ url = node.attr("superseding-url") and b.uri url, **{ type: "uri" }
173
164
  metadata_superseding_ids(b, xml)
174
165
  metadata_superseding_authors(b, node)
175
166
  metadata_superseding_dates(b, node)
@@ -205,19 +196,19 @@ module Asciidoctor
205
196
  def metadata_superseding_titles(b, node)
206
197
  if node.attr("superseding-title")
207
198
  b.title **{ type: "main" } do |t|
208
- t << Asciidoctor::Standoc::Utils::asciidoc_sub(node.attr("superseding-title"))
199
+ t << asciidoc_sub(node.attr("superseding-title"))
209
200
  end
210
201
  node.attr("superseding-subtitle") and
211
202
  b.title **{ type: "subtitle" } do |t|
212
- t << Asciidoctor::Standoc::Utils::asciidoc_sub(node.attr("superseding-subtitle"))
203
+ t << asciidoc_sub(node.attr("superseding-subtitle"))
213
204
  end
214
205
  else
215
206
  b.title **{ type: "main" } do |t|
216
- t << (Asciidoctor::Standoc::Utils::asciidoc_sub(node.attr("title-main")) || node.title)
207
+ t << (asciidoc_sub(node.attr("title-main")) || node.title)
217
208
  end
218
209
  node.attr("title-sub") and
219
210
  b.title **{ type: "subtitle" } do |t|
220
- t << Asciidoctor::Standoc::Utils::asciidoc_sub(node.attr("title-sub"))
211
+ t << asciidoc_sub(node.attr("title-sub"))
221
212
  end
222
213
  end
223
214
  end
@@ -64,7 +64,7 @@ module Asciidoctor
64
64
  end
65
65
 
66
66
  def status_abbr(stage, iter)
67
- IsoDoc::NIST::Metadata.new(nil, nil, {}).status_abbr(stage, iter)
67
+ IsoDoc::NIST::Metadata.new(nil, nil, @i18n).status_abbr(stage, iter)
68
68
  end
69
69
 
70
70
  def add_id_parts(args, long)
@@ -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>