asciidoctor-iso 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +7 -10
  3. data/README.adoc +118 -6
  4. data/asciidoctor-iso.gemspec +1 -4
  5. data/lib/asciidoctor-iso.rb +2 -0
  6. data/lib/asciidoctor/iso/base.rb +20 -95
  7. data/lib/asciidoctor/iso/blocks.rb +47 -39
  8. data/lib/asciidoctor/iso/cleanup.rb +25 -97
  9. data/lib/asciidoctor/iso/cleanup_block.rb +10 -1
  10. data/lib/asciidoctor/iso/cleanup_ref.rb +100 -0
  11. data/lib/asciidoctor/iso/converter.rb +5 -2
  12. data/lib/asciidoctor/iso/front.rb +52 -24
  13. data/lib/asciidoctor/iso/html/header.html +10 -10
  14. data/lib/asciidoctor/iso/html/html_iso_intro.html +1 -1
  15. data/lib/asciidoctor/iso/html/html_iso_titlepage.html +5 -5
  16. data/lib/asciidoctor/iso/html/htmlstyle.css +0 -21
  17. data/lib/asciidoctor/iso/html/isodoc.css +13 -28
  18. data/lib/asciidoctor/iso/html/word_iso_intro.html +2 -2
  19. data/lib/asciidoctor/iso/html/word_iso_titlepage.html +7 -7
  20. data/lib/asciidoctor/iso/html/wordstyle.css +998 -0
  21. data/lib/asciidoctor/iso/inline.rb +128 -0
  22. data/lib/asciidoctor/iso/isodoc.rng +1516 -0
  23. data/lib/asciidoctor/iso/isostandard.rnc +38 -39
  24. data/lib/asciidoctor/iso/isostandard.rng +529 -1276
  25. data/lib/asciidoctor/iso/isostandard_diff.rnc +40 -56
  26. data/lib/asciidoctor/iso/lists.rb +30 -28
  27. data/lib/asciidoctor/iso/macros.rb +37 -0
  28. data/lib/asciidoctor/iso/section.rb +1 -1
  29. data/lib/asciidoctor/iso/utils.rb +9 -0
  30. data/lib/asciidoctor/iso/validate.rb +41 -120
  31. data/lib/asciidoctor/iso/validate_section.rb +117 -0
  32. data/lib/asciidoctor/iso/validate_style.rb +5 -7
  33. data/lib/asciidoctor/iso/version.rb +1 -1
  34. data/spec/examples/rice.adoc +41 -8
  35. data/spec/examples/rice.doc +2885 -2859
  36. data/spec/examples/rice.html +316 -649
  37. data/spec/examples/rice.preview.html +51 -10
  38. data/spec/examples/rice.xml +418 -343
  39. metadata +12 -50
  40. data/lib/asciidoctor/iso/inline_anchor.rb +0 -59
  41. data/lib/asciidoctor/iso/validate.make.sh +0 -8
@@ -1,18 +1,12 @@
1
1
  default namespace = "http://riboseinc.com/isoxml"
2
- grammar { start = iso-standard standard-document = element standard-document { title + , status , creator * , language , script , type ? , id * , version ? , copyright , sections + }
3
- title = element title { attribute language { text } , title-intro ? , title-main , title-part ? }
4
- status = element status { stage , substage ? }
2
+ grammar { start = iso-standard standard-document = element standard-document { bibdata , version ? , sections + }
3
+ bibdata = element bibdata { BibliographicItem }
4
+ status = element status { FormattedString | ( stage , substage ? ) }
5
5
  language = element language { ( "en" | "fr" ) }
6
- script = element script { "latn" }
7
- type = element type { ( "international-standard" | "technical-specification" | "technical-report" | "publicly-available-specification" | "international-workshop-agreement" | "guide" ) }
8
- id = element id { documentnumber , tc-documentnumber ? }
6
+ script = element script { "Latn" }
9
7
  version = element version { edition ? , revision-date ? , draft ? }
10
8
  edition = element edition { xsd:int }
11
9
  revision-date = element revision-date { xsd:date }
12
- copyright = element copyright { from , owner }
13
- from = element from { xsd:gYear }
14
- to = element to { xsd:gYear }
15
- owner = element owner { owner-affiliation }
16
10
  sections = element sections { content , content ? , clause , references , terms , clause + , annex * , references ? }
17
11
  section-title = element title { text }
18
12
  content = element content { Content-Section }
@@ -40,7 +34,7 @@ grammar { start = iso-standard
40
34
  formula = element formula { attribute id { xsd:ID } , stem , dl ? }
41
35
  quote = element quote { attribute id { xsd:ID } , attribute alignment { Alignments } ? , quote-source ? , quote-author ? , paragraph-with-footnote + }
42
36
  quote-source = element source { CitationType }
43
- quote-author = element author { CreatorInfo }
37
+ quote-author = element author { ContributorInfo }
44
38
  sourcecode = element sourcecode { attribute id { xsd:ID } , tname ? , ( text | callout ) + , annotation * }
45
39
  table = element table { attribute id { xsd:ID } , tname ? , thead ? , tbody , tfoot ? , table-note * , dl ? }
46
40
  tname = element name { text }
@@ -79,18 +73,24 @@ grammar { start = iso-standard
79
73
  dl = element dl { attribute id { xsd:ID } , ( dt , dd ) + }
80
74
  dt = element dt { TextElement }
81
75
  dd = element dd { BasicBlock }
82
- creator = element creator { attribute role { text } , technical-committee , subcommittee ? , workgroup ? , secretariat ? }
83
- CreatorInfo = attribute role { text } , fullname ? , affiliation ? , person-identifier * publisher = element publisher { CreatorInfo }
84
- role = element role { attribute type { ( "author" | "edition" | "publisher" | "custom" ) } ? , attribute name { text } , text }
85
- fullname = element fullname { prefix * , forename * , initial * , surname , addition * }
86
- prefix = element prefix { text }
87
- initial = element initial { text }
88
- addition = element addition { text }
89
- surname = element surname { text }
90
- forename = element forename { text }
91
- affiliation = element affiliation { Organization }
92
- Organization = orgname , uri ? , address ? , org-identifier * orgname = element name { text }
76
+ LocalizedString = attribute language { text } ? , attribute script { text } ? , text FormattedString = attribute format { ( "plain" | "html" | "docbook" | "tei" | "asciidoc" | "markdown" ) } , LocalizedStringOrXsAny LocalizedStringOrXsAny = attribute language { text } ? , attribute script { text } ? , ( text | Any ) + contributor = element contributor { role * , ContributorInfo }
77
+ role = element role { attribute type { ( "author" | "edition" | "publisher" | text ) } ? , roledescription * }
78
+ ContributorInfo = ( person | organization ) roledescription = element description { FormattedString }
79
+ person = element person { fullname ? , affiliation * , person-identifier * , contact * , uri ? }
80
+ fullname = element name { prefix * , forename * , initial * , surname , addition * }
81
+ prefix = element prefix { LocalizedString }
82
+ initial = element initial { LocalizedString }
83
+ addition = element addition { LocalizedString }
84
+ surname = element surname { LocalizedString }
85
+ forename = element forename { LocalizedString }
86
+ affiliation = element affiliation { affiliationname ? , affiliationdescription * , organization }
87
+ affiliationname = element name { LocalizedString }
88
+ affiliationdescription = element description { FormattedString }
89
+ organization = element organization { orgname , uri ? , org-identifier * , contact * , technical-committee ? , subcommittee ? , workgroup ? , secretariat ? }
90
+ orgname = element name { LocalizedString }
93
91
  uri = element uri { xsd:anyURI }
92
+ contact = ( address | phone | email | uri ) phone = element phone { text }
93
+ email = element email { text }
94
94
  address = element address { street + , city , state ? , country , postcode ? }
95
95
  street = element street { text }
96
96
  city = element city { text }
@@ -101,21 +101,25 @@ grammar { start = iso-standard
101
101
  org-identifier = element identifier { attribute type { ( "orcid" | "uri" ) } , text }
102
102
  citation = element citation { CitationType }
103
103
  CitationType = attribute bibitemid { xsd:IDREF } , locality * , date ? date = element date { ( xsd:gYear | xsd:date ) }
104
- locality = element locality { attribute type { ( "section" | "clause" | "part" | "paragraph" | "chapter" | "page" | "whole" ) } , text }
105
- bibitem = element bibitem { BibliographicItem }
106
- BibliographicItem = attribute id { xsd:ID } , attribute type { "article" | "book" | "booklet" | "conference" | "manual" | "proceedings" | "presentation" | "thesis" | "techreport" | "standard" | "unpublished" } ? , ( bname | formatted ) , source ? , publishdate ? , docidentifier * , accesseddate ? , creator * , publisher * , edition ? , biblionote * , partof * , creationdate ? , language * , script * , abstract ? bname = element name { text }
107
- formatted = element formatted { TextElement + }
104
+ locality = element locality { attribute type { ( "section" | "clause" | "part" | "paragraph" | "chapter" | "page" | "whole" ) } , localityreference * }
105
+ localityreference = element reference { text }
106
+ bibitem = element bibitem { attribute id { xsd:ID } , BibliographicItem }
107
+ BibliographicItem = attribute type { "article" | "book" | "booklet" | "conference" | "manual" | "proceedings" | "presentation" | "thesis" | "techreport" | "standard" | "unpublished" } ? , ( btitle + | formattedref ) , source ? , docidentifier * , bdate * , contributor * , edition ? , biblionote * , partof * , language * , script * , abstract ? , status ? , copyright ? btitle = element title { text | ( title-intro ? , title-main , title-part ? ) }
108
+ formattedref = element formattedref { TextElement + }
108
109
  source = element source { xsd:anyURI }
109
- publishdate = element publishdate { text }
110
- docidentifier = element docidentifier { text }
111
- accesseddate = element accesseddate { text }
112
- creationdate = element creationdate { text }
113
- biblionote = element note { text }
114
- abstract = element abstract { text }
110
+ bdate = element date { attribute type { ( "published" | "accessed" | "created" | "activated" | "obsoleted" ) } , ( xsd:gYear | xsd:date ) }
111
+ docidentifier = element docidentifier { ( text | documentnumber | tc-documentnumber ) }
112
+ biblionote = element note { FormattedString }
113
+ abstract = element abstract { FormattedString }
115
114
  partof = element partof { BibliographicItem }
116
- iso-standard = element iso-standard { title + , status , creator , language , script , type , id , version ? , copyright , sections }
115
+ copyright = element copyright { from , to ? , owner }
116
+ from = element from { xsd:gYear }
117
+ to = element to { xsd:gYear }
118
+ owner = element owner { ContributorInfo }
119
+ Anycontents = mixed { ( attribute * { text } | Any ) * }
120
+ Any = element * { Anycontents }
121
+ iso-standard = element iso-standard { bibdata , version ? , sections + }
117
122
  draft = element draft { text }
118
- owner-affiliation = element affiliation { "ISO" }
119
123
  stage = element stage { ( "00" | "10" | "20" | "30" | "40" | "50" | "60" | "90" | "95" ) }
120
124
  substage = element substage { ( "00" | "20" | "60" | "90" | "92" | "93" | "98" | "99" ) }
121
125
  documentnumber = element project-number { attribute part { xsd:int } ? , xsd:int }
@@ -164,11 +168,6 @@ grammar { start = iso-standard
164
168
 
165
169
 
166
170
 
167
-
168
-
169
-
170
-
171
-
172
171
 
173
172
 
174
173
 
@@ -1,997 +1,589 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar ns="http://riboseinc.com/isoxml" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <start>
4
- <ref name="iso-standard"/>
5
- </start>
6
- <define name="standard-document">
7
- <element name="standard-document">
8
- <oneOrMore>
9
- <ref name="title"/>
10
- </oneOrMore>
11
- <ref name="status"/>
12
- <zeroOrMore>
13
- <ref name="creator"/>
14
- </zeroOrMore>
15
- <ref name="language"/>
16
- <ref name="script"/>
17
- <optional>
18
- <ref name="type"/>
19
- </optional>
20
- <zeroOrMore>
21
- <ref name="id"/>
22
- </zeroOrMore>
23
- <optional>
24
- <ref name="version"/>
25
- </optional>
26
- <ref name="copyright"/>
27
- <oneOrMore>
28
- <ref name="sections"/>
29
- </oneOrMore>
30
- </element>
31
- </define>
32
- <define name="title">
33
- <element name="title">
34
- <attribute name="language"/>
35
- <optional>
36
- <ref name="title-intro"/>
37
- </optional>
38
- <ref name="title-main"/>
39
- <optional>
40
- <ref name="title-part"/>
41
- </optional>
42
- </element>
43
- </define>
44
- <define name="status">
45
- <element name="status">
46
- <ref name="stage"/>
3
+ <include href="isodoc.rng">
4
+ <start>
5
+ <ref name="iso-standard"/>
6
+ </start>
7
+ <define name="language">
8
+ <element name="language">
9
+ <choice>
10
+ <value>en</value>
11
+ <value>fr</value>
12
+ </choice>
13
+ </element>
14
+ </define>
15
+ <define name="script">
16
+ <element name="script">
17
+ <value>Latn</value>
18
+ </element>
19
+ </define>
20
+ <!-- draft into isodoc? To replace version/version? -->
21
+ <define name="version">
22
+ <element name="version">
23
+ <optional>
24
+ <ref name="edition"/>
25
+ </optional>
26
+ <optional>
27
+ <ref name="revision-date"/>
28
+ </optional>
29
+ <optional>
30
+ <ref name="draft"/>
31
+ </optional>
32
+ </element>
33
+ </define>
34
+ <!-- add type to docidentifier in isodoc? -->
35
+ <define name="docidentifier">
36
+ <element name="docidentifier">
37
+ <choice>
38
+ <text/>
39
+ <group>
40
+ <ref name="documentnumber"/>
41
+ <optional>
42
+ <ref name="tc-documentnumber"/>
43
+ </optional>
44
+ </group>
45
+ </choice>
46
+ </element>
47
+ </define>
48
+ <define name="organization">
49
+ <element name="organization">
50
+ <ref name="orgname"/>
51
+ <optional>
52
+ <ref name="uri"/>
53
+ </optional>
54
+ <zeroOrMore>
55
+ <ref name="org-identifier"/>
56
+ </zeroOrMore>
57
+ <zeroOrMore>
58
+ <ref name="contact"/>
59
+ </zeroOrMore>
60
+ <optional>
61
+ <ref name="technical-committee"/>
62
+ </optional>
63
+ <optional>
64
+ <ref name="subcommittee"/>
65
+ </optional>
66
+ <optional>
67
+ <ref name="workgroup"/>
68
+ </optional>
69
+ <optional>
70
+ <ref name="secretariat"/>
71
+ </optional>
72
+ </element>
73
+ </define>
74
+ <define name="BibliographicItem">
47
75
  <optional>
48
- <ref name="substage"/>
76
+ <attribute name="type">
77
+ <ref name="BibItemType"/>
78
+ </attribute>
49
79
  </optional>
50
- </element>
51
- </define>
52
- <define name="language">
53
- <element name="language">
54
- <choice>
55
- <value>en</value>
56
- <value>fr</value>
57
- </choice>
58
- </element>
59
- </define>
60
- <define name="script">
61
- <element name="script">
62
- <value>latn</value>
63
- </element>
64
- </define>
65
- <define name="type">
66
- <element name="type">
67
80
  <choice>
68
- <value>international-standard</value>
69
- <value>technical-specification</value>
70
- <value>technical-report</value>
71
- <value>publicly-available-specification</value>
72
- <value>international-workshop-agreement</value>
73
- <value>guide</value>
81
+ <oneOrMore>
82
+ <ref name="btitle"/>
83
+ </oneOrMore>
84
+ <ref name="formattedref"/>
74
85
  </choice>
75
- </element>
76
- </define>
77
- <define name="id">
78
- <element name="id">
79
- <ref name="documentnumber"/>
80
86
  <optional>
81
- <ref name="tc-documentnumber"/>
87
+ <ref name="source"/>
82
88
  </optional>
83
- </element>
84
- </define>
85
- <define name="version">
86
- <element name="version">
89
+ <zeroOrMore>
90
+ <ref name="docidentifier"/>
91
+ </zeroOrMore>
92
+ <zeroOrMore>
93
+ <ref name="bdate"/>
94
+ </zeroOrMore>
95
+ <zeroOrMore>
96
+ <ref name="contributor"/>
97
+ </zeroOrMore>
87
98
  <optional>
88
99
  <ref name="edition"/>
89
100
  </optional>
90
- <optional>
91
- <ref name="revision-date"/>
92
- </optional>
93
- <optional>
94
- <ref name="draft"/>
95
- </optional>
96
- </element>
97
- </define>
98
- <define name="edition">
99
- <element name="edition">
100
- <data type="int"/>
101
- </element>
102
- </define>
103
- <define name="revision-date">
104
- <element name="revision-date">
105
- <data type="date"/>
106
- </element>
107
- </define>
108
- <define name="copyright">
109
- <element name="copyright">
110
- <ref name="from"/>
111
- <ref name="owner"/>
112
- </element>
113
- </define>
114
- <define name="from">
115
- <element name="from">
116
- <data type="gYear"/>
117
- </element>
118
- </define>
119
- <define name="to">
120
- <element name="to">
121
- <data type="gYear"/>
122
- </element>
123
- </define>
124
- <define name="owner">
125
- <element name="owner">
126
- <ref name="owner-affiliation"/>
127
- </element>
128
- </define>
129
- <define name="sections">
130
- <element name="sections">
131
- <ref name="content"/>
132
- <optional>
133
- <ref name="content"/>
134
- </optional>
135
- <ref name="clause"/>
136
- <ref name="references"/>
137
- <ref name="terms"/>
138
- <oneOrMore>
139
- <ref name="clause"/>
140
- </oneOrMore>
141
101
  <zeroOrMore>
142
- <ref name="annex"/>
102
+ <ref name="biblionote"/>
103
+ </zeroOrMore>
104
+ <zeroOrMore>
105
+ <ref name="partof"/>
106
+ </zeroOrMore>
107
+ <zeroOrMore>
108
+ <ref name="language"/>
109
+ </zeroOrMore>
110
+ <zeroOrMore>
111
+ <ref name="script"/>
143
112
  </zeroOrMore>
144
113
  <optional>
145
- <ref name="references"/>
114
+ <ref name="abstract"/>
146
115
  </optional>
147
- </element>
148
- </define>
149
- <define name="section-title">
150
- <element name="title">
151
- <text/>
152
- </element>
153
- </define>
154
- <define name="content">
155
- <element name="content">
156
- <ref name="Content-Section"/>
157
- </element>
158
- </define>
159
- <define name="content-subsection">
160
- <element name="subsection">
161
- <ref name="Content-Section"/>
162
- </element>
163
- </define>
164
- <define name="Content-Section">
165
- <optional>
166
- <attribute name="id">
167
- <data type="ID"/>
168
- </attribute>
169
- </optional>
170
- <optional>
171
- <ref name="section-title"/>
172
- </optional>
173
- <choice>
174
- <oneOrMore>
175
- <ref name="BasicBlock"/>
176
- </oneOrMore>
177
- <oneOrMore>
178
- <ref name="content-subsection"/>
179
- </oneOrMore>
180
- </choice>
181
- </define>
182
- <define name="clause">
183
- <element name="clause">
184
- <ref name="Clause-Section"/>
185
- </element>
186
- </define>
187
- <define name="Clause-Section">
188
- <optional>
189
- <attribute name="id">
190
- <data type="ID"/>
191
- </attribute>
192
- </optional>
193
- <optional>
194
- <attribute name="inline-header">
195
- <data type="boolean"/>
196
- </attribute>
197
- </optional>
198
- <optional>
199
- <ref name="section-title"/>
200
- </optional>
201
- <choice>
202
- <oneOrMore>
203
- <ref name="BasicBlock"/>
204
- </oneOrMore>
205
- <oneOrMore>
206
- <ref name="clause-subsection"/>
207
- </oneOrMore>
208
- </choice>
209
- </define>
210
- <define name="clause-subsection">
211
- <element name="subsection">
212
- <ref name="Clause-Section"/>
213
- </element>
214
- </define>
215
- <define name="annex">
216
- <element name="annex">
217
116
  <optional>
218
- <attribute name="id">
219
- <data type="ID"/>
220
- </attribute>
117
+ <ref name="status"/>
221
118
  </optional>
222
119
  <optional>
223
- <attribute name="inline-header">
224
- <data type="boolean"/>
225
- </attribute>
120
+ <ref name="copyright"/>
226
121
  </optional>
227
122
  <optional>
228
- <attribute name="subtype">
229
- <choice>
230
- <value>normative</value>
231
- <value>informative</value>
232
- </choice>
233
- </attribute>
123
+ <ref name="editorialgroup"/>
234
124
  </optional>
125
+ </define>
126
+ <define name="BibData">
235
127
  <optional>
236
- <ref name="section-title"/>
128
+ <attribute name="type">
129
+ <ref name="BibItemType"/>
130
+ </attribute>
237
131
  </optional>
238
- <zeroOrMore>
239
- <ref name="BasicBlock"/>
240
- </zeroOrMore>
241
- <zeroOrMore>
242
- <ref name="clause-hanging-paragraph-with-footnote"/>
243
- </zeroOrMore>
244
- </element>
245
- </define>
246
- <define name="references">
247
- <element name="references">
132
+ <oneOrMore>
133
+ <ref name="btitle"/>
134
+ </oneOrMore>
248
135
  <optional>
249
- <attribute name="id">
250
- <data type="ID"/>
251
- </attribute>
136
+ <ref name="formattedref"/>
252
137
  </optional>
253
138
  <optional>
254
- <ref name="section-title"/>
139
+ <ref name="source"/>
255
140
  </optional>
256
141
  <zeroOrMore>
257
- <ref name="bibitem"/>
142
+ <ref name="docidentifier"/>
258
143
  </zeroOrMore>
259
144
  <zeroOrMore>
260
- <ref name="references"/>
145
+ <ref name="bdate"/>
261
146
  </zeroOrMore>
262
- </element>
263
- </define>
264
- <define name="terms">
265
- <element name="terms">
266
- <optional>
267
- <attribute name="id">
268
- <data type="ID"/>
269
- </attribute>
270
- </optional>
271
- <optional>
272
- <ref name="section-title"/>
273
- </optional>
274
147
  <zeroOrMore>
275
- <ref name="paragraph-with-footnote"/>
148
+ <ref name="contributor"/>
276
149
  </zeroOrMore>
277
150
  <optional>
278
- <ref name="ul"/>
279
- </optional>
280
- <choice>
281
- <oneOrMore>
282
- <ref name="term"/>
283
- </oneOrMore>
284
- <optional>
285
- <ref name="terms"/>
286
- </optional>
287
- </choice>
288
- </element>
289
- </define>
290
- <define name="term">
291
- <element name="term">
292
- <optional>
293
- <attribute name="id">
294
- <data type="ID"/>
295
- </attribute>
151
+ <ref name="edition"/>
296
152
  </optional>
297
- <ref name="preferred"/>
298
- <zeroOrMore>
299
- <ref name="admitted"/>
300
- </zeroOrMore>
301
153
  <zeroOrMore>
302
- <ref name="deprecates"/>
154
+ <ref name="biblionote"/>
303
155
  </zeroOrMore>
304
- <optional>
305
- <ref name="termdomain"/>
306
- </optional>
307
- <ref name="definition"/>
308
156
  <zeroOrMore>
309
- <ref name="termnote"/>
157
+ <ref name="partof"/>
310
158
  </zeroOrMore>
311
159
  <zeroOrMore>
312
- <ref name="termexample"/>
160
+ <ref name="language"/>
313
161
  </zeroOrMore>
314
162
  <zeroOrMore>
315
- <ref name="termsource"/>
163
+ <ref name="script"/>
316
164
  </zeroOrMore>
317
- </element>
318
- </define>
319
- <define name="preferred">
320
- <element name="preferred">
321
- <oneOrMore>
322
- <ref name="TextElement"/>
323
- </oneOrMore>
324
- </element>
325
- </define>
326
- <define name="admitted">
327
- <element name="admitted">
328
- <oneOrMore>
329
- <ref name="TextElement"/>
330
- </oneOrMore>
331
- </element>
332
- </define>
333
- <define name="deprecates">
334
- <element name="deprecates">
335
- <oneOrMore>
336
- <ref name="TextElement"/>
337
- </oneOrMore>
338
- </element>
339
- </define>
340
- <define name="termdomain">
341
- <element name="domain">
342
- <oneOrMore>
343
- <ref name="TextElement"/>
344
- </oneOrMore>
345
- </element>
346
- </define>
347
- <define name="definition">
348
- <element name="definition">
349
- <oneOrMore>
350
- <choice>
351
- <ref name="paragraph"/>
352
- <ref name="figure"/>
353
- <ref name="formula"/>
354
- </choice>
355
- </oneOrMore>
356
- </element>
357
- </define>
358
- <define name="termnote">
359
- <element name="termnote">
360
- <attribute name="id">
361
- <data type="ID"/>
362
- </attribute>
363
- <ref name="paragraph"/>
364
- </element>
365
- </define>
366
- <define name="termexample">
367
- <element name="termexample">
368
- <attribute name="id">
369
- <data type="ID"/>
370
- </attribute>
371
- <ref name="BasicBlock"/>
372
- </element>
373
- </define>
374
- <define name="termsource">
375
- <element name="termsource">
376
- <attribute name="status">
377
- <choice>
378
- <value>identical</value>
379
- <value>modified</value>
380
- </choice>
381
- </attribute>
382
- <ref name="origin"/>
383
165
  <optional>
384
- <ref name="modification"/>
166
+ <ref name="abstract"/>
385
167
  </optional>
386
- </element>
387
- </define>
388
- <define name="origin">
389
- <element name="origin">
390
- <attribute name="citeas"/>
391
- <ref name="CitationType"/>
392
- </element>
393
- </define>
394
- <define name="modification">
395
- <element name="modification">
396
- <ref name="paragraph"/>
397
- </element>
398
- </define>
399
- <define name="BasicBlock">
400
- <choice>
401
- <ref name="paragraph-with-footnote"/>
402
- <ref name="table"/>
403
- <ref name="note"/>
404
- <ref name="formula"/>
405
- <ref name="admonition"/>
406
- <ref name="ol"/>
407
- <ref name="ul"/>
408
- <ref name="dl"/>
409
- <ref name="figure"/>
410
- <ref name="quote"/>
411
- <ref name="sourcecode"/>
412
- <ref name="example"/>
413
- </choice>
414
- </define>
415
- <define name="paragraph">
416
- <element name="p">
417
- <ref name="ParagraphType"/>
418
- </element>
419
- </define>
420
- <define name="Alignments">
421
- <choice>
422
- <value>left</value>
423
- <value>right</value>
424
- <value>center</value>
425
- <value>justified</value>
426
- </choice>
427
- </define>
428
- <define name="ParagraphType">
429
- <attribute name="id">
430
- <data type="ID"/>
431
- </attribute>
432
- <optional>
433
- <attribute name="align">
434
- <ref name="Alignments"/>
435
- </attribute>
436
- </optional>
437
- <zeroOrMore>
438
- <ref name="TextElement"/>
439
- </zeroOrMore>
440
- <zeroOrMore>
441
- <ref name="review"/>
442
- </zeroOrMore>
443
- </define>
444
- <define name="paragraph-with-footnote">
445
- <element name="p">
446
- <attribute name="id">
447
- <data type="ID"/>
448
- </attribute>
449
168
  <optional>
450
- <attribute name="align">
451
- <ref name="Alignments"/>
452
- </attribute>
169
+ <ref name="status"/>
453
170
  </optional>
454
- <zeroOrMore>
171
+ <ref name="copyright"/>
172
+ <ref name="editorialgroup"/>
173
+ </define>
174
+ <define name="bdate">
175
+ <element name="date">
176
+ <attribute name="type">
177
+ <choice>
178
+ <value>published</value>
179
+ <value>accessed</value>
180
+ <value>created</value>
181
+ <value>activated</value>
182
+ <value>obsoleted</value>
183
+ </choice>
184
+ </attribute>
455
185
  <choice>
456
- <ref name="TextElement"/>
457
- <ref name="fn"/>
458
- </choice>
459
- </zeroOrMore>
460
- <zeroOrMore>
461
- <ref name="review"/>
462
- </zeroOrMore>
463
- </element>
464
- </define>
465
- <define name="note">
466
- <element name="note">
467
- <attribute name="id">
468
- <data type="ID"/>
469
- </attribute>
470
- <oneOrMore>
471
- <ref name="paragraph-with-footnote"/>
472
- </oneOrMore>
473
- </element>
474
- </define>
475
- <define name="review">
476
- <element name="review">
477
- <attribute name="id">
478
- <data type="ID"/>
479
- </attribute>
480
- <optional>
481
- <attribute name="reviewer"/>
482
- </optional>
483
- <optional>
484
- <attribute name="date">
186
+ <data type="gYear"/>
485
187
  <data type="date"/>
486
- </attribute>
487
- </optional>
488
- <attribute name="from">
489
- <data type="ID"/>
490
- </attribute>
491
- <attribute name="to">
492
- <data type="ID"/>
493
- </attribute>
494
- <oneOrMore>
495
- <ref name="paragraph"/>
496
- </oneOrMore>
497
- </element>
498
- </define>
499
- <define name="formula">
500
- <element name="formula">
501
- <attribute name="id">
502
- <data type="ID"/>
503
- </attribute>
504
- <ref name="stem"/>
505
- <optional>
506
- <ref name="dl"/>
507
- </optional>
508
- </element>
509
- </define>
510
- <define name="quote">
511
- <element name="quote">
512
- <attribute name="id">
513
- <data type="ID"/>
514
- </attribute>
515
- <optional>
516
- <attribute name="alignment">
517
- <ref name="Alignments"/>
518
- </attribute>
519
- </optional>
520
- <optional>
521
- <ref name="quote-source"/>
522
- </optional>
523
- <optional>
524
- <ref name="quote-author"/>
525
- </optional>
526
- <oneOrMore>
527
- <ref name="paragraph-with-footnote"/>
528
- </oneOrMore>
529
- </element>
530
- </define>
531
- <define name="quote-source">
532
- <element name="source">
533
- <ref name="CitationType"/>
534
- </element>
535
- </define>
536
- <define name="quote-author">
537
- <element name="author">
538
- <ref name="CreatorInfo"/>
539
- </element>
540
- </define>
541
- <define name="sourcecode">
542
- <element name="sourcecode">
543
- <attribute name="id">
544
- <data type="ID"/>
545
- </attribute>
546
- <optional>
547
- <ref name="tname"/>
548
- </optional>
549
- <oneOrMore>
188
+ <value>--</value>
189
+ </choice>
190
+ </element>
191
+ </define>
192
+ <define name="biblionote">
193
+ <element name="note">
194
+ <optional>
195
+ <!-- Biblio date notes can be footnoted -->
196
+ <attribute name="reference"/>
197
+ </optional>
198
+ <ref name="FormattedString"/>
199
+ </element>
200
+ </define>
201
+ <define name="status">
202
+ <element name="status">
550
203
  <choice>
551
- <text/>
552
- <ref name="callout"/>
204
+ <ref name="FormattedString"/>
205
+ <group>
206
+ <ref name="stage"/>
207
+ <optional>
208
+ <ref name="substage"/>
209
+ </optional>
210
+ </group>
553
211
  </choice>
554
- </oneOrMore>
555
- <zeroOrMore>
556
- <ref name="annotation"/>
557
- </zeroOrMore>
558
- </element>
559
- </define>
560
- <define name="table">
561
- <element name="table">
562
- <attribute name="id">
563
- <data type="ID"/>
564
- </attribute>
565
- <optional>
566
- <ref name="tname"/>
567
- </optional>
568
- <optional>
569
- <ref name="thead"/>
570
- </optional>
571
- <ref name="tbody"/>
572
- <optional>
573
- <ref name="tfoot"/>
574
- </optional>
575
- <zeroOrMore>
576
- <ref name="table-note"/>
577
- </zeroOrMore>
578
- <optional>
579
- <ref name="dl"/>
580
- </optional>
581
- </element>
582
- </define>
583
- <define name="tname">
584
- <element name="name">
585
- <text/>
586
- </element>
587
- </define>
588
- <define name="thead">
589
- <element name="thead">
590
- <oneOrMore>
591
- <ref name="tr"/>
592
- </oneOrMore>
593
- </element>
594
- </define>
595
- <define name="tfoot">
596
- <element name="tfoot">
597
- <ref name="tr"/>
598
- </element>
599
- </define>
600
- <define name="tbody">
601
- <element name="tbody">
602
- <oneOrMore>
603
- <ref name="tr"/>
604
- </oneOrMore>
605
- </element>
606
- </define>
607
- <define name="table-note">
608
- <element name="note">
609
- <optional>
610
- <attribute name="id">
611
- <data type="ID"/>
612
- </attribute>
613
- </optional>
614
- <ref name="paragraph"/>
615
- </element>
616
- </define>
617
- <define name="tr">
618
- <element name="tr">
619
- <oneOrMore>
212
+ </element>
213
+ </define>
214
+ <define name="btitle">
215
+ <element name="title">
620
216
  <choice>
621
- <ref name="td"/>
622
- <ref name="th"/>
217
+ <ref name="FormattedString"/>
218
+ <group>
219
+ <optional>
220
+ <ref name="title-intro"/>
221
+ </optional>
222
+ <ref name="title-main"/>
223
+ <optional>
224
+ <ref name="title-part"/>
225
+ </optional>
226
+ </group>
623
227
  </choice>
624
- </oneOrMore>
625
- </element>
626
- </define>
627
- <define name="td">
628
- <element name="td">
629
- <optional>
630
- <attribute name="colspan"/>
631
- </optional>
632
- <optional>
633
- <attribute name="rowspan"/>
634
- </optional>
635
- <optional>
636
- <attribute name="align">
228
+ </element>
229
+ </define>
230
+ <define name="sections">
231
+ <element name="sections">
232
+ <ref name="clause"/>
233
+ <ref name="terms"/>
234
+ <oneOrMore>
235
+ <ref name="clause"/>
236
+ </oneOrMore>
237
+ </element>
238
+ </define>
239
+ <define name="references">
240
+ <element name="references">
241
+ <optional>
242
+ <attribute name="id">
243
+ <data type="ID"/>
244
+ </attribute>
245
+ </optional>
246
+ <optional>
247
+ <ref name="section-title"/>
248
+ </optional>
249
+ <zeroOrMore>
250
+ <ref name="bibitem"/>
251
+ </zeroOrMore>
252
+ <zeroOrMore>
253
+ <ref name="references"/>
254
+ </zeroOrMore>
255
+ </element>
256
+ </define>
257
+ <define name="terms">
258
+ <element name="terms">
259
+ <optional>
260
+ <attribute name="id">
261
+ <data type="ID"/>
262
+ </attribute>
263
+ </optional>
264
+ <optional>
265
+ <ref name="section-title"/>
266
+ </optional>
267
+ <zeroOrMore>
268
+ <!-- boilerplate -->
269
+ <ref name="paragraph-with-footnote"/>
270
+ </zeroOrMore>
271
+ <optional>
272
+ <ref name="ul"/>
273
+ </optional>
274
+ <choice>
275
+ <oneOrMore>
276
+ <ref name="term"/>
277
+ </oneOrMore>
278
+ <optional>
279
+ <ref name="terms"/>
280
+ </optional>
281
+ </choice>
282
+ </element>
283
+ </define>
284
+ <define name="term">
285
+ <element name="term">
286
+ <optional>
287
+ <attribute name="id">
288
+ <data type="ID"/>
289
+ </attribute>
290
+ </optional>
291
+ <ref name="preferred"/>
292
+ <zeroOrMore>
293
+ <ref name="admitted"/>
294
+ </zeroOrMore>
295
+ <zeroOrMore>
296
+ <ref name="deprecates"/>
297
+ </zeroOrMore>
298
+ <optional>
299
+ <ref name="termdomain"/>
300
+ </optional>
301
+ <ref name="definition"/>
302
+ <zeroOrMore>
303
+ <ref name="termnote"/>
304
+ </zeroOrMore>
305
+ <zeroOrMore>
306
+ <ref name="termexample"/>
307
+ </zeroOrMore>
308
+ <zeroOrMore>
309
+ <ref name="termsource"/>
310
+ </zeroOrMore>
311
+ </element>
312
+ </define>
313
+ <define name="definition">
314
+ <element name="definition">
315
+ <oneOrMore>
637
316
  <choice>
638
- <value>left</value>
639
- <value>right</value>
640
- <value>center</value>
317
+ <ref name="paragraph"/>
318
+ <ref name="figure"/>
319
+ <ref name="formula"/>
641
320
  </choice>
321
+ </oneOrMore>
322
+ </element>
323
+ </define>
324
+ <define name="annex">
325
+ <element name="annex">
326
+ <optional>
327
+ <attribute name="id">
328
+ <data type="ID"/>
329
+ </attribute>
330
+ </optional>
331
+ <optional>
332
+ <attribute name="inline-header">
333
+ <data type="boolean"/>
334
+ </attribute>
335
+ </optional>
336
+ <optional>
337
+ <attribute name="subtype">
338
+ <choice>
339
+ <value>normative</value>
340
+ <value>informative</value>
341
+ </choice>
342
+ </attribute>
343
+ </optional>
344
+ <optional>
345
+ <ref name="section-title"/>
346
+ </optional>
347
+ <zeroOrMore>
348
+ <!--
349
+ allow hanging paragraps in annexes: they introduce lists
350
+ ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | figure | quote | sourcecode | review | example )*,
351
+ -->
352
+ <ref name="BasicBlock"/>
353
+ </zeroOrMore>
354
+ <zeroOrMore>
355
+ <ref name="note"/>
356
+ </zeroOrMore>
357
+ <zeroOrMore>
358
+ <ref name="clause-hanging-paragraph-with-footnote"/>
359
+ </zeroOrMore>
360
+ </element>
361
+ </define>
362
+ <define name="figure">
363
+ <element name="figure">
364
+ <attribute name="id">
365
+ <data type="ID"/>
642
366
  </attribute>
643
- </optional>
644
- <choice>
367
+ <optional>
368
+ <ref name="tname"/>
369
+ </optional>
370
+ <choice>
371
+ <ref name="image"/>
372
+ <oneOrMore>
373
+ <ref name="figure"/>
374
+ </oneOrMore>
375
+ </choice>
645
376
  <zeroOrMore>
646
- <choice>
647
- <ref name="TextElement"/>
648
- <ref name="fn"/>
649
- <ref name="review"/>
650
- </choice>
377
+ <ref name="fn"/>
378
+ </zeroOrMore>
379
+ <optional>
380
+ <ref name="dl"/>
381
+ </optional>
382
+ <zeroOrMore>
383
+ <ref name="note"/>
651
384
  </zeroOrMore>
385
+ </element>
386
+ </define>
387
+ <define name="li">
388
+ <element name="li">
652
389
  <oneOrMore>
653
- <ref name="paragraph-with-footnote"/>
390
+ <!-- ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | quote | sourcecode | review | example )+ -->
391
+ <ref name="BasicBlock"/>
654
392
  </oneOrMore>
655
- </choice>
656
- </element>
657
- </define>
658
- <define name="th">
659
- <element name="th">
660
- <optional>
661
- <attribute name="colspan"/>
662
- </optional>
663
- <optional>
664
- <attribute name="rowspan"/>
665
- </optional>
666
- <optional>
667
- <attribute name="align">
668
- <choice>
669
- <value>left</value>
670
- <value>right</value>
671
- <value>center</value>
672
- </choice>
393
+ <!-- exclude figures? -->
394
+ </element>
395
+ </define>
396
+ <define name="dd">
397
+ <element name="dd">
398
+ <!--
399
+ ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | quote | sourcecode | review | example )*
400
+ exclude figures?
401
+ -->
402
+ <ref name="BasicBlock"/>
403
+ </element>
404
+ </define>
405
+ <define name="admonition">
406
+ <element name="admonition">
407
+ <attribute name="id">
408
+ <data type="ID"/>
673
409
  </attribute>
674
- </optional>
675
- <choice>
676
- <zeroOrMore>
410
+ <attribute name="type">
677
411
  <choice>
678
- <ref name="TextElement"/>
679
- <ref name="fn"/>
680
- <ref name="review"/>
412
+ <value>danger</value>
413
+ <value>caution</value>
414
+ <value>warning</value>
415
+ <value>important</value>
416
+ <value>safety precautions</value>
681
417
  </choice>
682
- </zeroOrMore>
418
+ </attribute>
683
419
  <oneOrMore>
684
420
  <ref name="paragraph-with-footnote"/>
685
421
  </oneOrMore>
686
- </choice>
687
- </element>
688
- </define>
689
- <define name="example">
690
- <element name="example">
691
- <attribute name="id">
692
- <data type="ID"/>
693
- </attribute>
694
- <oneOrMore>
695
- <choice>
696
- <ref name="formula"/>
697
- <ref name="ul"/>
698
- <ref name="ol"/>
699
- <ref name="dl"/>
700
- <ref name="quote"/>
701
- <ref name="sourcecode"/>
702
- <ref name="paragraph-with-footnote"/>
703
- <ref name="review"/>
704
- </choice>
705
- </oneOrMore>
706
- </element>
707
- </define>
708
- <define name="admonition">
709
- <element name="admonition">
710
- <attribute name="id">
711
- <data type="ID"/>
712
- </attribute>
713
- <attribute name="type">
714
- <choice>
715
- <value>danger</value>
716
- <value>caution</value>
717
- <value>warning</value>
718
- <value>important</value>
719
- <value>safety precautions</value>
720
- </choice>
721
- </attribute>
722
- <oneOrMore>
723
- <ref name="paragraph-with-footnote"/>
724
- </oneOrMore>
725
- </element>
726
- </define>
727
- <define name="figure">
728
- <element name="figure">
729
- <attribute name="id">
730
- <data type="ID"/>
731
- </attribute>
732
- <optional>
733
- <ref name="tname"/>
734
- </optional>
735
- <choice>
736
- <ref name="image"/>
737
- <oneOrMore>
738
- <ref name="figure"/>
739
- </oneOrMore>
740
- </choice>
741
- <zeroOrMore>
742
- <ref name="fn"/>
743
- </zeroOrMore>
744
- <optional>
745
- <ref name="dl"/>
746
- </optional>
747
- <zeroOrMore>
748
- <ref name="note"/>
749
- </zeroOrMore>
750
- </element>
751
- </define>
752
- <define name="TextElement">
753
- <choice>
754
- <text/>
755
- <ref name="em"/>
756
- <ref name="eref"/>
757
- <ref name="strong"/>
758
- <ref name="stem"/>
759
- <ref name="sub"/>
760
- <ref name="sup"/>
761
- <ref name="tt"/>
762
- <ref name="strike"/>
763
- <ref name="smallcap"/>
764
- <ref name="xref"/>
765
- <ref name="br"/>
766
- <ref name="hyperlink"/>
767
- <ref name="hr"/>
768
- <ref name="pagebreak"/>
769
- <ref name="bookmark"/>
770
- </choice>
771
- </define>
772
- <define name="em">
773
- <element name="em">
774
- <text/>
775
- </element>
776
- </define>
777
- <define name="strong">
778
- <element name="strong">
779
- <text/>
780
- </element>
781
- </define>
782
- <define name="tt">
783
- <element name="tt">
784
- <text/>
785
- </element>
786
- </define>
787
- <define name="sub">
788
- <element name="sub">
789
- <text/>
790
- </element>
791
- </define>
792
- <define name="sup">
793
- <element name="sup">
794
- <text/>
795
- </element>
796
- </define>
797
- <define name="strike">
798
- <element name="strike">
799
- <text/>
800
- </element>
801
- </define>
802
- <define name="smallcap">
803
- <element name="smallcap">
804
- <text/>
805
- </element>
806
- </define>
807
- <define name="br">
808
- <element name="br">
809
- <empty/>
810
- </element>
811
- </define>
812
- <define name="hr">
813
- <element name="hr">
814
- <empty/>
815
- </element>
816
- </define>
817
- <define name="pagebreak">
818
- <element name="pagebreak">
819
- <empty/>
820
- </element>
821
- </define>
822
- <define name="bookmark">
823
- <element name="bookmark">
824
- <attribute name="id">
825
- <data type="ID"/>
826
- </attribute>
827
- <empty/>
828
- </element>
829
- </define>
830
- <define name="ReferenceFormat">
831
- <choice>
832
- <value>external</value>
833
- <value>inline</value>
834
- <value>footnote</value>
835
- <value>callout</value>
836
- </choice>
837
- </define>
838
- <define name="eref">
839
- <element name="eref">
840
- <optional>
841
- <attribute name="normative">
842
- <data type="boolean"/>
422
+ <zeroOrMore>
423
+ <ref name="note"/>
424
+ </zeroOrMore>
425
+ </element>
426
+ </define>
427
+ <define name="xref">
428
+ <element name="xref">
429
+ <attribute name="target">
430
+ <data type="IDREF"/>
843
431
  </attribute>
844
- </optional>
845
- <attribute name="citeas"/>
846
- <attribute name="type">
847
- <ref name="ReferenceFormat"/>
848
- </attribute>
849
- <ref name="CitationType"/>
850
- <text/>
851
- </element>
852
- </define>
853
- <define name="hyperlink">
854
- <element name="link">
855
- <attribute name="target">
856
- <data type="anyURI"/>
857
- </attribute>
858
- <text/>
859
- </element>
860
- </define>
861
- <define name="xref">
862
- <element name="xref">
863
- <attribute name="target">
864
- <data type="IDREF"/>
865
- </attribute>
866
- <text/>
867
- </element>
868
- </define>
869
- <define name="fn">
870
- <element name="fn">
871
- <attribute name="reference"/>
872
- <oneOrMore>
873
- <ref name="paragraph"/>
874
- </oneOrMore>
875
- </element>
876
- </define>
877
- <define name="callout">
878
- <element name="callout">
879
- <attribute name="target">
880
- <data type="IDREF"/>
881
- </attribute>
882
- <text/>
883
- </element>
884
- </define>
885
- <define name="image">
886
- <element name="image">
887
- <attribute name="id">
888
- <data type="ID"/>
889
- </attribute>
890
- <optional>
891
- <attribute name="src">
432
+ <text/>
433
+ </element>
434
+ </define>
435
+ <define name="hyperlink">
436
+ <element name="link">
437
+ <attribute name="target">
892
438
  <data type="anyURI"/>
893
439
  </attribute>
894
- </optional>
895
- <attribute name="imagetype">
440
+ <text/>
441
+ </element>
442
+ </define>
443
+ <define name="thead">
444
+ <element name="thead">
445
+ <oneOrMore>
446
+ <ref name="tr"/>
447
+ </oneOrMore>
448
+ </element>
449
+ </define>
450
+ <define name="td">
451
+ <element name="td">
452
+ <optional>
453
+ <attribute name="colspan"/>
454
+ </optional>
455
+ <optional>
456
+ <attribute name="rowspan"/>
457
+ </optional>
458
+ <optional>
459
+ <attribute name="align">
460
+ <choice>
461
+ <value>left</value>
462
+ <value>right</value>
463
+ <value>center</value>
464
+ </choice>
465
+ </attribute>
466
+ </optional>
467
+ <choice>
468
+ <zeroOrMore>
469
+ <choice>
470
+ <ref name="TextElement"/>
471
+ <ref name="fn"/>
472
+ </choice>
473
+ </zeroOrMore>
474
+ <oneOrMore>
475
+ <ref name="paragraph-with-footnote"/>
476
+ </oneOrMore>
477
+ </choice>
478
+ </element>
479
+ </define>
480
+ <define name="th">
481
+ <element name="th">
482
+ <optional>
483
+ <attribute name="colspan"/>
484
+ </optional>
485
+ <optional>
486
+ <attribute name="rowspan"/>
487
+ </optional>
488
+ <optional>
489
+ <attribute name="align">
490
+ <choice>
491
+ <value>left</value>
492
+ <value>right</value>
493
+ <value>center</value>
494
+ </choice>
495
+ </attribute>
496
+ </optional>
896
497
  <choice>
897
- <value>SVG</value>
898
- <value>JPEG</value>
899
- <value>GIF</value>
900
- <value>PNG</value>
901
- <value>PDF</value>
498
+ <zeroOrMore>
499
+ <choice>
500
+ <ref name="TextElement"/>
501
+ <ref name="fn"/>
502
+ </choice>
503
+ </zeroOrMore>
504
+ <oneOrMore>
505
+ <ref name="paragraph-with-footnote"/>
506
+ </oneOrMore>
902
507
  </choice>
903
- </attribute>
508
+ </element>
509
+ </define>
510
+ <define name="table-note">
511
+ <element name="note">
512
+ <optional>
513
+ <attribute name="id">
514
+ <data type="ID"/>
515
+ </attribute>
516
+ </optional>
517
+ <ref name="paragraph"/>
518
+ </element>
519
+ </define>
520
+ <define name="Clause-Section">
904
521
  <optional>
905
- <attribute name="width">
906
- <data type="int"/>
522
+ <attribute name="id">
523
+ <data type="ID"/>
907
524
  </attribute>
908
525
  </optional>
909
526
  <optional>
910
- <attribute name="height">
911
- <data type="int"/>
527
+ <attribute name="inline-header">
528
+ <data type="boolean"/>
912
529
  </attribute>
913
530
  </optional>
914
- </element>
915
- </define>
916
- <define name="stem">
917
- <element name="stem">
918
- <attribute name="type">
919
- <choice>
920
- <value>MathML</value>
921
- <value>AsciiMath</value>
922
- </choice>
923
- </attribute>
924
- <text/>
925
- </element>
926
- </define>
927
- <define name="annotation">
928
- <element name="annotation">
929
- <attribute name="id">
930
- <data type="ID"/>
931
- </attribute>
932
- <ref name="paragraph"/>
933
- </element>
934
- </define>
935
- <define name="ul">
936
- <element name="ul">
937
- <attribute name="id">
938
- <data type="ID"/>
939
- </attribute>
940
- <oneOrMore>
941
- <ref name="li"/>
942
- </oneOrMore>
943
- </element>
944
- </define>
945
- <define name="li">
946
- <element name="li">
947
- <oneOrMore>
948
- <ref name="BasicBlock"/>
949
- </oneOrMore>
950
- </element>
951
- </define>
952
- <define name="ol">
953
- <element name="ol">
954
- <attribute name="id">
955
- <data type="ID"/>
956
- </attribute>
957
- <attribute name="type">
958
- <choice>
959
- <value>roman</value>
960
- <value>alphabet</value>
961
- <value>arabic</value>
962
- <value>roman_upper</value>
963
- <value>alphabet_upper</value>
964
- </choice>
965
- </attribute>
531
+ <optional>
532
+ <ref name="section-title"/>
533
+ </optional>
534
+ <choice>
535
+ <group>
536
+ <oneOrMore>
537
+ <ref name="BasicBlock"/>
538
+ </oneOrMore>
539
+ <zeroOrMore>
540
+ <ref name="note"/>
541
+ </zeroOrMore>
542
+ </group>
543
+ <oneOrMore>
544
+ <ref name="clause-subsection"/>
545
+ </oneOrMore>
546
+ </choice>
547
+ </define>
548
+ </include>
549
+ <!-- end overrides -->
550
+ <!--
551
+ We display the Normative References between scope and terms; but to keep the
552
+ grammar simple, we keep the references together
553
+ -->
554
+ <define name="iso-standard">
555
+ <element name="iso-standard">
556
+ <ref name="bibdata"/>
557
+ <optional>
558
+ <ref name="version"/>
559
+ </optional>
560
+ <ref name="foreword"/>
561
+ <optional>
562
+ <ref name="introduction"/>
563
+ </optional>
966
564
  <oneOrMore>
967
- <ref name="li"/>
565
+ <ref name="sections"/>
968
566
  </oneOrMore>
969
- </element>
970
- </define>
971
- <define name="dl">
972
- <element name="dl">
973
- <attribute name="id">
974
- <data type="ID"/>
975
- </attribute>
567
+ <zeroOrMore>
568
+ <ref name="annex"/>
569
+ </zeroOrMore>
976
570
  <oneOrMore>
977
- <ref name="dt"/>
978
- <ref name="dd"/>
571
+ <ref name="references"/>
979
572
  </oneOrMore>
980
573
  </element>
981
574
  </define>
982
- <define name="dt">
983
- <element name="dt">
984
- <ref name="TextElement"/>
985
- </element>
986
- </define>
987
- <define name="dd">
988
- <element name="dd">
989
- <ref name="BasicBlock"/>
990
- </element>
575
+ <define name="BibItemType" combine="choice">
576
+ <choice>
577
+ <value>international-standard</value>
578
+ <value>technical-specification</value>
579
+ <value>technical-report</value>
580
+ <value>publicly-available-specification</value>
581
+ <value>international-workshop-agreement</value>
582
+ <value>guide</value>
583
+ </choice>
991
584
  </define>
992
- <define name="creator">
993
- <element name="creator">
994
- <attribute name="role"/>
585
+ <define name="editorialgroup">
586
+ <element name="editorialgroup">
995
587
  <ref name="technical-committee"/>
996
588
  <optional>
997
589
  <ref name="subcommittee"/>
@@ -1004,348 +596,14 @@
1004
596
  </optional>
1005
597
  </element>
1006
598
  </define>
1007
- <define name="CreatorInfo">
1008
- <attribute name="role"/>
1009
- <optional>
1010
- <ref name="fullname"/>
1011
- </optional>
1012
- <optional>
1013
- <ref name="affiliation"/>
1014
- </optional>
1015
- <zeroOrMore>
1016
- <ref name="person-identifier"/>
1017
- </zeroOrMore>
1018
- </define>
1019
- <define name="publisher">
1020
- <element name="publisher">
1021
- <ref name="CreatorInfo"/>
1022
- </element>
1023
- </define>
1024
- <define name="role">
1025
- <element name="role">
1026
- <optional>
1027
- <attribute name="type">
1028
- <choice>
1029
- <value>author</value>
1030
- <value>edition</value>
1031
- <value>publisher</value>
1032
- <value>custom</value>
1033
- </choice>
1034
- </attribute>
1035
- </optional>
1036
- <attribute name="name"/>
1037
- <text/>
1038
- </element>
1039
- </define>
1040
- <define name="fullname">
1041
- <element name="fullname">
1042
- <zeroOrMore>
1043
- <ref name="prefix"/>
1044
- </zeroOrMore>
1045
- <zeroOrMore>
1046
- <ref name="forename"/>
1047
- </zeroOrMore>
1048
- <zeroOrMore>
1049
- <ref name="initial"/>
1050
- </zeroOrMore>
1051
- <ref name="surname"/>
1052
- <zeroOrMore>
1053
- <ref name="addition"/>
1054
- </zeroOrMore>
1055
- </element>
1056
- </define>
1057
- <define name="prefix">
1058
- <element name="prefix">
1059
- <text/>
1060
- </element>
1061
- </define>
1062
- <define name="initial">
1063
- <element name="initial">
1064
- <text/>
1065
- </element>
1066
- </define>
1067
- <define name="addition">
1068
- <element name="addition">
1069
- <text/>
1070
- </element>
1071
- </define>
1072
- <define name="surname">
1073
- <element name="surname">
1074
- <text/>
1075
- </element>
1076
- </define>
1077
- <define name="forename">
1078
- <element name="forename">
1079
- <text/>
1080
- </element>
1081
- </define>
1082
- <define name="affiliation">
1083
- <element name="affiliation">
1084
- <ref name="Organization"/>
1085
- </element>
1086
- </define>
1087
- <define name="Organization">
1088
- <ref name="orgname"/>
1089
- <optional>
1090
- <ref name="uri"/>
1091
- </optional>
1092
- <optional>
1093
- <ref name="address"/>
1094
- </optional>
1095
- <zeroOrMore>
1096
- <ref name="org-identifier"/>
1097
- </zeroOrMore>
1098
- </define>
1099
- <define name="orgname">
1100
- <element name="name">
1101
- <text/>
1102
- </element>
1103
- </define>
1104
- <define name="uri">
1105
- <element name="uri">
1106
- <data type="anyURI"/>
1107
- </element>
1108
- </define>
1109
- <define name="address">
1110
- <element name="address">
1111
- <oneOrMore>
1112
- <ref name="street"/>
1113
- </oneOrMore>
1114
- <ref name="city"/>
1115
- <optional>
1116
- <ref name="state"/>
1117
- </optional>
1118
- <ref name="country"/>
1119
- <optional>
1120
- <ref name="postcode"/>
1121
- </optional>
1122
- </element>
1123
- </define>
1124
- <define name="street">
1125
- <element name="street">
1126
- <text/>
1127
- </element>
1128
- </define>
1129
- <define name="city">
1130
- <element name="city">
1131
- <text/>
1132
- </element>
1133
- </define>
1134
- <define name="state">
1135
- <element name="state">
1136
- <text/>
1137
- </element>
1138
- </define>
1139
- <define name="country">
1140
- <element name="country">
1141
- <text/>
1142
- </element>
1143
- </define>
1144
- <define name="postcode">
1145
- <element name="postcode">
1146
- <text/>
1147
- </element>
1148
- </define>
1149
- <define name="person-identifier">
1150
- <element name="identifier">
1151
- <attribute name="type">
1152
- <choice>
1153
- <value>isni</value>
1154
- <value>uri</value>
1155
- </choice>
1156
- </attribute>
1157
- <text/>
1158
- </element>
1159
- </define>
1160
- <define name="org-identifier">
1161
- <element name="identifier">
1162
- <attribute name="type">
1163
- <choice>
1164
- <value>orcid</value>
1165
- <value>uri</value>
1166
- </choice>
1167
- </attribute>
1168
- <text/>
1169
- </element>
1170
- </define>
1171
- <define name="citation">
1172
- <element name="citation">
1173
- <ref name="CitationType"/>
1174
- </element>
1175
- </define>
1176
- <define name="CitationType">
1177
- <attribute name="bibitemid">
1178
- <data type="IDREF"/>
1179
- </attribute>
1180
- <zeroOrMore>
1181
- <ref name="locality"/>
1182
- </zeroOrMore>
1183
- <optional>
1184
- <ref name="date"/>
1185
- </optional>
1186
- </define>
1187
- <define name="date">
1188
- <element name="date">
1189
- <choice>
1190
- <data type="gYear"/>
1191
- <data type="date"/>
1192
- </choice>
1193
- </element>
1194
- </define>
1195
- <define name="locality">
1196
- <element name="locality">
1197
- <attribute name="type">
1198
- <choice>
1199
- <value>section</value>
1200
- <value>clause</value>
1201
- <value>part</value>
1202
- <value>paragraph</value>
1203
- <value>chapter</value>
1204
- <value>page</value>
1205
- <value>whole</value>
1206
- </choice>
1207
- </attribute>
1208
- <text/>
1209
- </element>
1210
- </define>
1211
- <define name="bibitem">
1212
- <element name="bibitem">
1213
- <ref name="BibliographicItem"/>
1214
- </element>
1215
- </define>
1216
- <define name="BibliographicItem">
1217
- <attribute name="id">
1218
- <data type="ID"/>
1219
- </attribute>
1220
- <optional>
1221
- <attribute name="type">
1222
- <choice>
1223
- <value>article</value>
1224
- <value>book</value>
1225
- <value>booklet</value>
1226
- <value>conference</value>
1227
- <value>manual</value>
1228
- <value>proceedings</value>
1229
- <value>presentation</value>
1230
- <value>thesis</value>
1231
- <value>techreport</value>
1232
- <value>standard</value>
1233
- <value>unpublished</value>
1234
- </choice>
1235
- </attribute>
1236
- </optional>
1237
- <choice>
1238
- <ref name="bname"/>
1239
- <ref name="formatted"/>
1240
- </choice>
1241
- <optional>
1242
- <ref name="source"/>
1243
- </optional>
1244
- <optional>
1245
- <ref name="publishdate"/>
1246
- </optional>
1247
- <zeroOrMore>
1248
- <ref name="docidentifier"/>
1249
- </zeroOrMore>
1250
- <optional>
1251
- <ref name="accesseddate"/>
1252
- </optional>
1253
- <zeroOrMore>
1254
- <ref name="creator"/>
1255
- </zeroOrMore>
1256
- <zeroOrMore>
1257
- <ref name="publisher"/>
1258
- </zeroOrMore>
1259
- <optional>
1260
- <ref name="edition"/>
1261
- </optional>
1262
- <zeroOrMore>
1263
- <ref name="biblionote"/>
1264
- </zeroOrMore>
1265
- <zeroOrMore>
1266
- <ref name="partof"/>
1267
- </zeroOrMore>
1268
- <optional>
1269
- <ref name="creationdate"/>
1270
- </optional>
1271
- <zeroOrMore>
1272
- <ref name="language"/>
1273
- </zeroOrMore>
1274
- <zeroOrMore>
1275
- <ref name="script"/>
1276
- </zeroOrMore>
1277
- <optional>
1278
- <ref name="abstract"/>
1279
- </optional>
1280
- </define>
1281
- <define name="bname">
1282
- <element name="name">
1283
- <text/>
1284
- </element>
1285
- </define>
1286
- <define name="formatted">
1287
- <element name="formatted">
1288
- <oneOrMore>
1289
- <ref name="TextElement"/>
1290
- </oneOrMore>
1291
- </element>
1292
- </define>
1293
- <define name="source">
1294
- <element name="source">
1295
- <data type="anyURI"/>
1296
- </element>
1297
- </define>
1298
- <define name="publishdate">
1299
- <element name="publishdate">
1300
- <text/>
1301
- </element>
1302
- </define>
1303
- <define name="docidentifier">
1304
- <element name="docidentifier">
1305
- <text/>
1306
- </element>
1307
- </define>
1308
- <define name="accesseddate">
1309
- <element name="accesseddate">
1310
- <text/>
1311
- </element>
1312
- </define>
1313
- <define name="creationdate">
1314
- <element name="creationdate">
1315
- <text/>
1316
- </element>
1317
- </define>
1318
- <define name="biblionote">
1319
- <element name="note">
1320
- <text/>
1321
- </element>
1322
- </define>
1323
- <define name="abstract">
1324
- <element name="abstract">
1325
- <text/>
1326
- </element>
1327
- </define>
1328
- <define name="partof">
1329
- <element name="partof">
1330
- <ref name="BibliographicItem"/>
599
+ <define name="foreword">
600
+ <element name="foreword">
601
+ <ref name="Content-Section"/>
1331
602
  </element>
1332
603
  </define>
1333
- <define name="iso-standard">
1334
- <element name="iso-standard">
1335
- <oneOrMore>
1336
- <ref name="title"/>
1337
- </oneOrMore>
1338
- <ref name="status"/>
1339
- <ref name="creator"/>
1340
- <ref name="language"/>
1341
- <ref name="script"/>
1342
- <ref name="type"/>
1343
- <ref name="id"/>
1344
- <optional>
1345
- <ref name="version"/>
1346
- </optional>
1347
- <ref name="copyright"/>
1348
- <ref name="sections"/>
604
+ <define name="introduction">
605
+ <element name="introduction">
606
+ <ref name="Content-Section"/>
1349
607
  </element>
1350
608
  </define>
1351
609
  <define name="draft">
@@ -1353,11 +611,6 @@
1353
611
  <text/>
1354
612
  </element>
1355
613
  </define>
1356
- <define name="owner-affiliation">
1357
- <element name="affiliation">
1358
- <value>ISO</value>
1359
- </element>
1360
- </define>
1361
614
  <define name="stage">
1362
615
  <element name="stage">
1363
616
  <choice>
@@ -1404,34 +657,30 @@
1404
657
  </define>
1405
658
  <define name="technical-committee">
1406
659
  <element name="technical-committee">
1407
- <optional>
1408
- <attribute name="number">
1409
- <data type="int"/>
1410
- </attribute>
1411
- </optional>
1412
- <text/>
660
+ <ref name="IsoWorkgroup"/>
1413
661
  </element>
1414
662
  </define>
1415
663
  <define name="subcommittee">
1416
664
  <element name="subcommittee">
1417
- <optional>
1418
- <attribute name="number">
1419
- <data type="int"/>
1420
- </attribute>
1421
- </optional>
1422
- <text/>
665
+ <ref name="IsoWorkgroup"/>
1423
666
  </element>
1424
667
  </define>
1425
668
  <define name="workgroup">
1426
669
  <element name="workgroup">
1427
- <optional>
1428
- <attribute name="number">
1429
- <data type="int"/>
1430
- </attribute>
1431
- </optional>
1432
- <text/>
670
+ <ref name="IsoWorkgroup"/>
1433
671
  </element>
1434
672
  </define>
673
+ <define name="IsoWorkgroup">
674
+ <optional>
675
+ <attribute name="number">
676
+ <data type="int"/>
677
+ </attribute>
678
+ </optional>
679
+ <optional>
680
+ <attribute name="type"/>
681
+ </optional>
682
+ <text/>
683
+ </define>
1435
684
  <define name="secretariat">
1436
685
  <element name="secretariat">
1437
686
  <text/>
@@ -1439,17 +688,17 @@
1439
688
  </define>
1440
689
  <define name="title-intro">
1441
690
  <element name="title-intro">
1442
- <text/>
691
+ <ref name="FormattedString"/>
1443
692
  </element>
1444
693
  </define>
1445
694
  <define name="title-main">
1446
695
  <element name="title-main">
1447
- <text/>
696
+ <ref name="FormattedString"/>
1448
697
  </element>
1449
698
  </define>
1450
699
  <define name="title-part">
1451
700
  <element name="title-part">
1452
- <text/>
701
+ <ref name="FormattedString"/>
1453
702
  </element>
1454
703
  </define>
1455
704
  <define name="clause-hanging-paragraph-with-footnote">
@@ -1468,8 +717,12 @@
1468
717
  <ref name="section-title"/>
1469
718
  </optional>
1470
719
  <zeroOrMore>
720
+ <!-- allow hanging paragraphs in annexes: they introduce lists -->
1471
721
  <ref name="BasicBlock"/>
1472
722
  </zeroOrMore>
723
+ <zeroOrMore>
724
+ <ref name="note"/>
725
+ </zeroOrMore>
1473
726
  <zeroOrMore>
1474
727
  <ref name="clause-hanging-paragraph-with-footnote"/>
1475
728
  </zeroOrMore>