asciidoctor-gb 0.1.5 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.tb.yml +20 -10
- data/LICENSE +25 -0
- data/README.adoc +262 -34
- data/asciidoctor-gb.gemspec +2 -1
- data/bin/rspec +18 -0
- data/lib/asciidoctor/gb/biblio.rng +602 -0
- data/lib/asciidoctor/gb/converter.rb +104 -70
- data/lib/asciidoctor/gb/front.rb +109 -61
- data/lib/asciidoctor/gb/gbstandard.rng +135 -31
- data/lib/asciidoctor/gb/html/gb-logos/gb-issuer-default.gif +0 -0
- data/lib/asciidoctor/gb/html/gb-logos/gb-issuer-default.png +0 -0
- data/lib/asciidoctor/gb/html/gb-logos/gb-issuer-default.svg +980 -0
- data/lib/asciidoctor/gb/html/{gb.css → gb.scss} +133 -219
- data/lib/asciidoctor/gb/html/html_gb_intro.html +1 -37
- data/lib/asciidoctor/gb/html/html_gb_titlepage.html +6 -5
- data/lib/asciidoctor/gb/html/{htmlstyle.css → htmlstyle.scss} +85 -3
- data/lib/asciidoctor/gb/html/word_gb_intro.html +1 -1
- data/lib/asciidoctor/gb/html/word_gb_titlepage.html +320 -166
- data/lib/asciidoctor/gb/html/{wordstyle.css → wordstyle.scss} +605 -429
- data/lib/asciidoctor/gb/isodoc.rng +36 -564
- data/lib/asciidoctor/gb/isostandard.rng +198 -91
- data/lib/asciidoctor/gb/section_input.rb +21 -56
- data/lib/asciidoctor/gb/validate.rb +115 -0
- data/lib/asciidoctor/gb/version.rb +1 -1
- data/lib/asciidoctor-gb.rb +2 -1
- data/lib/isodoc/gb/agencies.rb +327 -0
- data/lib/isodoc/gb/block_output.rb +86 -0
- data/lib/isodoc/gb/gbcleanup.rb +87 -0
- data/lib/isodoc/gb/gbconvert.rb +153 -0
- data/lib/isodoc/gb/gbwordconvert.rb +89 -0
- data/lib/isodoc/gb/html/blank.png +0 -0
- data/lib/isodoc/gb/html/footer.png +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-issuer-default.gif +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-issuer-default.png +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-issuer-default.svg +980 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-db.gif +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-db.png +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-db.svg +1 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-gb.gif +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-gb.png +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-gb.svg +1 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-gjb.gif +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-gjb.png +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-gjb.svg +1 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-gm.gif +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-gm.png +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-gm.svg +1 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-jjf.gif +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-jjf.png +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-jjf.svg +1 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-zb.gif +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-zb.png +0 -0
- data/lib/isodoc/gb/html/gb-logos/gb-standard-zb.svg +13 -0
- data/lib/isodoc/gb/html/gb.scss +556 -0
- data/lib/isodoc/gb/html/header.html +216 -0
- data/lib/isodoc/gb/html/html_gb_intro.html +9 -0
- data/lib/isodoc/gb/html/html_gb_titlepage.html +99 -0
- data/lib/isodoc/gb/html/htmlstyle.scss +269 -0
- data/lib/isodoc/gb/html/logo.png +0 -0
- data/lib/isodoc/gb/html/scripts.html +71 -0
- data/lib/isodoc/gb/html/word_gb_intro.html +3 -0
- data/lib/isodoc/gb/html/word_gb_titlepage.html +388 -0
- data/lib/isodoc/gb/html/wordstyle.scss +2543 -0
- data/lib/isodoc/gb/i18n-en.yaml +12 -0
- data/lib/isodoc/gb/i18n-zh-Hans.yaml +12 -0
- data/lib/isodoc/gb/i18n.rb +20 -0
- data/lib/isodoc/gb/metadata.rb +216 -0
- data/lib/{asciidoctor → isodoc}/gb/section_output.rb +22 -4
- data/lib/isodoc/gb/xref_gen.rb +17 -0
- metadata +75 -15
- data/lib/asciidoctor/gb/agencies.rb +0 -186
- data/lib/asciidoctor/gb/gbconvert.rb +0 -86
- data/lib/asciidoctor/gb/metadata.rb +0 -186
- data/lib/asciidoctor/gb/xref_gen.rb +0 -25
@@ -0,0 +1,602 @@
|
|
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:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
21
|
+
<define name="status">
|
22
|
+
<element name="status">
|
23
|
+
<ref name="LocalizedString"/>
|
24
|
+
</element>
|
25
|
+
</define>
|
26
|
+
<define name="language">
|
27
|
+
<element name="language">
|
28
|
+
<text/>
|
29
|
+
</element>
|
30
|
+
</define>
|
31
|
+
<define name="script">
|
32
|
+
<a:documentation>ISO-639</a:documentation>
|
33
|
+
<element name="script">
|
34
|
+
<text/>
|
35
|
+
</element>
|
36
|
+
</define>
|
37
|
+
<define name="edition">
|
38
|
+
<a:documentation>ISO-15924: Latn</a:documentation>
|
39
|
+
<element name="edition">
|
40
|
+
<data type="int"/>
|
41
|
+
</element>
|
42
|
+
</define>
|
43
|
+
<define name="LocalizedString">
|
44
|
+
<optional>
|
45
|
+
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
46
|
+
<attribute name="language"/>
|
47
|
+
</optional>
|
48
|
+
<optional>
|
49
|
+
<attribute name="script"/>
|
50
|
+
</optional>
|
51
|
+
<text/>
|
52
|
+
</define>
|
53
|
+
<!--
|
54
|
+
Unlike UML, change type to format: type is overloaded
|
55
|
+
Would be need if plain were default value and could omit the attribute
|
56
|
+
Added LocalizedStringOrXsAny
|
57
|
+
-->
|
58
|
+
<define name="FormattedString">
|
59
|
+
<optional>
|
60
|
+
<!-- attribute format { ( "plain" | "html" | "docbook" | "tei" | "asciidoc" | "markdown" ) }?, -->
|
61
|
+
<attribute name="format">
|
62
|
+
<choice>
|
63
|
+
<value>text/plain</value>
|
64
|
+
<value>text/html</value>
|
65
|
+
<value>application/docbook+xml</value>
|
66
|
+
<value>application/tei+xml</value>
|
67
|
+
<value>text/x-asciidoc</value>
|
68
|
+
<value>text/markdown</value>
|
69
|
+
<value>application/x-isodoc+xml</value>
|
70
|
+
<text/>
|
71
|
+
</choice>
|
72
|
+
</attribute>
|
73
|
+
</optional>
|
74
|
+
<ref name="LocalizedStringOrXsAny"/>
|
75
|
+
</define>
|
76
|
+
<define name="LocalizedStringOrXsAny">
|
77
|
+
<optional>
|
78
|
+
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
79
|
+
<attribute name="language"/>
|
80
|
+
</optional>
|
81
|
+
<optional>
|
82
|
+
<attribute name="script"/>
|
83
|
+
</optional>
|
84
|
+
<oneOrMore>
|
85
|
+
<choice>
|
86
|
+
<text/>
|
87
|
+
<ref name="AnyElement"/>
|
88
|
+
</choice>
|
89
|
+
</oneOrMore>
|
90
|
+
</define>
|
91
|
+
<define name="contributor">
|
92
|
+
<element name="contributor">
|
93
|
+
<zeroOrMore>
|
94
|
+
<ref name="role"/>
|
95
|
+
</zeroOrMore>
|
96
|
+
<ref name="ContributorInfo"/>
|
97
|
+
</element>
|
98
|
+
</define>
|
99
|
+
<define name="role">
|
100
|
+
<element name="role">
|
101
|
+
<optional>
|
102
|
+
<attribute name="type">
|
103
|
+
<choice>
|
104
|
+
<value>author</value>
|
105
|
+
<value>edition</value>
|
106
|
+
<value>publisher</value>
|
107
|
+
<text/>
|
108
|
+
</choice>
|
109
|
+
</attribute>
|
110
|
+
</optional>
|
111
|
+
<zeroOrMore>
|
112
|
+
<ref name="roledescription"/>
|
113
|
+
</zeroOrMore>
|
114
|
+
</element>
|
115
|
+
</define>
|
116
|
+
<define name="ContributorInfo">
|
117
|
+
<choice>
|
118
|
+
<ref name="person"/>
|
119
|
+
<ref name="organization"/>
|
120
|
+
</choice>
|
121
|
+
</define>
|
122
|
+
<define name="roledescription">
|
123
|
+
<element name="description">
|
124
|
+
<ref name="FormattedString"/>
|
125
|
+
</element>
|
126
|
+
</define>
|
127
|
+
<define name="person">
|
128
|
+
<element name="person">
|
129
|
+
<optional>
|
130
|
+
<ref name="fullname"/>
|
131
|
+
</optional>
|
132
|
+
<zeroOrMore>
|
133
|
+
<ref name="affiliation"/>
|
134
|
+
</zeroOrMore>
|
135
|
+
<zeroOrMore>
|
136
|
+
<ref name="person-identifier"/>
|
137
|
+
</zeroOrMore>
|
138
|
+
<zeroOrMore>
|
139
|
+
<ref name="contact"/>
|
140
|
+
</zeroOrMore>
|
141
|
+
<optional>
|
142
|
+
<ref name="uri"/>
|
143
|
+
</optional>
|
144
|
+
</element>
|
145
|
+
</define>
|
146
|
+
<define name="fullname">
|
147
|
+
<element name="name">
|
148
|
+
<zeroOrMore>
|
149
|
+
<ref name="prefix"/>
|
150
|
+
</zeroOrMore>
|
151
|
+
<zeroOrMore>
|
152
|
+
<ref name="forename"/>
|
153
|
+
</zeroOrMore>
|
154
|
+
<zeroOrMore>
|
155
|
+
<ref name="initial"/>
|
156
|
+
</zeroOrMore>
|
157
|
+
<ref name="surname"/>
|
158
|
+
<zeroOrMore>
|
159
|
+
<ref name="addition"/>
|
160
|
+
</zeroOrMore>
|
161
|
+
</element>
|
162
|
+
</define>
|
163
|
+
<define name="prefix">
|
164
|
+
<element name="prefix">
|
165
|
+
<ref name="LocalizedString"/>
|
166
|
+
</element>
|
167
|
+
</define>
|
168
|
+
<define name="initial">
|
169
|
+
<element name="initial">
|
170
|
+
<ref name="LocalizedString"/>
|
171
|
+
</element>
|
172
|
+
</define>
|
173
|
+
<define name="addition">
|
174
|
+
<element name="addition">
|
175
|
+
<ref name="LocalizedString"/>
|
176
|
+
</element>
|
177
|
+
</define>
|
178
|
+
<define name="surname">
|
179
|
+
<element name="surname">
|
180
|
+
<ref name="LocalizedString"/>
|
181
|
+
</element>
|
182
|
+
</define>
|
183
|
+
<define name="forename">
|
184
|
+
<element name="forename">
|
185
|
+
<ref name="LocalizedString"/>
|
186
|
+
</element>
|
187
|
+
</define>
|
188
|
+
<define name="affiliation">
|
189
|
+
<element name="affiliation">
|
190
|
+
<optional>
|
191
|
+
<ref name="affiliationname"/>
|
192
|
+
</optional>
|
193
|
+
<zeroOrMore>
|
194
|
+
<ref name="affiliationdescription"/>
|
195
|
+
</zeroOrMore>
|
196
|
+
<ref name="organization"/>
|
197
|
+
</element>
|
198
|
+
</define>
|
199
|
+
<define name="affiliationname">
|
200
|
+
<element name="name">
|
201
|
+
<ref name="LocalizedString"/>
|
202
|
+
</element>
|
203
|
+
</define>
|
204
|
+
<define name="affiliationdescription">
|
205
|
+
<element name="description">
|
206
|
+
<ref name="FormattedString"/>
|
207
|
+
</element>
|
208
|
+
</define>
|
209
|
+
<define name="organization">
|
210
|
+
<element name="organization">
|
211
|
+
<ref name="orgname"/>
|
212
|
+
<optional>
|
213
|
+
<ref name="abbreviation"/>
|
214
|
+
</optional>
|
215
|
+
<optional>
|
216
|
+
<ref name="uri"/>
|
217
|
+
</optional>
|
218
|
+
<zeroOrMore>
|
219
|
+
<ref name="org-identifier"/>
|
220
|
+
</zeroOrMore>
|
221
|
+
<zeroOrMore>
|
222
|
+
<ref name="contact"/>
|
223
|
+
</zeroOrMore>
|
224
|
+
</element>
|
225
|
+
</define>
|
226
|
+
<define name="orgname">
|
227
|
+
<element name="name">
|
228
|
+
<ref name="LocalizedString"/>
|
229
|
+
</element>
|
230
|
+
</define>
|
231
|
+
<define name="abbreviation">
|
232
|
+
<element name="abbreviation">
|
233
|
+
<ref name="LocalizedString"/>
|
234
|
+
</element>
|
235
|
+
</define>
|
236
|
+
<define name="uri">
|
237
|
+
<element name="uri">
|
238
|
+
<data type="anyURI"/>
|
239
|
+
</element>
|
240
|
+
</define>
|
241
|
+
<!-- TODO may change -->
|
242
|
+
<define name="contact">
|
243
|
+
<choice>
|
244
|
+
<ref name="address"/>
|
245
|
+
<ref name="phone"/>
|
246
|
+
<ref name="email"/>
|
247
|
+
<ref name="uri"/>
|
248
|
+
</choice>
|
249
|
+
</define>
|
250
|
+
<define name="phone">
|
251
|
+
<element name="phone">
|
252
|
+
<text/>
|
253
|
+
</element>
|
254
|
+
</define>
|
255
|
+
<define name="email">
|
256
|
+
<element name="email">
|
257
|
+
<text/>
|
258
|
+
</element>
|
259
|
+
</define>
|
260
|
+
<define name="address">
|
261
|
+
<element name="address">
|
262
|
+
<oneOrMore>
|
263
|
+
<!-- iso191606 TODO -->
|
264
|
+
<ref name="street"/>
|
265
|
+
</oneOrMore>
|
266
|
+
<ref name="city"/>
|
267
|
+
<optional>
|
268
|
+
<ref name="state"/>
|
269
|
+
</optional>
|
270
|
+
<ref name="country"/>
|
271
|
+
<optional>
|
272
|
+
<ref name="postcode"/>
|
273
|
+
</optional>
|
274
|
+
</element>
|
275
|
+
</define>
|
276
|
+
<define name="street">
|
277
|
+
<element name="street">
|
278
|
+
<text/>
|
279
|
+
</element>
|
280
|
+
</define>
|
281
|
+
<define name="city">
|
282
|
+
<element name="city">
|
283
|
+
<text/>
|
284
|
+
</element>
|
285
|
+
</define>
|
286
|
+
<define name="state">
|
287
|
+
<element name="state">
|
288
|
+
<text/>
|
289
|
+
</element>
|
290
|
+
</define>
|
291
|
+
<define name="country">
|
292
|
+
<element name="country">
|
293
|
+
<text/>
|
294
|
+
</element>
|
295
|
+
</define>
|
296
|
+
<define name="postcode">
|
297
|
+
<element name="postcode">
|
298
|
+
<text/>
|
299
|
+
</element>
|
300
|
+
</define>
|
301
|
+
<define name="person-identifier">
|
302
|
+
<element name="identifier">
|
303
|
+
<attribute name="type">
|
304
|
+
<choice>
|
305
|
+
<value>isni</value>
|
306
|
+
<value>uri</value>
|
307
|
+
</choice>
|
308
|
+
</attribute>
|
309
|
+
<text/>
|
310
|
+
</element>
|
311
|
+
</define>
|
312
|
+
<define name="org-identifier">
|
313
|
+
<element name="identifier">
|
314
|
+
<attribute name="type">
|
315
|
+
<choice>
|
316
|
+
<value>orcid</value>
|
317
|
+
<value>uri</value>
|
318
|
+
</choice>
|
319
|
+
</attribute>
|
320
|
+
<text/>
|
321
|
+
</element>
|
322
|
+
</define>
|
323
|
+
<define name="citation">
|
324
|
+
<element name="citation">
|
325
|
+
<ref name="CitationType"/>
|
326
|
+
</element>
|
327
|
+
</define>
|
328
|
+
<define name="CitationType">
|
329
|
+
<attribute name="bibitemid">
|
330
|
+
<data type="IDREF"/>
|
331
|
+
</attribute>
|
332
|
+
<zeroOrMore>
|
333
|
+
<ref name="locality"/>
|
334
|
+
</zeroOrMore>
|
335
|
+
<optional>
|
336
|
+
<ref name="date"/>
|
337
|
+
</optional>
|
338
|
+
</define>
|
339
|
+
<define name="date">
|
340
|
+
<element name="date">
|
341
|
+
<choice>
|
342
|
+
<data type="gYear"/>
|
343
|
+
<data type="date"/>
|
344
|
+
</choice>
|
345
|
+
</element>
|
346
|
+
</define>
|
347
|
+
<define name="locality">
|
348
|
+
<element name="locality">
|
349
|
+
<!-- attribute type { ( "section" | "clause" | "part" | "paragraph" | "chapter" | "page" | "whole" | "table" | "annex" | "figure" | "note" | "example" | ("locality:", text) ) }, -->
|
350
|
+
<attribute name="type">
|
351
|
+
<ref name="LocalityType"/>
|
352
|
+
</attribute>
|
353
|
+
<ref name="referenceFrom"/>
|
354
|
+
<optional>
|
355
|
+
<ref name="referenceTo"/>
|
356
|
+
</optional>
|
357
|
+
</element>
|
358
|
+
</define>
|
359
|
+
<define name="LocalityType">
|
360
|
+
<data type="string">
|
361
|
+
<param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|example|locality:[a-zA-Z0-9_]+</param>
|
362
|
+
</data>
|
363
|
+
</define>
|
364
|
+
<define name="referenceFrom">
|
365
|
+
<element name="referenceFrom">
|
366
|
+
<text/>
|
367
|
+
</element>
|
368
|
+
</define>
|
369
|
+
<define name="referenceTo">
|
370
|
+
<element name="referenceTo">
|
371
|
+
<text/>
|
372
|
+
</element>
|
373
|
+
</define>
|
374
|
+
<!-- unlike UML, has id attribute; that results from including bibitem in a docmodel -->
|
375
|
+
<define name="bibitem">
|
376
|
+
<element name="bibitem">
|
377
|
+
<attribute name="id">
|
378
|
+
<data type="ID"/>
|
379
|
+
</attribute>
|
380
|
+
<ref name="BibliographicItem"/>
|
381
|
+
</element>
|
382
|
+
</define>
|
383
|
+
<define name="bibitem_no_id">
|
384
|
+
<element name="bibitem">
|
385
|
+
<ref name="BibliographicItem"/>
|
386
|
+
</element>
|
387
|
+
</define>
|
388
|
+
<define name="BibItemType" combine="choice">
|
389
|
+
<choice>
|
390
|
+
<value>article</value>
|
391
|
+
<value>book</value>
|
392
|
+
<value>booklet</value>
|
393
|
+
<value>conference</value>
|
394
|
+
<value>manual</value>
|
395
|
+
<value>proceedings</value>
|
396
|
+
<value>presentation</value>
|
397
|
+
<value>thesis</value>
|
398
|
+
<value>techreport</value>
|
399
|
+
<value>standard</value>
|
400
|
+
<value>unpublished</value>
|
401
|
+
</choice>
|
402
|
+
</define>
|
403
|
+
<define name="BibliographicItem">
|
404
|
+
<optional>
|
405
|
+
<attribute name="type">
|
406
|
+
<ref name="BibItemType"/>
|
407
|
+
</attribute>
|
408
|
+
</optional>
|
409
|
+
<choice>
|
410
|
+
<oneOrMore>
|
411
|
+
<ref name="btitle"/>
|
412
|
+
</oneOrMore>
|
413
|
+
<ref name="formattedref"/>
|
414
|
+
</choice>
|
415
|
+
<zeroOrMore>
|
416
|
+
<ref name="bsource"/>
|
417
|
+
</zeroOrMore>
|
418
|
+
<zeroOrMore>
|
419
|
+
<ref name="docidentifier"/>
|
420
|
+
</zeroOrMore>
|
421
|
+
<zeroOrMore>
|
422
|
+
<ref name="bdate"/>
|
423
|
+
</zeroOrMore>
|
424
|
+
<zeroOrMore>
|
425
|
+
<ref name="contributor"/>
|
426
|
+
</zeroOrMore>
|
427
|
+
<optional>
|
428
|
+
<ref name="edition"/>
|
429
|
+
</optional>
|
430
|
+
<zeroOrMore>
|
431
|
+
<ref name="biblionote"/>
|
432
|
+
</zeroOrMore>
|
433
|
+
<zeroOrMore>
|
434
|
+
<ref name="language"/>
|
435
|
+
</zeroOrMore>
|
436
|
+
<zeroOrMore>
|
437
|
+
<ref name="script"/>
|
438
|
+
</zeroOrMore>
|
439
|
+
<optional>
|
440
|
+
<ref name="abstract"/>
|
441
|
+
</optional>
|
442
|
+
<optional>
|
443
|
+
<ref name="status"/>
|
444
|
+
</optional>
|
445
|
+
<optional>
|
446
|
+
<ref name="copyright"/>
|
447
|
+
</optional>
|
448
|
+
<zeroOrMore>
|
449
|
+
<ref name="docrelation"/>
|
450
|
+
</zeroOrMore>
|
451
|
+
</define>
|
452
|
+
<define name="btitle">
|
453
|
+
<element name="title">
|
454
|
+
<ref name="FormattedString"/>
|
455
|
+
</element>
|
456
|
+
</define>
|
457
|
+
<define name="bsource">
|
458
|
+
<element name="source">
|
459
|
+
<ref name="TypedUri"/>
|
460
|
+
</element>
|
461
|
+
</define>
|
462
|
+
<define name="formattedref">
|
463
|
+
<element name="formattedref">
|
464
|
+
<ref name="FormattedString"/>
|
465
|
+
</element>
|
466
|
+
</define>
|
467
|
+
<define name="link">
|
468
|
+
<element name="link">
|
469
|
+
<ref name="TypedUri"/>
|
470
|
+
</element>
|
471
|
+
</define>
|
472
|
+
<define name="TypedUri">
|
473
|
+
<optional>
|
474
|
+
<attribute name="type"/>
|
475
|
+
</optional>
|
476
|
+
<data type="anyURI"/>
|
477
|
+
</define>
|
478
|
+
<define name="bdate">
|
479
|
+
<element name="date">
|
480
|
+
<attribute name="type">
|
481
|
+
<choice>
|
482
|
+
<value>published</value>
|
483
|
+
<value>accessed</value>
|
484
|
+
<value>created</value>
|
485
|
+
<value>implemented</value>
|
486
|
+
<value>obsoleted</value>
|
487
|
+
<value>confirmed</value>
|
488
|
+
<value>updated</value>
|
489
|
+
<value>issued</value>
|
490
|
+
</choice>
|
491
|
+
</attribute>
|
492
|
+
<ref name="bfrom"/>
|
493
|
+
<optional>
|
494
|
+
<ref name="bto"/>
|
495
|
+
</optional>
|
496
|
+
</element>
|
497
|
+
</define>
|
498
|
+
<define name="bfrom">
|
499
|
+
<element name="from">
|
500
|
+
<choice>
|
501
|
+
<data type="gYear"/>
|
502
|
+
<data type="date"/>
|
503
|
+
</choice>
|
504
|
+
</element>
|
505
|
+
</define>
|
506
|
+
<define name="bto">
|
507
|
+
<element name="to">
|
508
|
+
<choice>
|
509
|
+
<data type="gYear"/>
|
510
|
+
<data type="date"/>
|
511
|
+
</choice>
|
512
|
+
</element>
|
513
|
+
</define>
|
514
|
+
<define name="docidentifier">
|
515
|
+
<element name="docidentifier">
|
516
|
+
<optional>
|
517
|
+
<attribute name="type"/>
|
518
|
+
</optional>
|
519
|
+
<text/>
|
520
|
+
</element>
|
521
|
+
</define>
|
522
|
+
<define name="biblionote">
|
523
|
+
<element name="note">
|
524
|
+
<ref name="FormattedString"/>
|
525
|
+
</element>
|
526
|
+
</define>
|
527
|
+
<define name="abstract">
|
528
|
+
<element name="abstract">
|
529
|
+
<ref name="FormattedString"/>
|
530
|
+
</element>
|
531
|
+
</define>
|
532
|
+
<define name="copyright">
|
533
|
+
<element name="copyright">
|
534
|
+
<ref name="from"/>
|
535
|
+
<optional>
|
536
|
+
<ref name="to"/>
|
537
|
+
</optional>
|
538
|
+
<ref name="owner"/>
|
539
|
+
</element>
|
540
|
+
</define>
|
541
|
+
<define name="from">
|
542
|
+
<element name="from">
|
543
|
+
<data type="gYear"/>
|
544
|
+
</element>
|
545
|
+
</define>
|
546
|
+
<define name="to">
|
547
|
+
<element name="to">
|
548
|
+
<data type="gYear"/>
|
549
|
+
</element>
|
550
|
+
</define>
|
551
|
+
<define name="owner">
|
552
|
+
<element name="owner">
|
553
|
+
<ref name="ContributorInfo"/>
|
554
|
+
</element>
|
555
|
+
</define>
|
556
|
+
<define name="docrelation">
|
557
|
+
<element name="relation">
|
558
|
+
<attribute name="type">
|
559
|
+
<choice>
|
560
|
+
<value>parent</value>
|
561
|
+
<value>child</value>
|
562
|
+
<value>obsoletes</value>
|
563
|
+
<value>updates</value>
|
564
|
+
<value>updatedBy</value>
|
565
|
+
<value>complements</value>
|
566
|
+
<value>derivedFrom</value>
|
567
|
+
<value>adoptedFrom</value>
|
568
|
+
<value>equivalent</value>
|
569
|
+
<value>identical</value>
|
570
|
+
<value>nonequivalent</value>
|
571
|
+
</choice>
|
572
|
+
</attribute>
|
573
|
+
<element name="bibitem">
|
574
|
+
<ref name="BibliographicItem"/>
|
575
|
+
</element>
|
576
|
+
<zeroOrMore>
|
577
|
+
<ref name="locality"/>
|
578
|
+
</zeroOrMore>
|
579
|
+
</element>
|
580
|
+
</define>
|
581
|
+
<!--
|
582
|
+
Anycontents = mixed {
|
583
|
+
https://github.com/relaxng/jing-trang/issues/211
|
584
|
+
https://lists.oasis-open.org/archives/office/200808/msg00024.html
|
585
|
+
https://lists.oasis-open.org/archives/office/200808/msg00099.html
|
586
|
+
For this to work, we will actually strip any attributes in the Anycontents before
|
587
|
+
passing it for validation. Horrible I know, but there are no good alternatives
|
588
|
+
that also allow us to do grammar inheritance
|
589
|
+
(attribute * { text } | Any)*
|
590
|
+
Any*
|
591
|
+
}
|
592
|
+
-->
|
593
|
+
<define name="AnyElement">
|
594
|
+
<element>
|
595
|
+
<anyName/>
|
596
|
+
<choice>
|
597
|
+
<text/>
|
598
|
+
<ref name="AnyElement"/>
|
599
|
+
</choice>
|
600
|
+
</element>
|
601
|
+
</define>
|
602
|
+
</grammar>
|