asciidoctor-iso 0.0.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +2 -0
  3. data/.gitignore +1 -0
  4. data/.hound.yml +3 -0
  5. data/.rubocop.ribose.yml +65 -0
  6. data/.rubocop.tb.yml +640 -0
  7. data/Gemfile +4 -0
  8. data/Gemfile.lock +162 -0
  9. data/Makefile +39 -0
  10. data/README.adoc +396 -59
  11. data/Rakefile +6 -0
  12. data/asciidoctor-iso.gemspec +11 -3
  13. data/lib/asciidoctor/iso/base.rb +122 -51
  14. data/lib/asciidoctor/iso/blocks.rb +119 -108
  15. data/lib/asciidoctor/iso/cleanup.rb +214 -0
  16. data/lib/asciidoctor/iso/cleanup_block.rb +157 -0
  17. data/lib/asciidoctor/iso/converter.rb +5 -3
  18. data/lib/asciidoctor/iso/front.rb +37 -28
  19. data/lib/asciidoctor/iso/html/header.html +184 -0
  20. data/lib/asciidoctor/iso/html/html_iso_intro.html +73 -0
  21. data/lib/asciidoctor/iso/html/html_iso_titlepage.html +31 -0
  22. data/lib/asciidoctor/iso/html/htmlstyle.css +67 -0
  23. data/lib/asciidoctor/iso/html/isodoc.css +679 -0
  24. data/lib/asciidoctor/iso/html/word_iso_intro.html +72 -0
  25. data/lib/asciidoctor/iso/html/word_iso_titlepage.html +58 -0
  26. data/lib/asciidoctor/iso/inline_anchor.rb +20 -26
  27. data/lib/asciidoctor/iso/isostandard.rnc +177 -0
  28. data/lib/asciidoctor/iso/isostandard.rng +1478 -0
  29. data/lib/asciidoctor/iso/isostandard_diff.rnc +295 -0
  30. data/lib/asciidoctor/iso/lists.rb +152 -109
  31. data/lib/asciidoctor/iso/section.rb +164 -0
  32. data/lib/asciidoctor/iso/table.rb +30 -27
  33. data/lib/asciidoctor/iso/utils.rb +61 -183
  34. data/lib/asciidoctor/iso/validate.make.sh +8 -0
  35. data/lib/asciidoctor/iso/validate.rb +195 -24
  36. data/lib/asciidoctor/iso/validate_style.rb +175 -0
  37. data/lib/asciidoctor/iso/version.rb +1 -1
  38. data/spec/examples/rice.adoc +45 -24
  39. data/spec/examples/rice.doc +17708 -0
  40. data/spec/examples/rice.html +1574 -1662
  41. data/spec/examples/rice.preview.html +1811 -0
  42. data/spec/examples/rice.sh +4 -0
  43. data/spec/examples/rice.xml +888 -62
  44. data/spec/examples/rice_images/rice_image1.png +0 -0
  45. data/spec/examples/rice_images/rice_image2.png +0 -0
  46. data/spec/examples/rice_images/rice_image3_1.png +0 -0
  47. data/spec/examples/rice_images/rice_image3_2.png +0 -0
  48. data/spec/examples/rice_images/rice_image3_3.png +0 -0
  49. metadata +135 -12
  50. data/grammar1.gif +0 -0
  51. data/grammar2.gif +0 -0
  52. data/grammar3.gif +0 -0
  53. data/grammar4.gif +0 -0
  54. data/lib/asciidoctor/iso/validate.rnc +0 -444
  55. data/lib/asciidoctor/iso/validate.rng +0 -1001
@@ -0,0 +1,72 @@
1
+ <div style='mso-element:para-border-div;border:solid windowtext 1.0pt;
2
+ border-bottom:none;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:
3
+ solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt;padding:1.0pt 4.0pt 0cm 4.0pt;
4
+ margin-left:5.1pt;margin-right:5.1pt'>
5
+
6
+ <p class="zzCopyright" align="left" style='margin-top:2.0pt;margin-right:0cm;
7
+ margin-bottom:12.0pt;margin-left:0cm;text-align:left;page-break-before:always;
8
+ mso-layout-grid-align:none;text-autospace:none;border:none;mso-border-top-alt:
9
+ solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-right-alt:
10
+ solid windowtext .5pt;padding:0cm;mso-padding-alt:1.0pt 4.0pt 0cm 4.0pt'><span
11
+ lang="EN-GB" style='color:windowtext'>© ISO DOCYEAR, Published in Switzerland.<o:p></o:p></span></p>
12
+
13
+ <p class="zzCopyright" style='margin-top:0cm;margin-right:0cm;margin-bottom:12.0pt;
14
+ margin-left:0cm;mso-layout-grid-align:none;text-autospace:none;border:none;
15
+ mso-border-left-alt:solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt;
16
+ padding:0cm;mso-padding-alt:0cm 4.0pt 0cm 4.0pt'><span lang="EN-GB"
17
+ style='font-size:10.0pt;mso-bidi-font-size:11.0pt;color:windowtext'>All rights
18
+ reserved. Unless otherwise specified, no part of this publication may be
19
+ reproduced or utilized otherwise in any form or by any means, electronic or
20
+ mechanical, including photocopying, or posting on the internet or an intranet,
21
+ without prior written permission. Permission can be requested from either ISO
22
+ at the address below or ISO’s member body in the country of the requester.<o:p></o:p></span></p>
23
+
24
+ <p class="zzCopyright" style='margin:0cm;margin-bottom:.0001pt;text-indent:20.15pt;
25
+ mso-layout-grid-align:none;text-autospace:none;border:none;mso-border-left-alt:
26
+ solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt;padding:0cm;
27
+ mso-padding-alt:0cm 4.0pt 0cm 4.0pt'><span lang="EN-GB" style='font-size:10.0pt;
28
+ mso-bidi-font-size:11.0pt;color:windowtext'>ISO copyright office<o:p></o:p></span></p>
29
+
30
+ <p class="zzCopyright" style='margin:0cm;margin-bottom:.0001pt;text-indent:20.15pt;
31
+ mso-layout-grid-align:none;text-autospace:none;border:none;mso-border-left-alt:
32
+ solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt;padding:0cm;
33
+ mso-padding-alt:0cm 4.0pt 0cm 4.0pt'><span lang="EN-GB" style='font-size:10.0pt;
34
+ mso-bidi-font-size:11.0pt;color:windowtext'>Ch. de Blandonnet 8 &#x2022; CP 401<o:p></o:p></span></p>
35
+
36
+ <p class="zzCopyright" style='margin:0cm;margin-bottom:.0001pt;text-indent:20.15pt;
37
+ mso-layout-grid-align:none;text-autospace:none;border:none;mso-border-left-alt:
38
+ solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt;padding:0cm;
39
+ mso-padding-alt:0cm 4.0pt 0cm 4.0pt'><span lang="EN-GB" style='font-size:10.0pt;
40
+ mso-bidi-font-size:11.0pt;color:windowtext'>CH-1214 Vernier, Geneva,
41
+ Switzerland<o:p></o:p></span></p>
42
+
43
+ <p class="zzCopyright" style='margin:0cm;margin-bottom:.0001pt;text-indent:20.15pt;
44
+ mso-layout-grid-align:none;text-autospace:none;border:none;mso-border-left-alt:
45
+ solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt;padding:0cm;
46
+ mso-padding-alt:0cm 4.0pt 0cm 4.0pt'><span lang="EN-GB" style='font-size:10.0pt;
47
+ mso-bidi-font-size:11.0pt;color:windowtext'>Tel.&nbsp;&nbsp;+ 41 22 749 01 11<o:p></o:p></span></p>
48
+
49
+ <p class="zzCopyright" style='margin:0cm;margin-bottom:.0001pt;text-indent:20.15pt;
50
+ mso-layout-grid-align:none;text-autospace:none;border:none;mso-border-left-alt:
51
+ solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt;padding:0cm;
52
+ mso-padding-alt:0cm 4.0pt 0cm 4.0pt'><span lang="EN-GB" style='font-size:10.0pt;
53
+ mso-bidi-font-size:11.0pt;color:windowtext'>Fax&nbsp;&nbsp;+ 41 22 749 09 47<o:p></o:p></span></p>
54
+
55
+ <p class="zzCopyright" style='margin:0cm;margin-bottom:.0001pt;text-indent:20.15pt;
56
+ mso-layout-grid-align:none;text-autospace:none;border:none;mso-border-left-alt:
57
+ solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt;padding:0cm;
58
+ mso-padding-alt:0cm 4.0pt 0cm 4.0pt'><span lang="EN-GB" style='font-size:10.0pt;
59
+ mso-bidi-font-size:11.0pt;color:windowtext'>copyright@iso.org<o:p></o:p></span></p>
60
+
61
+ <p class="zzCopyright" style='margin-top:0cm;margin-right:0cm;margin-bottom:12.0pt;
62
+ margin-left:0cm;text-indent:20.15pt;mso-layout-grid-align:none;text-autospace:
63
+ none;border:none;mso-border-left-alt:solid windowtext .5pt;mso-border-bottom-alt:
64
+ solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt;padding:0cm;
65
+ mso-padding-alt:0cm 4.0pt 1.0pt 4.0pt'><span lang="EN-GB" style='font-size:10.0pt;
66
+ mso-bidi-font-size:11.0pt;color:windowtext'>www.iso.org<o:p></o:p></span></p>
67
+
68
+ </div>
69
+
70
+ <p class="zzContents" style='margin-top:0cm'><span lang="EN-GB">Contents</span></p>
71
+
72
+ WORDTOC
@@ -0,0 +1,58 @@
1
+ <p class="MsoNormal" align="right" style='text-align:right'><b style='mso-bidi-font-weight:
2
+ normal'><span lang="EN-GB" style='font-size:14.0pt;mso-no-proof:yes'>ISO&nbsp;DOCNUMBER:DOCYEAR(E) DRAFTINFO</span></b><b
3
+ style='mso-bidi-font-weight:normal'><span lang="EN-GB" style='font-size:14.0pt'><o:p></o:p></span></b></p>
4
+
5
+ <p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB"
6
+ style='mso-no-proof:yes'>ISO&nbsp;</span><span lang="EN-GB">TC&nbsp;<span
7
+ style='mso-no-proof:yes'>TCNUM</span>/SC&nbsp;<span style='mso-no-proof:yes'>SCNUM</span>/WG&nbsp;WGNUM</span></p>
8
+
9
+ <p class="MsoNormal" align="right" style='margin-bottom:100.0pt;text-align:right'><a
10
+ name="CVP_Secretariat_Loca"><span lang="EN-GB">Secretariat</span></a><span
11
+ lang="EN-GB">: <span style='mso-no-proof:yes'>SECRETARIAT</span></span></p>
12
+
13
+ <p class="MsoNormal" align="left" style='text-align:left;line-height:18.0pt;margin-bottom:0.0pt'><b
14
+ style='mso-bidi-font-weight:normal'><span lang="EN-GB" style='font-size:16.0pt'>DOCTITLE
15
+ </span></b><br/><span lang="EN-GB" style='font-size:16.0pt'>DOCSUBTITLE</span></p>
16
+
17
+ <p class="MsoNormal" style='margin-top:100.0pt'><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
18
+
19
+ <div style='mso-element:para-border-div;border:solid windowtext 1.0pt;
20
+ mso-border-alt:solid windowtext .5pt;padding:1.0pt 4.0pt 1.0pt 4.0pt;
21
+ margin-left:4.25pt;margin-right:4.25pt'>
22
+
23
+ <p class="MsoNormal" align="center" style='text-align:center;border:none;
24
+ mso-border-alt:solid windowtext .5pt;padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span
25
+ lang="EN-GB" style='font-size:40.0pt'>WD/CD/DIS/FDIS stage<o:p></o:p></span></p>
26
+
27
+ </div>
28
+
29
+ <p class="MsoNormal" style='margin-bottom:6.0pt'><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
30
+
31
+ <div style='mso-element:para-border-div;border:solid windowtext 1.0pt;
32
+ mso-border-alt:solid windowtext .5pt;padding:1.0pt 4.0pt 1.0pt 4.0pt;
33
+ margin-left:4.25pt;margin-right:4.25pt'>
34
+
35
+ <p class="MsoNormal" align="center" style='margin-bottom:6.0pt;text-align:center;
36
+ border:none;mso-border-alt:solid windowtext .5pt;padding:0cm;mso-padding-alt:
37
+ 1.0pt 4.0pt 1.0pt 4.0pt'><b style='mso-bidi-font-weight:normal'><span
38
+ lang="EN-GB" style='font-size:10.0pt;mso-bidi-font-size:11.0pt'>Warning for WDs
39
+ and CDs<o:p></o:p></span></b></p>
40
+
41
+ <p class="MsoNormal" style='margin-bottom:6.0pt;border:none;mso-border-alt:solid windowtext .5pt;
42
+ padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span lang="EN-GB"
43
+ style='font-size:10.0pt;mso-bidi-font-size:11.0pt;mso-bidi-font-weight:bold'>This
44
+ document is not an ISO International Standard. It is distributed for review and
45
+ comment. It is subject to change without notice and may not be referred to as
46
+ an International Standard.<o:p></o:p></span></p>
47
+
48
+ <p class="MsoNormal" style='border:none;mso-border-alt:solid windowtext .5pt;
49
+ padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span lang="EN-GB"
50
+ style='font-size:10.0pt;mso-bidi-font-size:11.0pt;mso-bidi-font-weight:bold'>Recipients
51
+ of this draft are invited to submit, with their comments, notification of any
52
+ relevant patent rights of which they are aware and to provide supporting
53
+ documentation.</span><span lang="EN-GB" style='font-size:10.0pt;mso-bidi-font-size:
54
+ 11.0pt'><o:p></o:p></span></p>
55
+
56
+ </div>
57
+
58
+
@@ -1,6 +1,11 @@
1
1
  module Asciidoctor
2
2
  module ISO
3
3
  module InlineAnchor
4
+
5
+ def is_refid?(x)
6
+ @refids.include? x
7
+ end
8
+
4
9
  def inline_anchor(node)
5
10
  case node.type
6
11
  when :xref
@@ -10,46 +15,35 @@ module Asciidoctor
10
15
  when :bibref
11
16
  inline_anchor_bibref node
12
17
  else
13
- warn %(asciidoctor: WARNING (#{current_location(node)}): unknown anchor type: #{node.type.inspect})
18
+ warning(node, "unknown anchor type", node.type.inspect)
14
19
  end
15
20
  end
16
21
 
17
22
  def inline_anchor_xref(node)
23
+ f = "inline"
24
+ c = node.text
18
25
  matched = /^fn(: (?<text>.*))?$/.match node.text
19
- if matched.nil?
20
- format = "inline"
21
- xref_contents = node.text
22
- else
23
- format = "footnote"
24
- xref_contents = matched[:text]
26
+ unless matched.nil?
27
+ f = "footnote"
28
+ c = matched[:text]
25
29
  end
26
- xref_attributes = {
27
- target: node.target.gsub(/^#/, "").gsub(/(.)(\.xml)?#.*$/, "\\1"),
28
- format: format,
29
- }
30
-
31
- noko do |xml|
32
- xml.xref xref_contents, **attr_code(xref_attributes)
33
- end.join
30
+ t = node.target.gsub(/^#/, "").gsub(%r{(.)(\.xml)?#.*$}, "\\1")
31
+ noko { |xml| xml.xref c, **attr_code(target: t, type: f) }.join
34
32
  end
35
33
 
36
34
  def inline_anchor_link(node)
37
- eref_contents = node.target == node.text ? nil : node.text
38
- eref_attributes = {
39
- target: node.target,
40
- }
41
-
35
+ contents = node.text
36
+ contents = nil if node.target.gsub(%r{^mailto:}, "") == node.text
37
+ attributes = { "target": node.target }
42
38
  noko do |xml|
43
- xml.eref eref_contents, **attr_code(eref_attributes)
39
+ xml.link contents, **attr_code(attributes)
44
40
  end.join
45
41
  end
46
42
 
47
43
  def inline_anchor_bibref(node)
48
44
  eref_contents = node.target == node.text ? nil : node.text
49
- eref_attributes = {
50
- anchor: node.target,
51
- }
52
-
45
+ eref_attributes = { id: node.target }
46
+ @refids << node.target
53
47
  noko do |xml|
54
48
  xml.ref eref_contents, **attr_code(eref_attributes)
55
49
  end.join
@@ -57,7 +51,7 @@ module Asciidoctor
57
51
 
58
52
  def inline_callout(node)
59
53
  noko do |xml|
60
- xml.ref node.text
54
+ xml.callout node.text
61
55
  end.join
62
56
  end
63
57
  end
@@ -0,0 +1,177 @@
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 ? }
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 ? }
9
+ version = element version { edition ? , revision-date ? , draft ? }
10
+ edition = element edition { xsd:int }
11
+ 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
+ sections = element sections { content , content ? , clause , references , terms , clause + , annex * , references ? }
17
+ section-title = element title { text }
18
+ content = element content { Content-Section }
19
+ content-subsection = element subsection { Content-Section }
20
+ Content-Section = attribute id { xsd:ID } ? , section-title ? , ( BasicBlock + | content-subsection + ) clause = element clause { Clause-Section }
21
+ Clause-Section = attribute id { xsd:ID } ? , attribute inline-header { xsd:boolean } ? , section-title ? , ( BasicBlock + | clause-subsection + ) clause-subsection = element subsection { Clause-Section }
22
+ annex = element annex { attribute id { xsd:ID } ? , attribute inline-header { xsd:boolean } ? , attribute subtype { "normative" | "informative" } ? , section-title ? , BasicBlock * , clause-hanging-paragraph-with-footnote * }
23
+ references = element references { attribute id { xsd:ID } ? , section-title ? , bibitem * , references * }
24
+ terms = element terms { attribute id { xsd:ID } ? , section-title ? , paragraph-with-footnote * , ul ? , ( term + | terms ? ) }
25
+ term = element term { attribute id { xsd:ID } ? , preferred , admitted * , deprecates * , termdomain ? , definition , termnote * , termexample * , termsource * }
26
+ preferred = element preferred { TextElement + }
27
+ admitted = element admitted { TextElement + }
28
+ deprecates = element deprecates { TextElement + }
29
+ termdomain = element domain { TextElement + }
30
+ definition = element definition { ( paragraph | figure | formula ) + }
31
+ termnote = element termnote { attribute id { xsd:ID } , paragraph }
32
+ termexample = element termexample { attribute id { xsd:ID } , BasicBlock }
33
+ termsource = element termsource { attribute status { ( "identical" | "modified" ) } , origin , modification ? }
34
+ origin = element origin { attribute citeas { text } , CitationType }
35
+ modification = element modification { paragraph }
36
+ BasicBlock = paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | figure | quote | sourcecode | example paragraph = element p { ParagraphType }
37
+ Alignments = ( "left" | "right" | "center" | "justified" ) ParagraphType = attribute id { xsd:ID } , attribute align { Alignments } ? , ( TextElement ) * , review * paragraph-with-footnote = element p { attribute id { xsd:ID } , attribute align { Alignments } ? , ( TextElement | fn ) * , review * }
38
+ note = element note { attribute id { xsd:ID } , paragraph-with-footnote + }
39
+ review = element review { attribute id { xsd:ID } , attribute reviewer { text } ? , attribute date { xsd:date } ? , attribute from { xsd:ID } , attribute to { xsd:ID } , paragraph + }
40
+ formula = element formula { attribute id { xsd:ID } , stem , dl ? }
41
+ quote = element quote { attribute id { xsd:ID } , attribute alignment { Alignments } ? , quote-source ? , quote-author ? , paragraph-with-footnote + }
42
+ quote-source = element source { CitationType }
43
+ quote-author = element author { CreatorInfo }
44
+ sourcecode = element sourcecode { attribute id { xsd:ID } , tname ? , ( text | callout ) + , annotation * }
45
+ table = element table { attribute id { xsd:ID } , tname ? , thead ? , tbody , tfoot ? , table-note * , dl ? }
46
+ tname = element name { text }
47
+ thead = element thead { tr + }
48
+ tfoot = element tfoot { tr }
49
+ tbody = element tbody { tr + }
50
+ table-note = element note { attribute id { xsd:ID } ? , paragraph }
51
+ tr = element tr { ( td | th ) + }
52
+ td = element td { attribute colspan { text } ? , attribute rowspan { text } ? , attribute align { "left" | "right" | "center" } ? , ( ( TextElement | fn | review ) * | paragraph-with-footnote + ) }
53
+ th = element th { attribute colspan { text } ? , attribute rowspan { text } ? , attribute align { "left" | "right" | "center" } ? , ( ( TextElement | fn | review ) * | paragraph-with-footnote + ) }
54
+ example = element example { attribute id { xsd:ID } , ( formula | ul | ol | dl | quote | sourcecode | paragraph-with-footnote | review ) + }
55
+ admonition = element admonition { attribute id { xsd:ID } , attribute type { ( "danger" | "caution" | "warning" | "important" | "safety precautions" ) } , paragraph-with-footnote + }
56
+ figure = element figure { attribute id { xsd:ID } , tname ? , ( image | figure + ) , fn * , dl ? , note * }
57
+ TextElement = text | em | eref | strong | stem | sub | sup | tt | strike | smallcap | xref | br | hyperlink | hr | pagebreak | bookmark em = element em { text }
58
+ strong = element strong { text }
59
+ tt = element tt { text }
60
+ sub = element sub { text }
61
+ sup = element sup { text }
62
+ strike = element strike { text }
63
+ smallcap = element smallcap { text }
64
+ br = element br { empty }
65
+ hr = element hr { empty }
66
+ pagebreak = element pagebreak { empty }
67
+ bookmark = element bookmark { attribute id { xsd:ID } , empty }
68
+ ReferenceFormat = ( "external" | "inline" | "footnote" | "callout" ) eref = element eref { attribute normative { xsd:boolean } ? , attribute citeas { text } , attribute type { ReferenceFormat } , CitationType , text }
69
+ hyperlink = element link { attribute target { xsd:anyURI } , text }
70
+ xref = element xref { attribute target { xsd:IDREF } , text }
71
+ fn = element fn { attribute reference { text } , paragraph + }
72
+ callout = element callout { attribute target { xsd:IDREF } , text }
73
+ image = element image { attribute id { xsd:ID } , attribute src { xsd:anyURI } ? , attribute imagetype { ( "SVG" | "JPEG" | "GIF" | "PNG" | "PDF" ) } , attribute width { xsd:int } ? , attribute height { xsd:int } ? }
74
+ stem = element stem { attribute type { "MathML" | "AsciiMath" } , text }
75
+ annotation = element annotation { attribute id { xsd:ID } , paragraph }
76
+ ul = element ul { attribute id { xsd:ID } , li + }
77
+ li = element li { BasicBlock + }
78
+ ol = element ol { attribute id { xsd:ID } , attribute type { ( "roman" | "alphabet" | "arabic" | "roman_upper" | "alphabet_upper" ) } , li + }
79
+ dl = element dl { attribute id { xsd:ID } , ( dt , dd ) + }
80
+ dt = element dt { TextElement }
81
+ 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 }
93
+ uri = element uri { xsd:anyURI }
94
+ address = element address { street + , city , state ? , country , postcode ? }
95
+ street = element street { text }
96
+ city = element city { text }
97
+ state = element state { text }
98
+ country = element country { text }
99
+ postcode = element postcode { text }
100
+ person-identifier = element identifier { attribute type { ( "isni" | "uri" ) } , text }
101
+ org-identifier = element identifier { attribute type { ( "orcid" | "uri" ) } , text }
102
+ citation = element citation { CitationType }
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 + }
108
+ 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 }
115
+ partof = element partof { BibliographicItem }
116
+ iso-standard = element iso-standard { title + , status , creator , language , script , type , id , version ? , copyright , sections }
117
+ draft = element draft { text }
118
+ owner-affiliation = element affiliation { "ISO" }
119
+ stage = element stage { ( "00" | "10" | "20" | "30" | "40" | "50" | "60" | "90" | "95" ) }
120
+ substage = element substage { ( "00" | "20" | "60" | "90" | "92" | "93" | "98" | "99" ) }
121
+ documentnumber = element project-number { attribute part { xsd:int } ? , xsd:int }
122
+ tc-documentnumber = element tc-document-number { xsd:int }
123
+ technical-committee = element technical-committee { attribute number { xsd:int } ? , text }
124
+ subcommittee = element subcommittee { attribute number { xsd:int } ? , text }
125
+ workgroup = element workgroup { attribute number { xsd:int } ? , text }
126
+ secretariat = element secretariat { text }
127
+ title-intro = element title-intro { text }
128
+ title-main = element title-main { text }
129
+ title-part = element title-part { text }
130
+ clause-hanging-paragraph-with-footnote = element subsection { attribute id { xsd:ID } ? , attribute inline-header { xsd:boolean } ? , section-title ? , BasicBlock * , clause-hanging-paragraph-with-footnote * }
131
+
132
+ }
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
@@ -0,0 +1,1478 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
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"/>
47
+ <optional>
48
+ <ref name="substage"/>
49
+ </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
+ <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>
74
+ </choice>
75
+ </element>
76
+ </define>
77
+ <define name="id">
78
+ <element name="id">
79
+ <ref name="documentnumber"/>
80
+ <optional>
81
+ <ref name="tc-documentnumber"/>
82
+ </optional>
83
+ </element>
84
+ </define>
85
+ <define name="version">
86
+ <element name="version">
87
+ <optional>
88
+ <ref name="edition"/>
89
+ </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
+ <zeroOrMore>
142
+ <ref name="annex"/>
143
+ </zeroOrMore>
144
+ <optional>
145
+ <ref name="references"/>
146
+ </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
+ <optional>
218
+ <attribute name="id">
219
+ <data type="ID"/>
220
+ </attribute>
221
+ </optional>
222
+ <optional>
223
+ <attribute name="inline-header">
224
+ <data type="boolean"/>
225
+ </attribute>
226
+ </optional>
227
+ <optional>
228
+ <attribute name="subtype">
229
+ <choice>
230
+ <value>normative</value>
231
+ <value>informative</value>
232
+ </choice>
233
+ </attribute>
234
+ </optional>
235
+ <optional>
236
+ <ref name="section-title"/>
237
+ </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">
248
+ <optional>
249
+ <attribute name="id">
250
+ <data type="ID"/>
251
+ </attribute>
252
+ </optional>
253
+ <optional>
254
+ <ref name="section-title"/>
255
+ </optional>
256
+ <zeroOrMore>
257
+ <ref name="bibitem"/>
258
+ </zeroOrMore>
259
+ <zeroOrMore>
260
+ <ref name="references"/>
261
+ </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
+ <zeroOrMore>
275
+ <ref name="paragraph-with-footnote"/>
276
+ </zeroOrMore>
277
+ <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>
296
+ </optional>
297
+ <ref name="preferred"/>
298
+ <zeroOrMore>
299
+ <ref name="admitted"/>
300
+ </zeroOrMore>
301
+ <zeroOrMore>
302
+ <ref name="deprecates"/>
303
+ </zeroOrMore>
304
+ <optional>
305
+ <ref name="termdomain"/>
306
+ </optional>
307
+ <ref name="definition"/>
308
+ <zeroOrMore>
309
+ <ref name="termnote"/>
310
+ </zeroOrMore>
311
+ <zeroOrMore>
312
+ <ref name="termexample"/>
313
+ </zeroOrMore>
314
+ <zeroOrMore>
315
+ <ref name="termsource"/>
316
+ </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
+ <optional>
384
+ <ref name="modification"/>
385
+ </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
+ <optional>
450
+ <attribute name="align">
451
+ <ref name="Alignments"/>
452
+ </attribute>
453
+ </optional>
454
+ <zeroOrMore>
455
+ <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">
485
+ <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>
550
+ <choice>
551
+ <text/>
552
+ <ref name="callout"/>
553
+ </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>
620
+ <choice>
621
+ <ref name="td"/>
622
+ <ref name="th"/>
623
+ </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">
637
+ <choice>
638
+ <value>left</value>
639
+ <value>right</value>
640
+ <value>center</value>
641
+ </choice>
642
+ </attribute>
643
+ </optional>
644
+ <choice>
645
+ <zeroOrMore>
646
+ <choice>
647
+ <ref name="TextElement"/>
648
+ <ref name="fn"/>
649
+ <ref name="review"/>
650
+ </choice>
651
+ </zeroOrMore>
652
+ <oneOrMore>
653
+ <ref name="paragraph-with-footnote"/>
654
+ </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>
673
+ </attribute>
674
+ </optional>
675
+ <choice>
676
+ <zeroOrMore>
677
+ <choice>
678
+ <ref name="TextElement"/>
679
+ <ref name="fn"/>
680
+ <ref name="review"/>
681
+ </choice>
682
+ </zeroOrMore>
683
+ <oneOrMore>
684
+ <ref name="paragraph-with-footnote"/>
685
+ </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"/>
843
+ </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">
892
+ <data type="anyURI"/>
893
+ </attribute>
894
+ </optional>
895
+ <attribute name="imagetype">
896
+ <choice>
897
+ <value>SVG</value>
898
+ <value>JPEG</value>
899
+ <value>GIF</value>
900
+ <value>PNG</value>
901
+ <value>PDF</value>
902
+ </choice>
903
+ </attribute>
904
+ <optional>
905
+ <attribute name="width">
906
+ <data type="int"/>
907
+ </attribute>
908
+ </optional>
909
+ <optional>
910
+ <attribute name="height">
911
+ <data type="int"/>
912
+ </attribute>
913
+ </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>
966
+ <oneOrMore>
967
+ <ref name="li"/>
968
+ </oneOrMore>
969
+ </element>
970
+ </define>
971
+ <define name="dl">
972
+ <element name="dl">
973
+ <attribute name="id">
974
+ <data type="ID"/>
975
+ </attribute>
976
+ <oneOrMore>
977
+ <ref name="dt"/>
978
+ <ref name="dd"/>
979
+ </oneOrMore>
980
+ </element>
981
+ </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>
991
+ </define>
992
+ <define name="creator">
993
+ <element name="creator">
994
+ <attribute name="role"/>
995
+ <ref name="technical-committee"/>
996
+ <optional>
997
+ <ref name="subcommittee"/>
998
+ </optional>
999
+ <optional>
1000
+ <ref name="workgroup"/>
1001
+ </optional>
1002
+ <optional>
1003
+ <ref name="secretariat"/>
1004
+ </optional>
1005
+ </element>
1006
+ </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"/>
1331
+ </element>
1332
+ </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"/>
1349
+ </element>
1350
+ </define>
1351
+ <define name="draft">
1352
+ <element name="draft">
1353
+ <text/>
1354
+ </element>
1355
+ </define>
1356
+ <define name="owner-affiliation">
1357
+ <element name="affiliation">
1358
+ <value>ISO</value>
1359
+ </element>
1360
+ </define>
1361
+ <define name="stage">
1362
+ <element name="stage">
1363
+ <choice>
1364
+ <value>00</value>
1365
+ <value>10</value>
1366
+ <value>20</value>
1367
+ <value>30</value>
1368
+ <value>40</value>
1369
+ <value>50</value>
1370
+ <value>60</value>
1371
+ <value>90</value>
1372
+ <value>95</value>
1373
+ </choice>
1374
+ </element>
1375
+ </define>
1376
+ <define name="substage">
1377
+ <element name="substage">
1378
+ <choice>
1379
+ <value>00</value>
1380
+ <value>20</value>
1381
+ <value>60</value>
1382
+ <value>90</value>
1383
+ <value>92</value>
1384
+ <value>93</value>
1385
+ <value>98</value>
1386
+ <value>99</value>
1387
+ </choice>
1388
+ </element>
1389
+ </define>
1390
+ <define name="documentnumber">
1391
+ <element name="project-number">
1392
+ <optional>
1393
+ <attribute name="part">
1394
+ <data type="int"/>
1395
+ </attribute>
1396
+ </optional>
1397
+ <data type="int"/>
1398
+ </element>
1399
+ </define>
1400
+ <define name="tc-documentnumber">
1401
+ <element name="tc-document-number">
1402
+ <data type="int"/>
1403
+ </element>
1404
+ </define>
1405
+ <define name="technical-committee">
1406
+ <element name="technical-committee">
1407
+ <optional>
1408
+ <attribute name="number">
1409
+ <data type="int"/>
1410
+ </attribute>
1411
+ </optional>
1412
+ <text/>
1413
+ </element>
1414
+ </define>
1415
+ <define name="subcommittee">
1416
+ <element name="subcommittee">
1417
+ <optional>
1418
+ <attribute name="number">
1419
+ <data type="int"/>
1420
+ </attribute>
1421
+ </optional>
1422
+ <text/>
1423
+ </element>
1424
+ </define>
1425
+ <define name="workgroup">
1426
+ <element name="workgroup">
1427
+ <optional>
1428
+ <attribute name="number">
1429
+ <data type="int"/>
1430
+ </attribute>
1431
+ </optional>
1432
+ <text/>
1433
+ </element>
1434
+ </define>
1435
+ <define name="secretariat">
1436
+ <element name="secretariat">
1437
+ <text/>
1438
+ </element>
1439
+ </define>
1440
+ <define name="title-intro">
1441
+ <element name="title-intro">
1442
+ <text/>
1443
+ </element>
1444
+ </define>
1445
+ <define name="title-main">
1446
+ <element name="title-main">
1447
+ <text/>
1448
+ </element>
1449
+ </define>
1450
+ <define name="title-part">
1451
+ <element name="title-part">
1452
+ <text/>
1453
+ </element>
1454
+ </define>
1455
+ <define name="clause-hanging-paragraph-with-footnote">
1456
+ <element name="subsection">
1457
+ <optional>
1458
+ <attribute name="id">
1459
+ <data type="ID"/>
1460
+ </attribute>
1461
+ </optional>
1462
+ <optional>
1463
+ <attribute name="inline-header">
1464
+ <data type="boolean"/>
1465
+ </attribute>
1466
+ </optional>
1467
+ <optional>
1468
+ <ref name="section-title"/>
1469
+ </optional>
1470
+ <zeroOrMore>
1471
+ <ref name="BasicBlock"/>
1472
+ </zeroOrMore>
1473
+ <zeroOrMore>
1474
+ <ref name="clause-hanging-paragraph-with-footnote"/>
1475
+ </zeroOrMore>
1476
+ </element>
1477
+ </define>
1478
+ </grammar>