metanorma-bipm 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/macos.yml +38 -0
  3. data/.github/workflows/ubuntu.yml +56 -0
  4. data/.github/workflows/windows.yml +40 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +11 -0
  7. data/LICENSE +25 -0
  8. data/README.adoc +154 -0
  9. data/Rakefile +8 -0
  10. data/bin/console +14 -0
  11. data/bin/rspec +18 -0
  12. data/bin/setup +8 -0
  13. data/lib/asciidoctor/bipm.rb +8 -0
  14. data/lib/asciidoctor/bipm/basicdoc.rng +1082 -0
  15. data/lib/asciidoctor/bipm/biblio.rng +1237 -0
  16. data/lib/asciidoctor/bipm/bipm.rng +152 -0
  17. data/lib/asciidoctor/bipm/boilerplate-en.xml +21 -0
  18. data/lib/asciidoctor/bipm/boilerplate-fr.xml +21 -0
  19. data/lib/asciidoctor/bipm/converter.rb +85 -0
  20. data/lib/asciidoctor/bipm/isodoc.rng +1620 -0
  21. data/lib/asciidoctor/bipm/reqt.rng +194 -0
  22. data/lib/isodoc/bipm.rb +9 -0
  23. data/lib/isodoc/bipm/base_convert.rb +11 -0
  24. data/lib/isodoc/bipm/bipm.brochure.xsl +5447 -0
  25. data/lib/isodoc/bipm/html/html_bipm_intro.html +8 -0
  26. data/lib/isodoc/bipm/html/html_bipm_titlepage.html +71 -0
  27. data/lib/isodoc/bipm/html/htmlstyle.css +986 -0
  28. data/lib/isodoc/bipm/html/htmlstyle.scss +743 -0
  29. data/lib/isodoc/bipm/html/logo.png +0 -0
  30. data/lib/isodoc/bipm/html/scripts.html +71 -0
  31. data/lib/isodoc/bipm/html_convert.rb +15 -0
  32. data/lib/isodoc/bipm/i18n-en.yaml +1 -0
  33. data/lib/isodoc/bipm/i18n-fr.yaml +18 -0
  34. data/lib/isodoc/bipm/i18n.rb +9 -0
  35. data/lib/isodoc/bipm/init.rb +24 -0
  36. data/lib/isodoc/bipm/metadata.rb +41 -0
  37. data/lib/isodoc/bipm/pdf_convert.rb +19 -0
  38. data/lib/isodoc/bipm/presentation_xml_convert.rb +27 -0
  39. data/lib/isodoc/bipm/xref.rb +16 -0
  40. data/lib/metanorma-bipm.rb +11 -0
  41. data/lib/metanorma/bipm.rb +32 -0
  42. data/lib/metanorma/bipm/processor.rb +35 -0
  43. data/lib/metanorma/bipm/version.rb +5 -0
  44. data/metanorma-bipm.gemspec +42 -0
  45. data/metanorma.yml +74 -0
  46. metadata +258 -0
@@ -0,0 +1,152 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar ns="https://www.metanorma.org/ns/bipm" xmlns="http://relaxng.org/ns/structure/1.0">
3
+ <!--
4
+ Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
5
+ we cannot have a new default namespace: we will end up with a grammar with two different
6
+ namespaces, one for isostandard and one for csand additions. And we do not want that.
7
+ -->
8
+ <include href="isodoc.rng">
9
+ <start>
10
+ <ref name="bipm-standard"/>
11
+ </start>
12
+ <define name="DocumentType">
13
+ <choice>
14
+ <value>brochure</value>
15
+ <value>mise-en-pratique</value>
16
+ <value>rapport</value>
17
+ <value>monographie</value>
18
+ <value>guide</value>
19
+ <value>meeting-report</value>
20
+ <value>technical-report</value>
21
+ <value>working-party-note</value>
22
+ <value>strategy</value>
23
+ <value>cipm-mra</value>
24
+ <value>resolution</value>
25
+ </choice>
26
+ </define>
27
+ <define name="editorialgroup">
28
+ <element name="editorialgroup">
29
+ <oneOrMore>
30
+ <ref name="committee"/>
31
+ </oneOrMore>
32
+ <oneOrMore>
33
+ <ref name="workgroup"/>
34
+ </oneOrMore>
35
+ </element>
36
+ </define>
37
+ <define name="structuredidentifier">
38
+ <element name="structuredidentifier">
39
+ <element name="docnumber">
40
+ <text/>
41
+ </element>
42
+ <optional>
43
+ <element name="part">
44
+ <text/>
45
+ </element>
46
+ </optional>
47
+ <optional>
48
+ <element name="appendix">
49
+ <text/>
50
+ </element>
51
+ </optional>
52
+ </element>
53
+ </define>
54
+ <define name="BibDataExtensionType">
55
+ <optional>
56
+ <ref name="doctype"/>
57
+ </optional>
58
+ <ref name="editorialgroup"/>
59
+ <optional>
60
+ <ref name="comment-period"/>
61
+ </optional>
62
+ <optional>
63
+ <ref name="si-aspect"/>
64
+ </optional>
65
+ <ref name="structuredidentifier"/>
66
+ </define>
67
+ </include>
68
+ <define name="comment-period">
69
+ <element name="comment-period">
70
+ <element name="from">
71
+ <ref name="ISO8601Date"/>
72
+ </element>
73
+ <element name="to">
74
+ <ref name="ISO8601Date"/>
75
+ </element>
76
+ </element>
77
+ </define>
78
+ <define name="si-aspect">
79
+ <element name="si-aspect">
80
+ <choice>
81
+ <value>A_e_deltanu</value>
82
+ <value>A_e</value>
83
+ <value>cd_Kcd_h_deltanu</value>
84
+ <value>cd_Kcd</value>
85
+ <value>full</value>
86
+ <value>K_k_deltanu</value>
87
+ <value>K_k</value>
88
+ <value>kg_h_c_deltanu</value>
89
+ <value>kg_h</value>
90
+ <value>m_c_deltanu</value>
91
+ <value>m_c</value>
92
+ <value>mol_NA</value>
93
+ <value>s_deltanu</value>
94
+ </choice>
95
+ </element>
96
+ </define>
97
+ <define name="committee">
98
+ <element name="committee">
99
+ <choice>
100
+ <value>CGPM</value>
101
+ <value>CIPM</value>
102
+ <value>BIPM</value>
103
+ <value>CCAUV</value>
104
+ <value>CCEM</value>
105
+ <value>CCL</value>
106
+ <value>CCM</value>
107
+ <value>CCPR</value>
108
+ <value>CCQM</value>
109
+ <value>CCRI</value>
110
+ <value>CCT</value>
111
+ <value>CCTF</value>
112
+ <value>CCU</value>
113
+ <value>CCL-CCTF</value>
114
+ <value>JCGM</value>
115
+ <value>JCRB</value>
116
+ <value>JCTLM</value>
117
+ <value>INetQI</value>
118
+ </choice>
119
+ </element>
120
+ </define>
121
+ <define name="workgroup">
122
+ <element name="workgroup">
123
+ <text/>
124
+ </element>
125
+ </define>
126
+ <define name="bipm-standard">
127
+ <element name="bipm-standard">
128
+ <attribute name="version"/>
129
+ <attribute name="type">
130
+ <choice>
131
+ <value>semantic</value>
132
+ <value>presentation</value>
133
+ </choice>
134
+ </attribute>
135
+ <ref name="bibdata"/>
136
+ <zeroOrMore>
137
+ <ref name="termdocsource"/>
138
+ </zeroOrMore>
139
+ <optional>
140
+ <ref name="boilerplate"/>
141
+ </optional>
142
+ <ref name="preface"/>
143
+ <oneOrMore>
144
+ <ref name="sections"/>
145
+ </oneOrMore>
146
+ <zeroOrMore>
147
+ <ref name="annex"/>
148
+ </zeroOrMore>
149
+ <ref name="bibliography"/>
150
+ </element>
151
+ </define>
152
+ </grammar>
@@ -0,0 +1,21 @@
1
+ <boilerplate>
2
+ <copyright-statement>
3
+ <clause>
4
+ <p align="center"> © Bureau International des poids et mesures {{ docyear }} all rights reserved</p>
5
+ </clause>
6
+ </copyright-statement>
7
+ <license-statement>
8
+ <clause>
9
+ <title>Copyright statement</title>
10
+ <p>This document is distributed under the terms of the Creative Commons Attribution 4.0 International License (<link target="http://creativecommons.org/licenses/by/4.0/"/>), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.</p>
11
+ </clause>
12
+ </license-statement>
13
+ <feedback-statement>
14
+ <p>BIPM<br/>
15
+ Pavillon de Breteuil<br/>
16
+ F-92312 Sèvres<br/>
17
+ Cedex<br/>
18
+ FRANCE</p>
19
+ </feedback-statement>
20
+ </boilerplate>
21
+
@@ -0,0 +1,21 @@
1
+ <boilerplate>
2
+ <copyright-statement>
3
+ <clause>
4
+ <p align="center"> © Bureau International des poids et mesures {{ docyear }} tous droits réservés</p>
5
+ </clause>
6
+ </copyright-statement>
7
+ <license-statement>
8
+ <clause>
9
+ <title>Note concernant les droits d’auteur</title>
10
+ <p>Ce document est distribué selon les termes et conditions de la licence Creative Commons Attribution 4.0 International (<link target="http://creativecommons.org/licenses/by/4.0/"/>), qui permet l’utilisation sans restriction, la distribution et la reproduction sur quelque support que soit, sous réserve de mentionner dûment l’auteur ou les auteurs originaux ainsi que la source de l’œuvre, d’intégrer un lien vers la licence Creative Commons et d’indiquer si des modifications ont été effectuées.</p>
11
+ </clause>
12
+ </license-statement>
13
+ <feedback-statement>
14
+ <p>BIPM<br/>
15
+ Pavillon de Breteuil<br/>
16
+ F-92312 Sèvres<br/>
17
+ Cedex<br/>
18
+ FRANCE</p>
19
+ </feedback-statement>
20
+ </boilerplate>
21
+
@@ -0,0 +1,85 @@
1
+ require "asciidoctor/standoc/converter"
2
+ require 'asciidoctor/generic/converter'
3
+
4
+ module Asciidoctor
5
+ module BIPM
6
+ # A {Converter} implementation that generates RSD output, and a document
7
+ # schema encapsulation of the document for validation
8
+ #
9
+ class Converter < Asciidoctor::Generic::Converter
10
+ register_for "bipm"
11
+
12
+ def configuration
13
+ Metanorma::BIPM.configuration
14
+ end
15
+
16
+ def metadata_committee(node, xml)
17
+ return unless node.attr("committee")
18
+ xml.editorialgroup do |a|
19
+ a.committee node.attr("committee")
20
+ i = 2
21
+ while node.attr("committee_#{i}") do
22
+ a.committee node.attr("committee_#{i}")
23
+ i += 1
24
+ end
25
+ a.workgroup node.attr("workgroup")
26
+ i = 2
27
+ while node.attr("workgroup_#{i}") do
28
+ a.workgroup node.attr("workgroup_#{i}")
29
+ i += 1
30
+ end
31
+ end
32
+ end
33
+
34
+ def title(node, xml)
35
+ ["en", "fr"].each do |lang|
36
+ at = { language: lang, format: "text/plain" }
37
+ xml.title **attr_code(at.merge(type: "main")) do |t1|
38
+ t1 << Asciidoctor::Standoc::Utils::asciidoc_sub(
39
+ node.attr("title-#{lang}"))
40
+ end
41
+ typed_title(node, xml, lang, "cover")
42
+ typed_title(node, xml, lang, "appendix")
43
+ end
44
+ end
45
+
46
+ def typed_title(node, xml, lang, type)
47
+ at = { language: lang, format: "text/plain" }
48
+ return unless title = node.attr("title-#{type}-#{lang}")
49
+ xml.title **attr_code(at.merge(type: type)) do |t1|
50
+ t1 << Asciidoctor::Standoc::Utils::asciidoc_sub(title)
51
+ end
52
+ end
53
+
54
+ def sectiontype_streamline(ret)
55
+ case ret
56
+ when "introduction" then "clause"
57
+ else
58
+ super
59
+ end
60
+ end
61
+
62
+ def outputs(node, ret)
63
+ File.open(@filename + ".xml", "w:UTF-8") { |f| f.write(ret) }
64
+ presentation_xml_converter(node).convert(@filename + ".xml")
65
+ html_converter(node).convert(@filename + ".presentation.xml",
66
+ nil, false, "#{@filename}.html")
67
+ pdf_converter(node)&.convert(@filename + ".presentation.xml",
68
+ nil, false, "#{@filename}.pdf")
69
+ end
70
+
71
+ def html_converter(node)
72
+ IsoDoc::BIPM::HtmlConvert.new(html_extract_attributes(node))
73
+ end
74
+
75
+ def presentation_xml_converter(node)
76
+ IsoDoc::BIPM::PresentationXMLConvert.new(html_extract_attributes(node))
77
+ end
78
+
79
+ def pdf_converter(node)
80
+ return nil if node.attr("no-pdf")
81
+ IsoDoc::BIPM::PdfConvert.new(doc_extract_attributes(node))
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,1620 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ instantiations of this grammar may replace leaf strings
4
+ with more elaborated types; e.g. title (text) replaced with
5
+ title-main, title-intro, title-part; type replaced with
6
+ enum.
7
+
8
+ some renaming at leaf nodes is permissible
9
+
10
+ obligations can change both from optional to mandatory,
11
+ and from mandatory to optional; optional elements may
12
+ be omitted; freely positioned alternatives may be replaced
13
+ with strict ordering
14
+
15
+ DO NOT introduce a namespace here. We do not want a distinct namespace
16
+ for these elements, and a distinct namespace for any grammar inheriting
17
+ these elements; we just want one namespace for any child grammars
18
+ of this.
19
+ -->
20
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
21
+ <include href="reqt.rng"/>
22
+ <!-- include "biblio.rnc" { } -->
23
+ <include href="basicdoc.rng">
24
+ <start>
25
+ <ref name="standard-document"/>
26
+ </start>
27
+ <define name="hyperlink">
28
+ <element name="link">
29
+ <attribute name="target">
30
+ <data type="anyURI"/>
31
+ </attribute>
32
+ <optional>
33
+ <attribute name="type">
34
+ <ref name="ReferenceFormat"/>
35
+ </attribute>
36
+ </optional>
37
+ <optional>
38
+ <attribute name="alt"/>
39
+ </optional>
40
+ <text/>
41
+ </element>
42
+ </define>
43
+ <define name="xref">
44
+ <element name="xref">
45
+ <!-- attribute target { xsd:IDREF }, -->
46
+ <attribute name="target">
47
+ <data type="string">
48
+ <param name="pattern">\i\c*|\c+#\c+</param>
49
+ </data>
50
+ </attribute>
51
+ <optional>
52
+ <attribute name="type">
53
+ <ref name="ReferenceFormat"/>
54
+ </attribute>
55
+ </optional>
56
+ <optional>
57
+ <attribute name="alt"/>
58
+ </optional>
59
+ <optional>
60
+ <attribute name="case">
61
+ <choice>
62
+ <value>capital</value>
63
+ <value>lowercase</value>
64
+ </choice>
65
+ </attribute>
66
+ </optional>
67
+ <optional>
68
+ <attribute name="droploc">
69
+ <data type="boolean"/>
70
+ </attribute>
71
+ </optional>
72
+ <text/>
73
+ </element>
74
+ </define>
75
+ <define name="ul">
76
+ <element name="ul">
77
+ <attribute name="id">
78
+ <data type="ID"/>
79
+ </attribute>
80
+ <optional>
81
+ <attribute name="keep-with-next">
82
+ <data type="boolean"/>
83
+ </attribute>
84
+ </optional>
85
+ <optional>
86
+ <attribute name="keep-lines-together">
87
+ <data type="boolean"/>
88
+ </attribute>
89
+ </optional>
90
+ <oneOrMore>
91
+ <ref name="li"/>
92
+ </oneOrMore>
93
+ <zeroOrMore>
94
+ <ref name="note"/>
95
+ </zeroOrMore>
96
+ </element>
97
+ </define>
98
+ <define name="ol">
99
+ <element name="ol">
100
+ <attribute name="id">
101
+ <data type="ID"/>
102
+ </attribute>
103
+ <optional>
104
+ <attribute name="keep-with-next">
105
+ <data type="boolean"/>
106
+ </attribute>
107
+ </optional>
108
+ <optional>
109
+ <attribute name="keep-lines-together">
110
+ <data type="boolean"/>
111
+ </attribute>
112
+ </optional>
113
+ <attribute name="type">
114
+ <choice>
115
+ <value>roman</value>
116
+ <value>alphabet</value>
117
+ <value>arabic</value>
118
+ <value>roman_upper</value>
119
+ <value>alphabet_upper</value>
120
+ </choice>
121
+ </attribute>
122
+ <oneOrMore>
123
+ <ref name="li"/>
124
+ </oneOrMore>
125
+ <zeroOrMore>
126
+ <ref name="note"/>
127
+ </zeroOrMore>
128
+ </element>
129
+ </define>
130
+ <define name="dl">
131
+ <element name="dl">
132
+ <attribute name="id">
133
+ <data type="ID"/>
134
+ </attribute>
135
+ <optional>
136
+ <attribute name="keep-with-next">
137
+ <data type="boolean"/>
138
+ </attribute>
139
+ </optional>
140
+ <optional>
141
+ <attribute name="keep-lines-together">
142
+ <data type="boolean"/>
143
+ </attribute>
144
+ </optional>
145
+ <oneOrMore>
146
+ <ref name="dt"/>
147
+ <ref name="dd"/>
148
+ </oneOrMore>
149
+ <zeroOrMore>
150
+ <ref name="note"/>
151
+ </zeroOrMore>
152
+ </element>
153
+ </define>
154
+ <define name="example">
155
+ <element name="example">
156
+ <attribute name="id">
157
+ <data type="ID"/>
158
+ </attribute>
159
+ <optional>
160
+ <attribute name="unnumbered">
161
+ <data type="boolean"/>
162
+ </attribute>
163
+ </optional>
164
+ <optional>
165
+ <attribute name="subsequence"/>
166
+ </optional>
167
+ <optional>
168
+ <attribute name="number"/>
169
+ </optional>
170
+ <optional>
171
+ <attribute name="keep-with-next">
172
+ <data type="boolean"/>
173
+ </attribute>
174
+ </optional>
175
+ <optional>
176
+ <attribute name="keep-lines-together">
177
+ <data type="boolean"/>
178
+ </attribute>
179
+ </optional>
180
+ <optional>
181
+ <ref name="tname"/>
182
+ </optional>
183
+ <oneOrMore>
184
+ <choice>
185
+ <ref name="formula"/>
186
+ <ref name="ul"/>
187
+ <ref name="ol"/>
188
+ <ref name="dl"/>
189
+ <ref name="quote"/>
190
+ <ref name="sourcecode"/>
191
+ <ref name="paragraph-with-footnote"/>
192
+ <ref name="figure"/>
193
+ </choice>
194
+ </oneOrMore>
195
+ <zeroOrMore>
196
+ <ref name="note"/>
197
+ </zeroOrMore>
198
+ </element>
199
+ </define>
200
+ <define name="table">
201
+ <element name="table">
202
+ <attribute name="id">
203
+ <data type="ID"/>
204
+ </attribute>
205
+ <optional>
206
+ <attribute name="unnumbered">
207
+ <data type="boolean"/>
208
+ </attribute>
209
+ </optional>
210
+ <optional>
211
+ <attribute name="number"/>
212
+ </optional>
213
+ <optional>
214
+ <attribute name="subsequence"/>
215
+ </optional>
216
+ <optional>
217
+ <attribute name="alt"/>
218
+ </optional>
219
+ <optional>
220
+ <attribute name="summary"/>
221
+ </optional>
222
+ <optional>
223
+ <attribute name="uri">
224
+ <data type="anyURI"/>
225
+ </attribute>
226
+ </optional>
227
+ <optional>
228
+ <attribute name="keep-with-next">
229
+ <data type="boolean"/>
230
+ </attribute>
231
+ </optional>
232
+ <optional>
233
+ <attribute name="keep-lines-together">
234
+ <data type="boolean"/>
235
+ </attribute>
236
+ </optional>
237
+ <optional>
238
+ <ref name="tname"/>
239
+ </optional>
240
+ <optional>
241
+ <ref name="thead"/>
242
+ </optional>
243
+ <ref name="tbody"/>
244
+ <optional>
245
+ <ref name="tfoot"/>
246
+ </optional>
247
+ <zeroOrMore>
248
+ <ref name="table-note"/>
249
+ </zeroOrMore>
250
+ <optional>
251
+ <ref name="dl"/>
252
+ </optional>
253
+ </element>
254
+ </define>
255
+ <define name="figure">
256
+ <element name="figure">
257
+ <attribute name="id">
258
+ <data type="ID"/>
259
+ </attribute>
260
+ <optional>
261
+ <attribute name="unnumbered">
262
+ <data type="boolean"/>
263
+ </attribute>
264
+ </optional>
265
+ <optional>
266
+ <attribute name="number"/>
267
+ </optional>
268
+ <optional>
269
+ <attribute name="subsequence"/>
270
+ </optional>
271
+ <optional>
272
+ <attribute name="keep-with-next">
273
+ <data type="boolean"/>
274
+ </attribute>
275
+ </optional>
276
+ <optional>
277
+ <attribute name="keep-lines-together">
278
+ <data type="boolean"/>
279
+ </attribute>
280
+ </optional>
281
+ <optional>
282
+ <attribute name="class"/>
283
+ </optional>
284
+ <optional>
285
+ <ref name="source"/>
286
+ </optional>
287
+ <optional>
288
+ <ref name="tname"/>
289
+ </optional>
290
+ <choice>
291
+ <ref name="image"/>
292
+ <ref name="video"/>
293
+ <ref name="audio"/>
294
+ <ref name="pre"/>
295
+ <oneOrMore>
296
+ <ref name="paragraph-with-footnote"/>
297
+ </oneOrMore>
298
+ <zeroOrMore>
299
+ <ref name="figure"/>
300
+ </zeroOrMore>
301
+ </choice>
302
+ <zeroOrMore>
303
+ <ref name="fn"/>
304
+ </zeroOrMore>
305
+ <optional>
306
+ <ref name="dl"/>
307
+ </optional>
308
+ <zeroOrMore>
309
+ <ref name="note"/>
310
+ </zeroOrMore>
311
+ </element>
312
+ </define>
313
+ <define name="sourcecode">
314
+ <element name="sourcecode">
315
+ <attribute name="id">
316
+ <data type="ID"/>
317
+ </attribute>
318
+ <optional>
319
+ <attribute name="unnumbered">
320
+ <data type="boolean"/>
321
+ </attribute>
322
+ </optional>
323
+ <optional>
324
+ <attribute name="number"/>
325
+ </optional>
326
+ <optional>
327
+ <attribute name="subsequence"/>
328
+ </optional>
329
+ <optional>
330
+ <attribute name="keep-with-next">
331
+ <data type="boolean"/>
332
+ </attribute>
333
+ </optional>
334
+ <optional>
335
+ <attribute name="keep-lines-together">
336
+ <data type="boolean"/>
337
+ </attribute>
338
+ </optional>
339
+ <optional>
340
+ <attribute name="lang"/>
341
+ </optional>
342
+ <optional>
343
+ <ref name="tname"/>
344
+ </optional>
345
+ <oneOrMore>
346
+ <choice>
347
+ <text/>
348
+ <ref name="callout"/>
349
+ </choice>
350
+ </oneOrMore>
351
+ <zeroOrMore>
352
+ <ref name="annotation"/>
353
+ </zeroOrMore>
354
+ <zeroOrMore>
355
+ <ref name="note"/>
356
+ </zeroOrMore>
357
+ </element>
358
+ </define>
359
+ <define name="formula">
360
+ <element name="formula">
361
+ <attribute name="id">
362
+ <data type="ID"/>
363
+ </attribute>
364
+ <optional>
365
+ <attribute name="unnumbered">
366
+ <data type="boolean"/>
367
+ </attribute>
368
+ </optional>
369
+ <optional>
370
+ <attribute name="number"/>
371
+ </optional>
372
+ <optional>
373
+ <attribute name="subsequence"/>
374
+ </optional>
375
+ <optional>
376
+ <attribute name="keep-with-next">
377
+ <data type="boolean"/>
378
+ </attribute>
379
+ </optional>
380
+ <optional>
381
+ <attribute name="keep-lines-together">
382
+ <data type="boolean"/>
383
+ </attribute>
384
+ </optional>
385
+ <optional>
386
+ <attribute name="inequality">
387
+ <data type="boolean"/>
388
+ </attribute>
389
+ </optional>
390
+ <ref name="stem"/>
391
+ <optional>
392
+ <ref name="dl"/>
393
+ </optional>
394
+ <zeroOrMore>
395
+ <ref name="note"/>
396
+ </zeroOrMore>
397
+ </element>
398
+ </define>
399
+ <define name="ParagraphType">
400
+ <attribute name="id">
401
+ <data type="ID"/>
402
+ </attribute>
403
+ <optional>
404
+ <attribute name="align">
405
+ <ref name="Alignments"/>
406
+ </attribute>
407
+ </optional>
408
+ <optional>
409
+ <attribute name="keep-with-next">
410
+ <data type="boolean"/>
411
+ </attribute>
412
+ </optional>
413
+ <optional>
414
+ <attribute name="keep-lines-together">
415
+ <data type="boolean"/>
416
+ </attribute>
417
+ </optional>
418
+ <zeroOrMore>
419
+ <ref name="TextElement"/>
420
+ </zeroOrMore>
421
+ <zeroOrMore>
422
+ <ref name="note"/>
423
+ </zeroOrMore>
424
+ </define>
425
+ <define name="paragraph-with-footnote">
426
+ <element name="p">
427
+ <attribute name="id">
428
+ <data type="ID"/>
429
+ </attribute>
430
+ <optional>
431
+ <attribute name="align">
432
+ <ref name="Alignments"/>
433
+ </attribute>
434
+ </optional>
435
+ <optional>
436
+ <attribute name="keep-with-next">
437
+ <data type="boolean"/>
438
+ </attribute>
439
+ </optional>
440
+ <optional>
441
+ <attribute name="keep-lines-together">
442
+ <data type="boolean"/>
443
+ </attribute>
444
+ </optional>
445
+ <zeroOrMore>
446
+ <choice>
447
+ <ref name="TextElement"/>
448
+ <ref name="fn"/>
449
+ </choice>
450
+ </zeroOrMore>
451
+ <zeroOrMore>
452
+ <ref name="note"/>
453
+ </zeroOrMore>
454
+ </element>
455
+ </define>
456
+ <define name="quote">
457
+ <element name="quote">
458
+ <attribute name="id">
459
+ <data type="ID"/>
460
+ </attribute>
461
+ <optional>
462
+ <attribute name="alignment">
463
+ <ref name="Alignments"/>
464
+ </attribute>
465
+ </optional>
466
+ <optional>
467
+ <attribute name="keep-with-next">
468
+ <data type="boolean"/>
469
+ </attribute>
470
+ </optional>
471
+ <optional>
472
+ <attribute name="keep-lines-together">
473
+ <data type="boolean"/>
474
+ </attribute>
475
+ </optional>
476
+ <optional>
477
+ <ref name="quote-source"/>
478
+ </optional>
479
+ <optional>
480
+ <ref name="quote-author"/>
481
+ </optional>
482
+ <oneOrMore>
483
+ <ref name="paragraph-with-footnote"/>
484
+ </oneOrMore>
485
+ <zeroOrMore>
486
+ <ref name="note"/>
487
+ </zeroOrMore>
488
+ </element>
489
+ </define>
490
+ <define name="BibDataExtensionType">
491
+ <ref name="doctype"/>
492
+ <optional>
493
+ <ref name="editorialgroup"/>
494
+ </optional>
495
+ <zeroOrMore>
496
+ <ref name="ics"/>
497
+ </zeroOrMore>
498
+ <zeroOrMore>
499
+ <ref name="structuredidentifier"/>
500
+ </zeroOrMore>
501
+ </define>
502
+ <!-- TitleType = text -->
503
+ <define name="sections">
504
+ <element name="sections">
505
+ <oneOrMore>
506
+ <choice>
507
+ <ref name="clause"/>
508
+ <ref name="terms"/>
509
+ <ref name="term-clause"/>
510
+ <ref name="definitions"/>
511
+ </choice>
512
+ </oneOrMore>
513
+ </element>
514
+ </define>
515
+ <define name="references">
516
+ <element name="references">
517
+ <optional>
518
+ <attribute name="id">
519
+ <data type="ID"/>
520
+ </attribute>
521
+ </optional>
522
+ <optional>
523
+ <attribute name="obligation">
524
+ <choice>
525
+ <value>normative</value>
526
+ <value>informative</value>
527
+ </choice>
528
+ </attribute>
529
+ </optional>
530
+ <attribute name="normative">
531
+ <data type="boolean"/>
532
+ </attribute>
533
+ <optional>
534
+ <ref name="section-title"/>
535
+ </optional>
536
+ <zeroOrMore>
537
+ <ref name="BasicBlock"/>
538
+ </zeroOrMore>
539
+ <zeroOrMore>
540
+ <ref name="note"/>
541
+ </zeroOrMore>
542
+ <zeroOrMore>
543
+ <ref name="bibitem"/>
544
+ <zeroOrMore>
545
+ <ref name="note"/>
546
+ </zeroOrMore>
547
+ </zeroOrMore>
548
+ <zeroOrMore>
549
+ <ref name="references"/>
550
+ </zeroOrMore>
551
+ </element>
552
+ </define>
553
+ <define name="note">
554
+ <element name="note">
555
+ <attribute name="id">
556
+ <data type="ID"/>
557
+ </attribute>
558
+ <optional>
559
+ <attribute name="unnumbered">
560
+ <data type="boolean"/>
561
+ </attribute>
562
+ </optional>
563
+ <optional>
564
+ <attribute name="number"/>
565
+ </optional>
566
+ <optional>
567
+ <attribute name="subsequence"/>
568
+ </optional>
569
+ <optional>
570
+ <attribute name="keep-with-next">
571
+ <data type="boolean"/>
572
+ </attribute>
573
+ </optional>
574
+ <optional>
575
+ <attribute name="keep-lines-together">
576
+ <data type="boolean"/>
577
+ </attribute>
578
+ </optional>
579
+ <optional>
580
+ <attribute name="type"/>
581
+ </optional>
582
+ <oneOrMore>
583
+ <choice>
584
+ <ref name="paragraph"/>
585
+ <ref name="ul"/>
586
+ <ref name="ol"/>
587
+ <ref name="dl"/>
588
+ <ref name="formula"/>
589
+ <ref name="quote"/>
590
+ <ref name="sourcecode"/>
591
+ </choice>
592
+ </oneOrMore>
593
+ </element>
594
+ </define>
595
+ <define name="Basic-Section">
596
+ <optional>
597
+ <attribute name="id">
598
+ <data type="ID"/>
599
+ </attribute>
600
+ </optional>
601
+ <optional>
602
+ <attribute name="language"/>
603
+ </optional>
604
+ <optional>
605
+ <attribute name="script"/>
606
+ </optional>
607
+ <optional>
608
+ <attribute name="obligation">
609
+ <choice>
610
+ <value>normative</value>
611
+ <value>informative</value>
612
+ </choice>
613
+ </attribute>
614
+ </optional>
615
+ <optional>
616
+ <ref name="section-title"/>
617
+ </optional>
618
+ <group>
619
+ <oneOrMore>
620
+ <ref name="BasicBlock"/>
621
+ </oneOrMore>
622
+ <zeroOrMore>
623
+ <ref name="note"/>
624
+ </zeroOrMore>
625
+ </group>
626
+ </define>
627
+ <define name="li">
628
+ <element name="li">
629
+ <group>
630
+ <optional>
631
+ <attribute name="id">
632
+ <data type="ID"/>
633
+ </attribute>
634
+ </optional>
635
+ <oneOrMore>
636
+ <ref name="BasicBlock"/>
637
+ </oneOrMore>
638
+ </group>
639
+ <!-- exclude figures? -->
640
+ </element>
641
+ </define>
642
+ <define name="dd">
643
+ <element name="dd">
644
+ <zeroOrMore>
645
+ <!-- exclude figures? -->
646
+ <ref name="BasicBlock"/>
647
+ </zeroOrMore>
648
+ </element>
649
+ </define>
650
+ <define name="thead">
651
+ <element name="thead">
652
+ <oneOrMore>
653
+ <ref name="tr"/>
654
+ </oneOrMore>
655
+ </element>
656
+ </define>
657
+ <define name="td">
658
+ <element name="td">
659
+ <optional>
660
+ <attribute name="colspan"/>
661
+ </optional>
662
+ <optional>
663
+ <attribute name="rowspan"/>
664
+ </optional>
665
+ <optional>
666
+ <attribute name="align">
667
+ <choice>
668
+ <value>left</value>
669
+ <value>right</value>
670
+ <value>center</value>
671
+ </choice>
672
+ </attribute>
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>
684
+ <choice>
685
+ <zeroOrMore>
686
+ <choice>
687
+ <ref name="TextElement"/>
688
+ <ref name="fn"/>
689
+ </choice>
690
+ </zeroOrMore>
691
+ <oneOrMore>
692
+ <choice>
693
+ <ref name="paragraph-with-footnote"/>
694
+ <ref name="dl"/>
695
+ <ref name="ul"/>
696
+ <ref name="ol"/>
697
+ <ref name="figure"/>
698
+ </choice>
699
+ </oneOrMore>
700
+ </choice>
701
+ </element>
702
+ </define>
703
+ <define name="th">
704
+ <element name="th">
705
+ <optional>
706
+ <attribute name="colspan"/>
707
+ </optional>
708
+ <optional>
709
+ <attribute name="rowspan"/>
710
+ </optional>
711
+ <optional>
712
+ <attribute name="align">
713
+ <choice>
714
+ <value>left</value>
715
+ <value>right</value>
716
+ <value>center</value>
717
+ </choice>
718
+ </attribute>
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>
730
+ <choice>
731
+ <zeroOrMore>
732
+ <choice>
733
+ <ref name="TextElement"/>
734
+ <ref name="fn"/>
735
+ </choice>
736
+ </zeroOrMore>
737
+ <oneOrMore>
738
+ <ref name="paragraph-with-footnote"/>
739
+ </oneOrMore>
740
+ </choice>
741
+ </element>
742
+ </define>
743
+ <define name="table-note">
744
+ <element name="note">
745
+ <optional>
746
+ <attribute name="id">
747
+ <data type="ID"/>
748
+ </attribute>
749
+ </optional>
750
+ <ref name="paragraph"/>
751
+ </element>
752
+ </define>
753
+ </include>
754
+ <!-- end overrides -->
755
+ <define name="TextElement" combine="choice">
756
+ <ref name="concept"/>
757
+ </define>
758
+ <define name="concept">
759
+ <element name="concept">
760
+ <optional>
761
+ <attribute name="term"/>
762
+ </optional>
763
+ <choice>
764
+ <ref name="eref"/>
765
+ <ref name="xref"/>
766
+ <ref name="termref"/>
767
+ </choice>
768
+ </element>
769
+ </define>
770
+ <define name="BasicBlock" combine="choice">
771
+ <choice>
772
+ <ref name="requirement"/>
773
+ <ref name="recommendation"/>
774
+ <ref name="permission"/>
775
+ </choice>
776
+ </define>
777
+ <define name="bibliography">
778
+ <element name="bibliography">
779
+ <oneOrMore>
780
+ <choice>
781
+ <ref name="references"/>
782
+ <ref name="reference-clause"/>
783
+ </choice>
784
+ </oneOrMore>
785
+ </element>
786
+ </define>
787
+ <define name="reference-clause">
788
+ <element name="clause">
789
+ <optional>
790
+ <attribute name="id">
791
+ <data type="ID"/>
792
+ </attribute>
793
+ </optional>
794
+ <optional>
795
+ <attribute name="language"/>
796
+ </optional>
797
+ <optional>
798
+ <attribute name="script"/>
799
+ </optional>
800
+ <optional>
801
+ <attribute name="inline-header">
802
+ <data type="boolean"/>
803
+ </attribute>
804
+ </optional>
805
+ <optional>
806
+ <attribute name="obligation">
807
+ <choice>
808
+ <value>normative</value>
809
+ <value>informative</value>
810
+ </choice>
811
+ </attribute>
812
+ </optional>
813
+ <optional>
814
+ <ref name="section-title"/>
815
+ </optional>
816
+ <zeroOrMore>
817
+ <ref name="BasicBlock"/>
818
+ </zeroOrMore>
819
+ <zeroOrMore>
820
+ <ref name="note"/>
821
+ </zeroOrMore>
822
+ <choice>
823
+ <oneOrMore>
824
+ <ref name="reference-clause"/>
825
+ </oneOrMore>
826
+ <zeroOrMore>
827
+ <ref name="references"/>
828
+ </zeroOrMore>
829
+ </choice>
830
+ </element>
831
+ </define>
832
+ <define name="editorialgroup">
833
+ <element name="editorialgroup">
834
+ <oneOrMore>
835
+ <ref name="technical-committee"/>
836
+ </oneOrMore>
837
+ </element>
838
+ </define>
839
+ <define name="technical-committee">
840
+ <element name="technical-committee">
841
+ <ref name="IsoWorkgroup"/>
842
+ </element>
843
+ </define>
844
+ <define name="IsoWorkgroup">
845
+ <optional>
846
+ <attribute name="number">
847
+ <data type="int"/>
848
+ </attribute>
849
+ </optional>
850
+ <optional>
851
+ <attribute name="type"/>
852
+ </optional>
853
+ <text/>
854
+ </define>
855
+ <define name="ics">
856
+ <element name="ics">
857
+ <element name="code">
858
+ <text/>
859
+ </element>
860
+ <element name="text">
861
+ <text/>
862
+ </element>
863
+ </element>
864
+ </define>
865
+ <define name="standard-document">
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>
874
+ <ref name="bibdata"/>
875
+ <optional>
876
+ <ref name="boilerplate"/>
877
+ </optional>
878
+ <optional>
879
+ <ref name="preface"/>
880
+ </optional>
881
+ <ref name="sections"/>
882
+ <zeroOrMore>
883
+ <ref name="annex"/>
884
+ </zeroOrMore>
885
+ <zeroOrMore>
886
+ <ref name="references"/>
887
+ </zeroOrMore>
888
+ </element>
889
+ </define>
890
+ <define name="preface">
891
+ <element name="preface">
892
+ <oneOrMore>
893
+ <choice>
894
+ <ref name="content"/>
895
+ <ref name="abstract"/>
896
+ <ref name="foreword"/>
897
+ <ref name="introduction"/>
898
+ <ref name="acknowledgements"/>
899
+ </choice>
900
+ </oneOrMore>
901
+ </element>
902
+ </define>
903
+ <define name="foreword">
904
+ <element name="foreword">
905
+ <ref name="Content-Section"/>
906
+ </element>
907
+ </define>
908
+ <define name="introduction">
909
+ <element name="introduction">
910
+ <ref name="Content-Section"/>
911
+ </element>
912
+ </define>
913
+ <define name="boilerplate">
914
+ <element name="boilerplate">
915
+ <optional>
916
+ <ref name="copyright-statement"/>
917
+ </optional>
918
+ <optional>
919
+ <ref name="license-statement"/>
920
+ </optional>
921
+ <optional>
922
+ <ref name="legal-statement"/>
923
+ </optional>
924
+ <optional>
925
+ <ref name="feedback-statement"/>
926
+ </optional>
927
+ </element>
928
+ </define>
929
+ <define name="copyright-statement">
930
+ <element name="copyright-statement">
931
+ <ref name="Content-Section"/>
932
+ </element>
933
+ </define>
934
+ <define name="license-statement">
935
+ <element name="license-statement">
936
+ <ref name="Content-Section"/>
937
+ </element>
938
+ </define>
939
+ <define name="legal-statement">
940
+ <element name="legal-statement">
941
+ <ref name="Content-Section"/>
942
+ </element>
943
+ </define>
944
+ <define name="feedback-statement">
945
+ <element name="feedback-statement">
946
+ <ref name="Content-Section"/>
947
+ </element>
948
+ </define>
949
+ <define name="definitions">
950
+ <element name="definitions">
951
+ <optional>
952
+ <attribute name="id">
953
+ <data type="ID"/>
954
+ </attribute>
955
+ </optional>
956
+ <optional>
957
+ <attribute name="language"/>
958
+ </optional>
959
+ <optional>
960
+ <attribute name="script"/>
961
+ </optional>
962
+ <optional>
963
+ <attribute name="type"/>
964
+ </optional>
965
+ <optional>
966
+ <attribute name="obligation">
967
+ <choice>
968
+ <value>normative</value>
969
+ <value>informative</value>
970
+ </choice>
971
+ </attribute>
972
+ </optional>
973
+ <optional>
974
+ <ref name="section-title"/>
975
+ </optional>
976
+ <oneOrMore>
977
+ <zeroOrMore>
978
+ <ref name="BasicBlock"/>
979
+ </zeroOrMore>
980
+ <zeroOrMore>
981
+ <ref name="note"/>
982
+ </zeroOrMore>
983
+ <ref name="dl"/>
984
+ </oneOrMore>
985
+ </element>
986
+ </define>
987
+ <define name="content">
988
+ <element name="clause">
989
+ <ref name="Content-Section"/>
990
+ </element>
991
+ </define>
992
+ <define name="abstract">
993
+ <element name="abstract">
994
+ <ref name="Content-Section"/>
995
+ </element>
996
+ </define>
997
+ <define name="acknowledgements">
998
+ <element name="acknowledgements">
999
+ <ref name="Content-Section"/>
1000
+ </element>
1001
+ </define>
1002
+ <define name="content-subsection">
1003
+ <element name="clause">
1004
+ <ref name="Content-Section"/>
1005
+ </element>
1006
+ </define>
1007
+ <define name="Content-Section">
1008
+ <optional>
1009
+ <attribute name="id">
1010
+ <data type="ID"/>
1011
+ </attribute>
1012
+ </optional>
1013
+ <optional>
1014
+ <attribute name="language"/>
1015
+ </optional>
1016
+ <optional>
1017
+ <attribute name="script"/>
1018
+ </optional>
1019
+ <optional>
1020
+ <attribute name="inline-header">
1021
+ <data type="boolean"/>
1022
+ </attribute>
1023
+ </optional>
1024
+ <optional>
1025
+ <attribute name="obligation">
1026
+ <choice>
1027
+ <value>normative</value>
1028
+ <value>informative</value>
1029
+ </choice>
1030
+ </attribute>
1031
+ </optional>
1032
+ <optional>
1033
+ <attribute name="type"/>
1034
+ </optional>
1035
+ <optional>
1036
+ <ref name="section-title"/>
1037
+ </optional>
1038
+ <group>
1039
+ <group>
1040
+ <zeroOrMore>
1041
+ <ref name="BasicBlock"/>
1042
+ </zeroOrMore>
1043
+ <zeroOrMore>
1044
+ <ref name="note"/>
1045
+ </zeroOrMore>
1046
+ </group>
1047
+ <zeroOrMore>
1048
+ <ref name="content-subsection"/>
1049
+ </zeroOrMore>
1050
+ </group>
1051
+ </define>
1052
+ <define name="clause">
1053
+ <element name="clause">
1054
+ <ref name="Clause-Section"/>
1055
+ </element>
1056
+ </define>
1057
+ <define name="Clause-Section">
1058
+ <optional>
1059
+ <attribute name="id">
1060
+ <data type="ID"/>
1061
+ </attribute>
1062
+ </optional>
1063
+ <optional>
1064
+ <attribute name="language"/>
1065
+ </optional>
1066
+ <optional>
1067
+ <attribute name="script"/>
1068
+ </optional>
1069
+ <optional>
1070
+ <attribute name="inline-header">
1071
+ <data type="boolean"/>
1072
+ </attribute>
1073
+ </optional>
1074
+ <optional>
1075
+ <attribute name="obligation">
1076
+ <choice>
1077
+ <value>normative</value>
1078
+ <value>informative</value>
1079
+ </choice>
1080
+ </attribute>
1081
+ </optional>
1082
+ <optional>
1083
+ <attribute name="type"/>
1084
+ </optional>
1085
+ <optional>
1086
+ <ref name="section-title"/>
1087
+ </optional>
1088
+ <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>
1100
+ <zeroOrMore>
1101
+ <choice>
1102
+ <ref name="clause-subsection"/>
1103
+ <ref name="terms"/>
1104
+ <ref name="definitions"/>
1105
+ </choice>
1106
+ </zeroOrMore>
1107
+ </group>
1108
+ </define>
1109
+ <define name="Annex-Section">
1110
+ <optional>
1111
+ <attribute name="id">
1112
+ <data type="ID"/>
1113
+ </attribute>
1114
+ </optional>
1115
+ <optional>
1116
+ <attribute name="language"/>
1117
+ </optional>
1118
+ <optional>
1119
+ <attribute name="script"/>
1120
+ </optional>
1121
+ <optional>
1122
+ <attribute name="inline-header">
1123
+ <data type="boolean"/>
1124
+ </attribute>
1125
+ </optional>
1126
+ <optional>
1127
+ <attribute name="obligation">
1128
+ <choice>
1129
+ <value>normative</value>
1130
+ <value>informative</value>
1131
+ </choice>
1132
+ </attribute>
1133
+ </optional>
1134
+ <optional>
1135
+ <ref name="section-title"/>
1136
+ </optional>
1137
+ <group>
1138
+ <group>
1139
+ <zeroOrMore>
1140
+ <ref name="BasicBlock"/>
1141
+ </zeroOrMore>
1142
+ <zeroOrMore>
1143
+ <ref name="note"/>
1144
+ </zeroOrMore>
1145
+ </group>
1146
+ <zeroOrMore>
1147
+ <choice>
1148
+ <ref name="annex-subsection"/>
1149
+ <ref name="terms"/>
1150
+ <ref name="definitions"/>
1151
+ <ref name="references"/>
1152
+ </choice>
1153
+ </zeroOrMore>
1154
+ </group>
1155
+ </define>
1156
+ <define name="clause-subsection">
1157
+ <element name="clause">
1158
+ <ref name="Clause-Section"/>
1159
+ </element>
1160
+ </define>
1161
+ <define name="annex-subsection">
1162
+ <element name="clause">
1163
+ <ref name="Annex-Section"/>
1164
+ </element>
1165
+ </define>
1166
+ <define name="annex">
1167
+ <element name="annex">
1168
+ <optional>
1169
+ <attribute name="id">
1170
+ <data type="ID"/>
1171
+ </attribute>
1172
+ </optional>
1173
+ <optional>
1174
+ <attribute name="language"/>
1175
+ </optional>
1176
+ <optional>
1177
+ <attribute name="script"/>
1178
+ </optional>
1179
+ <optional>
1180
+ <attribute name="inline-header">
1181
+ <data type="boolean"/>
1182
+ </attribute>
1183
+ </optional>
1184
+ <attribute name="obligation">
1185
+ <choice>
1186
+ <value>normative</value>
1187
+ <value>informative</value>
1188
+ </choice>
1189
+ </attribute>
1190
+ <optional>
1191
+ <ref name="section-title"/>
1192
+ </optional>
1193
+ <group>
1194
+ <group>
1195
+ <zeroOrMore>
1196
+ <ref name="BasicBlock"/>
1197
+ </zeroOrMore>
1198
+ <zeroOrMore>
1199
+ <ref name="note"/>
1200
+ </zeroOrMore>
1201
+ </group>
1202
+ <zeroOrMore>
1203
+ <choice>
1204
+ <ref name="annex-subsection"/>
1205
+ <ref name="terms"/>
1206
+ <ref name="definitions"/>
1207
+ <ref name="references"/>
1208
+ </choice>
1209
+ </zeroOrMore>
1210
+ </group>
1211
+ </element>
1212
+ </define>
1213
+ <define name="terms">
1214
+ <element name="terms">
1215
+ <optional>
1216
+ <attribute name="id">
1217
+ <data type="ID"/>
1218
+ </attribute>
1219
+ </optional>
1220
+ <optional>
1221
+ <attribute name="language"/>
1222
+ </optional>
1223
+ <optional>
1224
+ <attribute name="script"/>
1225
+ </optional>
1226
+ <optional>
1227
+ <attribute name="type"/>
1228
+ </optional>
1229
+ <optional>
1230
+ <attribute name="obligation">
1231
+ <choice>
1232
+ <value>normative</value>
1233
+ <value>informative</value>
1234
+ </choice>
1235
+ </attribute>
1236
+ </optional>
1237
+ <optional>
1238
+ <ref name="section-title"/>
1239
+ </optional>
1240
+ <zeroOrMore>
1241
+ <ref name="BasicBlock"/>
1242
+ </zeroOrMore>
1243
+ <zeroOrMore>
1244
+ <ref name="note"/>
1245
+ </zeroOrMore>
1246
+ <choice>
1247
+ <oneOrMore>
1248
+ <ref name="term"/>
1249
+ </oneOrMore>
1250
+ <group>
1251
+ <zeroOrMore>
1252
+ <ref name="terms"/>
1253
+ </zeroOrMore>
1254
+ <optional>
1255
+ <ref name="definitions"/>
1256
+ </optional>
1257
+ </group>
1258
+ </choice>
1259
+ </element>
1260
+ </define>
1261
+ <define name="term">
1262
+ <element name="term">
1263
+ <optional>
1264
+ <attribute name="id">
1265
+ <data type="ID"/>
1266
+ </attribute>
1267
+ </optional>
1268
+ <oneOrMore>
1269
+ <ref name="preferred"/>
1270
+ </oneOrMore>
1271
+ <zeroOrMore>
1272
+ <ref name="admitted"/>
1273
+ </zeroOrMore>
1274
+ <zeroOrMore>
1275
+ <ref name="related"/>
1276
+ </zeroOrMore>
1277
+ <zeroOrMore>
1278
+ <ref name="deprecates"/>
1279
+ </zeroOrMore>
1280
+ <optional>
1281
+ <ref name="termdomain"/>
1282
+ </optional>
1283
+ <zeroOrMore>
1284
+ <ref name="termgrammar"/>
1285
+ </zeroOrMore>
1286
+ <ref name="definition"/>
1287
+ <zeroOrMore>
1288
+ <ref name="termnote"/>
1289
+ </zeroOrMore>
1290
+ <zeroOrMore>
1291
+ <ref name="termexample"/>
1292
+ </zeroOrMore>
1293
+ <zeroOrMore>
1294
+ <ref name="termsource"/>
1295
+ </zeroOrMore>
1296
+ </element>
1297
+ </define>
1298
+ <define name="preferred">
1299
+ <element name="preferred">
1300
+ <oneOrMore>
1301
+ <ref name="TextElement"/>
1302
+ </oneOrMore>
1303
+ </element>
1304
+ </define>
1305
+ <define name="admitted">
1306
+ <element name="admitted">
1307
+ <oneOrMore>
1308
+ <ref name="TextElement"/>
1309
+ </oneOrMore>
1310
+ </element>
1311
+ </define>
1312
+ <define name="related">
1313
+ <element name="related">
1314
+ <optional>
1315
+ <attribute name="type">
1316
+ <choice>
1317
+ <value>compare</value>
1318
+ <value>contrast</value>
1319
+ <value>see</value>
1320
+ </choice>
1321
+ </attribute>
1322
+ </optional>
1323
+ <oneOrMore>
1324
+ <ref name="TextElement"/>
1325
+ </oneOrMore>
1326
+ </element>
1327
+ </define>
1328
+ <define name="deprecates">
1329
+ <element name="deprecates">
1330
+ <oneOrMore>
1331
+ <ref name="TextElement"/>
1332
+ </oneOrMore>
1333
+ </element>
1334
+ </define>
1335
+ <define name="termdomain">
1336
+ <element name="domain">
1337
+ <oneOrMore>
1338
+ <ref name="TextElement"/>
1339
+ </oneOrMore>
1340
+ </element>
1341
+ </define>
1342
+ <define name="termgrammar">
1343
+ <element name="grammar">
1344
+ <oneOrMore>
1345
+ <ref name="TextElement"/>
1346
+ </oneOrMore>
1347
+ </element>
1348
+ </define>
1349
+ <define name="definition">
1350
+ <element name="definition">
1351
+ <oneOrMore>
1352
+ <choice>
1353
+ <ref name="paragraph"/>
1354
+ <ref name="figure"/>
1355
+ <ref name="formula"/>
1356
+ </choice>
1357
+ </oneOrMore>
1358
+ </element>
1359
+ </define>
1360
+ <define name="termnote">
1361
+ <element name="termnote">
1362
+ <attribute name="id">
1363
+ <data type="ID"/>
1364
+ </attribute>
1365
+ <optional>
1366
+ <attribute name="unnumbered">
1367
+ <data type="boolean"/>
1368
+ </attribute>
1369
+ </optional>
1370
+ <optional>
1371
+ <attribute name="number"/>
1372
+ </optional>
1373
+ <optional>
1374
+ <attribute name="subsequence"/>
1375
+ </optional>
1376
+ <optional>
1377
+ <attribute name="keep-with-next">
1378
+ <data type="boolean"/>
1379
+ </attribute>
1380
+ </optional>
1381
+ <optional>
1382
+ <attribute name="keep-lines-together">
1383
+ <data type="boolean"/>
1384
+ </attribute>
1385
+ </optional>
1386
+ <oneOrMore>
1387
+ <choice>
1388
+ <ref name="paragraph"/>
1389
+ <ref name="ul"/>
1390
+ <ref name="ol"/>
1391
+ <ref name="dl"/>
1392
+ <ref name="formula"/>
1393
+ </choice>
1394
+ </oneOrMore>
1395
+ </element>
1396
+ </define>
1397
+ <define name="termexample">
1398
+ <element name="termexample">
1399
+ <attribute name="id">
1400
+ <data type="ID"/>
1401
+ </attribute>
1402
+ <ref name="paragraph"/>
1403
+ </element>
1404
+ </define>
1405
+ <define name="termsource">
1406
+ <element name="termsource">
1407
+ <attribute name="status">
1408
+ <choice>
1409
+ <value>identical</value>
1410
+ <value>modified</value>
1411
+ </choice>
1412
+ </attribute>
1413
+ <ref name="origin"/>
1414
+ <optional>
1415
+ <ref name="modification"/>
1416
+ </optional>
1417
+ </element>
1418
+ </define>
1419
+ <define name="origin">
1420
+ <element name="origin">
1421
+ <choice>
1422
+ <ref name="erefType"/>
1423
+ <ref name="termref"/>
1424
+ </choice>
1425
+ </element>
1426
+ </define>
1427
+ <define name="modification">
1428
+ <element name="modification">
1429
+ <ref name="paragraph"/>
1430
+ </element>
1431
+ </define>
1432
+ <define name="termref">
1433
+ <element name="termref">
1434
+ <attribute name="base"/>
1435
+ <attribute name="target"/>
1436
+ <optional>
1437
+ <text/>
1438
+ </optional>
1439
+ </element>
1440
+ </define>
1441
+ <define name="structuredidentifier">
1442
+ <element name="structuredidentifier">
1443
+ <optional>
1444
+ <attribute name="type"/>
1445
+ </optional>
1446
+ <oneOrMore>
1447
+ <element name="agency">
1448
+ <text/>
1449
+ </element>
1450
+ </oneOrMore>
1451
+ <optional>
1452
+ <element name="class">
1453
+ <text/>
1454
+ </element>
1455
+ </optional>
1456
+ <element name="docnumber">
1457
+ <text/>
1458
+ </element>
1459
+ <optional>
1460
+ <element name="partnumber">
1461
+ <text/>
1462
+ </element>
1463
+ </optional>
1464
+ <optional>
1465
+ <element name="edition">
1466
+ <text/>
1467
+ </element>
1468
+ </optional>
1469
+ <optional>
1470
+ <element name="version">
1471
+ <text/>
1472
+ </element>
1473
+ </optional>
1474
+ <optional>
1475
+ <element name="supplementtype">
1476
+ <text/>
1477
+ </element>
1478
+ </optional>
1479
+ <optional>
1480
+ <element name="supplementnumber">
1481
+ <text/>
1482
+ </element>
1483
+ </optional>
1484
+ <optional>
1485
+ <element name="language">
1486
+ <text/>
1487
+ </element>
1488
+ </optional>
1489
+ <optional>
1490
+ <element name="year">
1491
+ <text/>
1492
+ </element>
1493
+ </optional>
1494
+ </element>
1495
+ </define>
1496
+ <define name="term-clause">
1497
+ <element name="clause">
1498
+ <optional>
1499
+ <attribute name="id">
1500
+ <data type="ID"/>
1501
+ </attribute>
1502
+ </optional>
1503
+ <optional>
1504
+ <attribute name="language"/>
1505
+ </optional>
1506
+ <optional>
1507
+ <attribute name="script"/>
1508
+ </optional>
1509
+ <optional>
1510
+ <attribute name="inline-header">
1511
+ <data type="boolean"/>
1512
+ </attribute>
1513
+ </optional>
1514
+ <optional>
1515
+ <attribute name="obligation">
1516
+ <choice>
1517
+ <value>normative</value>
1518
+ <value>informative</value>
1519
+ </choice>
1520
+ </attribute>
1521
+ </optional>
1522
+ <optional>
1523
+ <ref name="section-title"/>
1524
+ </optional>
1525
+ <zeroOrMore>
1526
+ <ref name="BasicBlock"/>
1527
+ </zeroOrMore>
1528
+ <zeroOrMore>
1529
+ <ref name="note"/>
1530
+ </zeroOrMore>
1531
+ <zeroOrMore>
1532
+ <choice>
1533
+ <ref name="term-clause"/>
1534
+ <ref name="terms"/>
1535
+ <ref name="definitions"/>
1536
+ </choice>
1537
+ </zeroOrMore>
1538
+ </element>
1539
+ </define>
1540
+ <define name="termdocsource">
1541
+ <element name="termdocsource">
1542
+ <ref name="CitationType"/>
1543
+ </element>
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>
1620
+ </grammar>