metanorma-itu 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.hound.yml +3 -0
- data/.rubocop.yml +10 -0
- data/.travis.yml +17 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE +25 -0
- data/README.adoc +72 -0
- data/Rakefile +6 -0
- data/appveyor.yml +29 -0
- data/lib/asciidoctor/itu.rb +7 -0
- data/lib/asciidoctor/itu/biblio.rng +949 -0
- data/lib/asciidoctor/itu/converter.rb +164 -0
- data/lib/asciidoctor/itu/front.rb +182 -0
- data/lib/asciidoctor/itu/isodoc.rng +1132 -0
- data/lib/asciidoctor/itu/isostandard.rng +801 -0
- data/lib/asciidoctor/itu/itu.rng +223 -0
- data/lib/asciidoctor/itu/reqt.rng +162 -0
- data/lib/asciidoctor/itu/validate.rb +55 -0
- data/lib/isodoc/itu.rb +11 -0
- data/lib/isodoc/itu/base_convert.rb +210 -0
- data/lib/isodoc/itu/html/Logo_ITU.jpg +0 -0
- data/lib/isodoc/itu/html/header.html +162 -0
- data/lib/isodoc/itu/html/html_itu_intro.html +42 -0
- data/lib/isodoc/itu/html/html_itu_titlepage.html +144 -0
- data/lib/isodoc/itu/html/htmlstyle.scss +1167 -0
- data/lib/isodoc/itu/html/itu-document-comb.png +0 -0
- data/lib/isodoc/itu/html/itu.scss +707 -0
- data/lib/isodoc/itu/html/logo.png +0 -0
- data/lib/isodoc/itu/html/scripts.html +82 -0
- data/lib/isodoc/itu/html/scripts.pdf.html +70 -0
- data/lib/isodoc/itu/html/word_itu_intro.html +246 -0
- data/lib/isodoc/itu/html/word_itu_titlepage.html +283 -0
- data/lib/isodoc/itu/html/wordstyle.scss +1237 -0
- data/lib/isodoc/itu/html_convert.rb +72 -0
- data/lib/isodoc/itu/i18n-en.yaml +2 -0
- data/lib/isodoc/itu/metadata.rb +100 -0
- data/lib/isodoc/itu/pdf_convert.rb +70 -0
- data/lib/isodoc/itu/word_convert.rb +115 -0
- data/lib/metanorma-itu.rb +8 -0
- data/lib/metanorma/itu.rb +11 -0
- data/lib/metanorma/itu/processor.rb +43 -0
- data/lib/metanorma/itu/version.rb +5 -0
- data/metanorma-itu.gemspec +44 -0
- metadata +327 -0
@@ -0,0 +1,164 @@
|
|
1
|
+
require "asciidoctor"
|
2
|
+
require "asciidoctor/standoc/converter"
|
3
|
+
require "fileutils"
|
4
|
+
require_relative "./front.rb"
|
5
|
+
require_relative "./validate.rb"
|
6
|
+
|
7
|
+
module Asciidoctor
|
8
|
+
module ITU
|
9
|
+
|
10
|
+
# A {Converter} implementation that generates RSD output, and a document
|
11
|
+
# schema encapsulation of the document for validation
|
12
|
+
#
|
13
|
+
class Converter < Standoc::Converter
|
14
|
+
|
15
|
+
register_for "itu"
|
16
|
+
|
17
|
+
def title_validate(root)
|
18
|
+
nil
|
19
|
+
end
|
20
|
+
|
21
|
+
def makexml(node)
|
22
|
+
result = ["<?xml version='1.0' encoding='UTF-8'?>\n<itu-standard>"]
|
23
|
+
@draft = node.attributes.has_key?("draft")
|
24
|
+
result << noko { |ixml| front node, ixml }
|
25
|
+
result << noko { |ixml| middle node, ixml }
|
26
|
+
result << "</itu-standard>"
|
27
|
+
result = textcleanup(result)
|
28
|
+
ret1 = cleanup(Nokogiri::XML(result))
|
29
|
+
validate(ret1)
|
30
|
+
ret1.root.add_namespace(nil, Metanorma::ITU::DOCUMENT_NAMESPACE)
|
31
|
+
ret1
|
32
|
+
end
|
33
|
+
|
34
|
+
def doctype(node)
|
35
|
+
node.attr("doctype") || "recommendation"
|
36
|
+
end
|
37
|
+
|
38
|
+
def clause_parse(attrs, xml, node)
|
39
|
+
attrs[:preface] = true if node.attr("style") == "preface"
|
40
|
+
super
|
41
|
+
end
|
42
|
+
|
43
|
+
def move_sections_into_preface(x, preface)
|
44
|
+
x.xpath("//clause[@preface]").each do |c|
|
45
|
+
c.delete("preface")
|
46
|
+
preface.add_child c.remove
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def make_preface(x, s)
|
51
|
+
make_abstract(x, s)
|
52
|
+
move_sections_into_preface(x, x.at("//preface"))
|
53
|
+
end
|
54
|
+
|
55
|
+
def document(node)
|
56
|
+
init(node)
|
57
|
+
ret1 = makexml(node)
|
58
|
+
ret = ret1.to_xml(indent: 2)
|
59
|
+
unless node.attr("nodoc") || !node.attr("docfile")
|
60
|
+
filename = node.attr("docfile").gsub(/\.adoc/, ".xml").
|
61
|
+
gsub(%r{^.*/}, "")
|
62
|
+
File.open(filename, "w") { |f| f.write(ret) }
|
63
|
+
html_converter(node).convert filename unless node.attr("nodoc")
|
64
|
+
word_converter(node).convert filename unless node.attr("nodoc")
|
65
|
+
pdf_converter(node).convert filename unless node.attr("nodoc")
|
66
|
+
end
|
67
|
+
@files_to_delete.each { |f| FileUtils.rm f }
|
68
|
+
ret
|
69
|
+
end
|
70
|
+
|
71
|
+
def validate(doc)
|
72
|
+
content_validate(doc)
|
73
|
+
schema_validate(formattedstr_strip(doc.dup),
|
74
|
+
File.join(File.dirname(__FILE__), "itu.rng"))
|
75
|
+
end
|
76
|
+
|
77
|
+
def sections_cleanup(x)
|
78
|
+
super
|
79
|
+
x.xpath("//*[@inline-header]").each do |h|
|
80
|
+
h.delete("inline-header")
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def style(n, t)
|
85
|
+
return
|
86
|
+
end
|
87
|
+
|
88
|
+
def section(node)
|
89
|
+
a = { id: Asciidoctor::Standoc::Utils::anchor_or_uuid(node) }
|
90
|
+
noko do |xml|
|
91
|
+
case sectiontype(node)
|
92
|
+
when "references" then norm_ref_parse(a, xml, node)
|
93
|
+
when "terms and definitions",
|
94
|
+
"terms, definitions, symbols and abbreviated terms",
|
95
|
+
"terms, definitions, symbols and abbreviations",
|
96
|
+
"terms, definitions and symbols",
|
97
|
+
"terms, definitions and abbreviations",
|
98
|
+
"terms, definitions and abbreviated terms",
|
99
|
+
"definitions"
|
100
|
+
@term_def = true
|
101
|
+
term_def_parse(a, xml, node, true)
|
102
|
+
@term_def = false
|
103
|
+
when "symbols and abbreviated terms",
|
104
|
+
"symbols",
|
105
|
+
"abbreviated terms",
|
106
|
+
"abbreviations"
|
107
|
+
"abbreviations and acronyms"
|
108
|
+
symbols_parse(a, xml, node)
|
109
|
+
when "bibliography" then bibliography_parse(a, xml, node)
|
110
|
+
else
|
111
|
+
if @term_def then term_def_subclause_parse(a, xml, node)
|
112
|
+
elsif @definitions then symbols_parse(a, xml, node)
|
113
|
+
elsif @biblio then bibliography_parse(a, xml, node)
|
114
|
+
elsif node.attr("style") == "bibliography"
|
115
|
+
bibliography_parse(a, xml, node)
|
116
|
+
elsif node.attr("style") == "abstract"
|
117
|
+
abstract_parse(a, xml, node)
|
118
|
+
elsif node.attr("style") == "appendix" && node.level == 1
|
119
|
+
annex_parse(a, xml, node)
|
120
|
+
else
|
121
|
+
clause_parse(a, xml, node)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end.join("\n")
|
125
|
+
end
|
126
|
+
|
127
|
+
def norm_ref_parse(attrs, xml, node)
|
128
|
+
@norm_ref = true
|
129
|
+
xml.references **attr_code(attrs) do |xml_section|
|
130
|
+
xml_section.title { |t| t << "References" }
|
131
|
+
xml_section << node.content
|
132
|
+
end
|
133
|
+
@norm_ref = false
|
134
|
+
end
|
135
|
+
|
136
|
+
def term_def_title(toplevel, node)
|
137
|
+
return node.title unless toplevel
|
138
|
+
"Definitions"
|
139
|
+
end
|
140
|
+
|
141
|
+
def termdef_cleanup(xmldoc)
|
142
|
+
xmldoc.xpath("//term/preferred").each do |p|
|
143
|
+
if ["terms defined elsewhere", "terms defined in this recommendation"].include? p.text.downcase
|
144
|
+
p.name = "title"
|
145
|
+
p.parent.name = "terms"
|
146
|
+
end
|
147
|
+
end
|
148
|
+
super
|
149
|
+
end
|
150
|
+
|
151
|
+
def html_converter(node)
|
152
|
+
IsoDoc::ITU::HtmlConvert.new(html_extract_attributes(node))
|
153
|
+
end
|
154
|
+
|
155
|
+
def pdf_converter(node)
|
156
|
+
IsoDoc::ITU::PdfConvert.new(html_extract_attributes(node))
|
157
|
+
end
|
158
|
+
|
159
|
+
def word_converter(node)
|
160
|
+
IsoDoc::ITU::WordConvert.new(doc_extract_attributes(node))
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
@@ -0,0 +1,182 @@
|
|
1
|
+
require "asciidoctor"
|
2
|
+
require "asciidoctor/standoc/converter"
|
3
|
+
require "fileutils"
|
4
|
+
|
5
|
+
module Asciidoctor
|
6
|
+
module ITU
|
7
|
+
|
8
|
+
# A {Converter} implementation that generates RSD output, and a document
|
9
|
+
# schema encapsulation of the document for validation
|
10
|
+
#
|
11
|
+
class Converter < Standoc::Converter
|
12
|
+
|
13
|
+
def title_english(node, xml)
|
14
|
+
["en"].each do |lang|
|
15
|
+
at = { language: lang, format: "text/plain", type: "main" }
|
16
|
+
xml.title **attr_code(at) do |t|
|
17
|
+
t << asciidoc_sub(node.attr("title") || node.attr("title-en") || node.title)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def title_otherlangs(node, xml)
|
23
|
+
node.attributes.each do |k, v|
|
24
|
+
next unless /^title-(?<titlelang>.+)$/ =~ k
|
25
|
+
next if titlelang == "en"
|
26
|
+
xml.title v, { language: titlelang, format: "text/plain", type: "main" }
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def metadata_author(node, xml)
|
31
|
+
xml.contributor do |c|
|
32
|
+
c.role **{ type: "author" }
|
33
|
+
c.organization do |a|
|
34
|
+
a.name "International Telecommunication Union"
|
35
|
+
a.abbreviation "ITU"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def metadata_publisher(node, xml)
|
41
|
+
xml.contributor do |c|
|
42
|
+
c.role **{ type: "publisher" }
|
43
|
+
c.organization do |a|
|
44
|
+
a.name "International Telecommunication Union"
|
45
|
+
a.abbreviation "ITU"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def metadata_committee(node, xml)
|
51
|
+
metadata_committee1(node, xml, "")
|
52
|
+
suffix = 2
|
53
|
+
while node.attr("bureau_#{suffix}")
|
54
|
+
metadata_committee1(node, xml, "_#{suffix}")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def metadata_committee1(node, xml, suffix)
|
59
|
+
xml.editorialgroup do |a|
|
60
|
+
a.bureau ( node.attr("bureau#{suffix}") || "T" )
|
61
|
+
a.group **attr_code(type: node.attr("grouptype#{suffix}")) do |g|
|
62
|
+
g.name node.attr("group#{suffix}")
|
63
|
+
g.acronym node.attr("groupacronym#{suffix}") if node.attr("groupacronym#{suffix}")
|
64
|
+
if node.attr("groupyearstart#{suffix}")
|
65
|
+
g.period do |p|
|
66
|
+
period.start node.attr("groupyearstart#{suffix}")
|
67
|
+
period.end node.attr("groupyearend#{suffix}") if node.attr("groupacronym#{suffix}")
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
if node.attr("subgroup#{suffix}")
|
72
|
+
a.subgroup **attr_code(type: node.attr("subgrouptype#{suffix}")) do |g|
|
73
|
+
g.name node.attr("subgroup#{suffix}")
|
74
|
+
g.acronym node.attr("subgroupacronym#{suffix}") if node.attr("subgroupacronym#{suffix}")
|
75
|
+
if node.attr("subgroupyearstart#{suffix}")
|
76
|
+
g.period do |p|
|
77
|
+
period.start node.attr("subgroupyearstart#{suffix}")
|
78
|
+
period.end node.attr("subgroupyearend#{suffix}") if node.attr("subgroupyearend#{suffix}")
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
if node.attr("workgroup#{suffix}")
|
84
|
+
a.workgroup **attr_code(type: node.attr("workgrouptype#{suffix}")) do |g|
|
85
|
+
g.name node.attr("workgroup#{suffix}")
|
86
|
+
g.acronym node.attr("workgroupacronym#{suffix}") if node.attr("workgroupacronym#{suffix}")
|
87
|
+
if node.attr("workgroupyearstart#{suffix}")
|
88
|
+
g.period do |p|
|
89
|
+
period.start node.attr("workgroupyearstart#{suffix}")
|
90
|
+
period.end node.attr("workgroupyearend#{suffix}") if node.attr("wokrgroupyearend#{suffix}")
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
def metadata_id(node, xml)
|
99
|
+
itu_id(node, xml)
|
100
|
+
provisional_id(node, xml)
|
101
|
+
end
|
102
|
+
|
103
|
+
def provisional_id(node, xml)
|
104
|
+
return unless node.attr("provisional-name")
|
105
|
+
xml.docidentifier **{type: "ITU-provisional"} do |i|
|
106
|
+
i << node.attr("provisional-name")
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
def itu_id(node, xml)
|
111
|
+
bureau = node.attr("bureau") || "T"
|
112
|
+
return unless node.attr("docnumber")
|
113
|
+
xml.docidentifier **{type: "ITU"} do |i|
|
114
|
+
i << "ITU-#{bureau} "\
|
115
|
+
"#{node.attr("docnumber")}"
|
116
|
+
end
|
117
|
+
xml.docnumber { |i| i << node.attr("docnumber") }
|
118
|
+
end
|
119
|
+
|
120
|
+
def metadata_copyright(node, xml)
|
121
|
+
from = node.attr("copyright-year") || Date.today.year
|
122
|
+
xml.copyright do |c|
|
123
|
+
c.from from
|
124
|
+
c.owner do |owner|
|
125
|
+
owner.organization do |o|
|
126
|
+
o.name "International Telecommunication Union"
|
127
|
+
o.abbreviation "ITU"
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
def metadata_series(node, xml)
|
134
|
+
node.attr("series") and
|
135
|
+
xml.series **{ type: "main" } do |s|
|
136
|
+
s.title node.attr("series")
|
137
|
+
end
|
138
|
+
node.attr("series1") and
|
139
|
+
xml.series **{ type: "secondary" } do |s|
|
140
|
+
s.title node.attr("series1")
|
141
|
+
end
|
142
|
+
node.attr("series2") and
|
143
|
+
xml.series **{ type: "tertiary" } do |s|
|
144
|
+
s.title node.attr("series2")
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
def metadata_keywords(node, xml)
|
149
|
+
return unless node.attr("keywords")
|
150
|
+
node.attr("keywords").split(/,[ ]*/).each do |kw|
|
151
|
+
xml.keyword kw
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
def metadata_recommendationstatus(node, xml)
|
156
|
+
return unless node.attr("recommendation-from")
|
157
|
+
xml.recommendationstatus do |s|
|
158
|
+
s.from node.attr("recommendation-from")
|
159
|
+
s.to node.attr("recommendation-to") if node.attr("recommendation-to")
|
160
|
+
if node.attr("approval-process")
|
161
|
+
s.approvalstage **{process: node.attr("approval-process")} do |a|
|
162
|
+
a << node.attr("approval-status")
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
def metadata_ip_notice(node, xml)
|
169
|
+
xml.ip_notice_received (node.attr("ip-notice-received") || "false")
|
170
|
+
end
|
171
|
+
|
172
|
+
def metadata_ext(node, xml)
|
173
|
+
metadata_doctype(node, ext)
|
174
|
+
metadata_committee(node, ext)
|
175
|
+
metadata_ics(node, ext)
|
176
|
+
metadata_keywords(node, xml)
|
177
|
+
metadata_recommendationstatus(node, xml)
|
178
|
+
metadata_ip_notice(node, xml)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
@@ -0,0 +1,1132 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!--
|
3
|
+
instantiations of this grammar may replace leaf strings
|
4
|
+
with more elaborated types; e.g. title (text) replaced with
|
5
|
+
title-main, title-intro, title-part; type replaced with
|
6
|
+
enum.
|
7
|
+
|
8
|
+
some renaming at leaf nodes is permissible
|
9
|
+
|
10
|
+
obligations can change both from optional to mandatory,
|
11
|
+
and from mandatory to optional; optional elements may
|
12
|
+
be omitted; freely positioned alternatives may be replaced
|
13
|
+
with strict ordering
|
14
|
+
|
15
|
+
DO NOT introduce a namespace here. We do not want a distinct namespace
|
16
|
+
for these elements, and a distinct namespace for any grammar inheriting
|
17
|
+
these elements; we just want one namespace for any child grammars
|
18
|
+
of this.
|
19
|
+
-->
|
20
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
21
|
+
<include href="reqt.rng"/>
|
22
|
+
<include href="biblio.rng"/>
|
23
|
+
<start>
|
24
|
+
<ref name="standard-document"/>
|
25
|
+
</start>
|
26
|
+
<define name="standard-document">
|
27
|
+
<element name="standard-document">
|
28
|
+
<ref name="bibdata"/>
|
29
|
+
<optional>
|
30
|
+
<ref name="boilerplate"/>
|
31
|
+
</optional>
|
32
|
+
<optional>
|
33
|
+
<ref name="preface"/>
|
34
|
+
</optional>
|
35
|
+
<ref name="sections"/>
|
36
|
+
<zeroOrMore>
|
37
|
+
<ref name="annex"/>
|
38
|
+
</zeroOrMore>
|
39
|
+
<zeroOrMore>
|
40
|
+
<ref name="references"/>
|
41
|
+
</zeroOrMore>
|
42
|
+
</element>
|
43
|
+
</define>
|
44
|
+
<define name="bibdata">
|
45
|
+
<element name="bibdata">
|
46
|
+
<ref name="BibData"/>
|
47
|
+
</element>
|
48
|
+
</define>
|
49
|
+
<define name="preface">
|
50
|
+
<element name="preface">
|
51
|
+
<oneOrMore>
|
52
|
+
<ref name="content"/>
|
53
|
+
</oneOrMore>
|
54
|
+
</element>
|
55
|
+
</define>
|
56
|
+
<define name="boilerplate">
|
57
|
+
<element name="boilerplate">
|
58
|
+
<optional>
|
59
|
+
<ref name="copyright-statement"/>
|
60
|
+
</optional>
|
61
|
+
<optional>
|
62
|
+
<ref name="license-statement"/>
|
63
|
+
</optional>
|
64
|
+
<optional>
|
65
|
+
<ref name="legal-statement"/>
|
66
|
+
</optional>
|
67
|
+
<optional>
|
68
|
+
<ref name="feedback-statement"/>
|
69
|
+
</optional>
|
70
|
+
</element>
|
71
|
+
</define>
|
72
|
+
<define name="copyright-statement">
|
73
|
+
<element name="copyright-statement">
|
74
|
+
<ref name="Content-Section"/>
|
75
|
+
</element>
|
76
|
+
</define>
|
77
|
+
<define name="license-statement">
|
78
|
+
<element name="license-statement">
|
79
|
+
<ref name="Content-Section"/>
|
80
|
+
</element>
|
81
|
+
</define>
|
82
|
+
<define name="legal-statement">
|
83
|
+
<element name="legal-statement">
|
84
|
+
<ref name="Content-Section"/>
|
85
|
+
</element>
|
86
|
+
</define>
|
87
|
+
<define name="feedback-statement">
|
88
|
+
<element name="feedback-statement">
|
89
|
+
<ref name="Content-Section"/>
|
90
|
+
</element>
|
91
|
+
</define>
|
92
|
+
<define name="sections">
|
93
|
+
<element name="sections">
|
94
|
+
<oneOrMore>
|
95
|
+
<choice>
|
96
|
+
<ref name="content"/>
|
97
|
+
<ref name="clause"/>
|
98
|
+
<ref name="terms"/>
|
99
|
+
<ref name="definitions"/>
|
100
|
+
</choice>
|
101
|
+
</oneOrMore>
|
102
|
+
</element>
|
103
|
+
</define>
|
104
|
+
<define name="definitions">
|
105
|
+
<element name="definitions">
|
106
|
+
<optional>
|
107
|
+
<attribute name="id">
|
108
|
+
<data type="ID"/>
|
109
|
+
</attribute>
|
110
|
+
</optional>
|
111
|
+
<optional>
|
112
|
+
<ref name="section-title"/>
|
113
|
+
</optional>
|
114
|
+
<ref name="dl"/>
|
115
|
+
</element>
|
116
|
+
</define>
|
117
|
+
<define name="section-title">
|
118
|
+
<element name="title">
|
119
|
+
<zeroOrMore>
|
120
|
+
<ref name="TextElement"/>
|
121
|
+
</zeroOrMore>
|
122
|
+
</element>
|
123
|
+
</define>
|
124
|
+
<define name="content">
|
125
|
+
<element name="content">
|
126
|
+
<ref name="Content-Section"/>
|
127
|
+
</element>
|
128
|
+
</define>
|
129
|
+
<define name="content-subsection">
|
130
|
+
<element name="clause">
|
131
|
+
<ref name="Content-Section"/>
|
132
|
+
</element>
|
133
|
+
</define>
|
134
|
+
<define name="Basic-Section">
|
135
|
+
<optional>
|
136
|
+
<attribute name="id">
|
137
|
+
<data type="ID"/>
|
138
|
+
</attribute>
|
139
|
+
</optional>
|
140
|
+
<optional>
|
141
|
+
<ref name="section-title"/>
|
142
|
+
</optional>
|
143
|
+
<oneOrMore>
|
144
|
+
<ref name="BasicBlock"/>
|
145
|
+
</oneOrMore>
|
146
|
+
<zeroOrMore>
|
147
|
+
<ref name="note"/>
|
148
|
+
</zeroOrMore>
|
149
|
+
</define>
|
150
|
+
<define name="Content-Section">
|
151
|
+
<optional>
|
152
|
+
<attribute name="id">
|
153
|
+
<data type="ID"/>
|
154
|
+
</attribute>
|
155
|
+
</optional>
|
156
|
+
<optional>
|
157
|
+
<ref name="section-title"/>
|
158
|
+
</optional>
|
159
|
+
<choice>
|
160
|
+
<group>
|
161
|
+
<oneOrMore>
|
162
|
+
<ref name="BasicBlock"/>
|
163
|
+
</oneOrMore>
|
164
|
+
<zeroOrMore>
|
165
|
+
<ref name="note"/>
|
166
|
+
</zeroOrMore>
|
167
|
+
</group>
|
168
|
+
<oneOrMore>
|
169
|
+
<ref name="content-subsection"/>
|
170
|
+
</oneOrMore>
|
171
|
+
</choice>
|
172
|
+
</define>
|
173
|
+
<define name="clause">
|
174
|
+
<element name="clause">
|
175
|
+
<ref name="Clause-Section"/>
|
176
|
+
</element>
|
177
|
+
</define>
|
178
|
+
<define name="Clause-Section">
|
179
|
+
<optional>
|
180
|
+
<attribute name="id">
|
181
|
+
<data type="ID"/>
|
182
|
+
</attribute>
|
183
|
+
</optional>
|
184
|
+
<optional>
|
185
|
+
<ref name="section-title"/>
|
186
|
+
</optional>
|
187
|
+
<choice>
|
188
|
+
<group>
|
189
|
+
<oneOrMore>
|
190
|
+
<ref name="BasicBlock"/>
|
191
|
+
</oneOrMore>
|
192
|
+
<zeroOrMore>
|
193
|
+
<ref name="note"/>
|
194
|
+
</zeroOrMore>
|
195
|
+
</group>
|
196
|
+
<oneOrMore>
|
197
|
+
<ref name="clause-subsection"/>
|
198
|
+
</oneOrMore>
|
199
|
+
</choice>
|
200
|
+
</define>
|
201
|
+
<define name="clause-subsection">
|
202
|
+
<element name="clause">
|
203
|
+
<ref name="Clause-Section"/>
|
204
|
+
</element>
|
205
|
+
</define>
|
206
|
+
<define name="annex">
|
207
|
+
<element name="annex">
|
208
|
+
<optional>
|
209
|
+
<attribute name="id">
|
210
|
+
<data type="ID"/>
|
211
|
+
</attribute>
|
212
|
+
</optional>
|
213
|
+
<attribute name="obligation">
|
214
|
+
<choice>
|
215
|
+
<value>normative</value>
|
216
|
+
<value>informative</value>
|
217
|
+
</choice>
|
218
|
+
</attribute>
|
219
|
+
<optional>
|
220
|
+
<ref name="section-title"/>
|
221
|
+
</optional>
|
222
|
+
<choice>
|
223
|
+
<group>
|
224
|
+
<oneOrMore>
|
225
|
+
<ref name="BasicBlock"/>
|
226
|
+
</oneOrMore>
|
227
|
+
<zeroOrMore>
|
228
|
+
<ref name="note"/>
|
229
|
+
</zeroOrMore>
|
230
|
+
</group>
|
231
|
+
<oneOrMore>
|
232
|
+
<ref name="clause-subsection"/>
|
233
|
+
</oneOrMore>
|
234
|
+
</choice>
|
235
|
+
</element>
|
236
|
+
</define>
|
237
|
+
<define name="references">
|
238
|
+
<element name="references">
|
239
|
+
<optional>
|
240
|
+
<attribute name="id">
|
241
|
+
<data type="ID"/>
|
242
|
+
</attribute>
|
243
|
+
</optional>
|
244
|
+
<optional>
|
245
|
+
<ref name="section-title"/>
|
246
|
+
</optional>
|
247
|
+
<zeroOrMore>
|
248
|
+
<ref name="bibitem"/>
|
249
|
+
</zeroOrMore>
|
250
|
+
</element>
|
251
|
+
</define>
|
252
|
+
<define name="terms">
|
253
|
+
<element name="terms">
|
254
|
+
<optional>
|
255
|
+
<attribute name="id">
|
256
|
+
<data type="ID"/>
|
257
|
+
</attribute>
|
258
|
+
</optional>
|
259
|
+
<oneOrMore>
|
260
|
+
<ref name="term"/>
|
261
|
+
</oneOrMore>
|
262
|
+
</element>
|
263
|
+
</define>
|
264
|
+
<define name="term">
|
265
|
+
<element name="term">
|
266
|
+
<optional>
|
267
|
+
<attribute name="id">
|
268
|
+
<data type="ID"/>
|
269
|
+
</attribute>
|
270
|
+
</optional>
|
271
|
+
<oneOrMore>
|
272
|
+
<ref name="preferred"/>
|
273
|
+
</oneOrMore>
|
274
|
+
<zeroOrMore>
|
275
|
+
<ref name="admitted"/>
|
276
|
+
</zeroOrMore>
|
277
|
+
<zeroOrMore>
|
278
|
+
<ref name="deprecates"/>
|
279
|
+
</zeroOrMore>
|
280
|
+
<optional>
|
281
|
+
<ref name="termdomain"/>
|
282
|
+
</optional>
|
283
|
+
<ref name="definition"/>
|
284
|
+
<zeroOrMore>
|
285
|
+
<ref name="termnote"/>
|
286
|
+
</zeroOrMore>
|
287
|
+
<zeroOrMore>
|
288
|
+
<ref name="termexample"/>
|
289
|
+
</zeroOrMore>
|
290
|
+
<zeroOrMore>
|
291
|
+
<ref name="termsource"/>
|
292
|
+
</zeroOrMore>
|
293
|
+
</element>
|
294
|
+
</define>
|
295
|
+
<define name="preferred">
|
296
|
+
<element name="preferred">
|
297
|
+
<oneOrMore>
|
298
|
+
<ref name="TextElement"/>
|
299
|
+
</oneOrMore>
|
300
|
+
</element>
|
301
|
+
</define>
|
302
|
+
<define name="admitted">
|
303
|
+
<element name="admitted">
|
304
|
+
<oneOrMore>
|
305
|
+
<ref name="TextElement"/>
|
306
|
+
</oneOrMore>
|
307
|
+
</element>
|
308
|
+
</define>
|
309
|
+
<define name="deprecates">
|
310
|
+
<element name="deprecates">
|
311
|
+
<oneOrMore>
|
312
|
+
<ref name="TextElement"/>
|
313
|
+
</oneOrMore>
|
314
|
+
</element>
|
315
|
+
</define>
|
316
|
+
<define name="termdomain">
|
317
|
+
<element name="domain">
|
318
|
+
<oneOrMore>
|
319
|
+
<ref name="TextElement"/>
|
320
|
+
</oneOrMore>
|
321
|
+
</element>
|
322
|
+
</define>
|
323
|
+
<define name="definition">
|
324
|
+
<element name="definition">
|
325
|
+
<ref name="paragraph"/>
|
326
|
+
</element>
|
327
|
+
</define>
|
328
|
+
<define name="termnote">
|
329
|
+
<element name="termnote">
|
330
|
+
<attribute name="id">
|
331
|
+
<data type="ID"/>
|
332
|
+
</attribute>
|
333
|
+
<ref name="paragraph"/>
|
334
|
+
</element>
|
335
|
+
</define>
|
336
|
+
<define name="termexample">
|
337
|
+
<element name="termexample">
|
338
|
+
<attribute name="id">
|
339
|
+
<data type="ID"/>
|
340
|
+
</attribute>
|
341
|
+
<ref name="paragraph"/>
|
342
|
+
</element>
|
343
|
+
</define>
|
344
|
+
<define name="termsource">
|
345
|
+
<element name="termsource">
|
346
|
+
<attribute name="status">
|
347
|
+
<choice>
|
348
|
+
<value>identical</value>
|
349
|
+
<value>modified</value>
|
350
|
+
</choice>
|
351
|
+
</attribute>
|
352
|
+
<ref name="origin"/>
|
353
|
+
<optional>
|
354
|
+
<ref name="modification"/>
|
355
|
+
</optional>
|
356
|
+
</element>
|
357
|
+
</define>
|
358
|
+
<define name="origin">
|
359
|
+
<element name="origin">
|
360
|
+
<ref name="erefType"/>
|
361
|
+
</element>
|
362
|
+
</define>
|
363
|
+
<define name="modification">
|
364
|
+
<element name="modification">
|
365
|
+
<ref name="paragraph"/>
|
366
|
+
</element>
|
367
|
+
</define>
|
368
|
+
<define name="BasicBlock">
|
369
|
+
<choice>
|
370
|
+
<ref name="paragraph-with-footnote"/>
|
371
|
+
<ref name="table"/>
|
372
|
+
<ref name="formula"/>
|
373
|
+
<ref name="admonition"/>
|
374
|
+
<ref name="ol"/>
|
375
|
+
<ref name="ul"/>
|
376
|
+
<ref name="dl"/>
|
377
|
+
<ref name="figure"/>
|
378
|
+
<ref name="quote"/>
|
379
|
+
<ref name="sourcecode"/>
|
380
|
+
<ref name="example"/>
|
381
|
+
<ref name="review"/>
|
382
|
+
<ref name="pre"/>
|
383
|
+
</choice>
|
384
|
+
</define>
|
385
|
+
<define name="paragraph">
|
386
|
+
<element name="p">
|
387
|
+
<ref name="ParagraphType"/>
|
388
|
+
</element>
|
389
|
+
</define>
|
390
|
+
<define name="Alignments">
|
391
|
+
<choice>
|
392
|
+
<value>left</value>
|
393
|
+
<value>right</value>
|
394
|
+
<value>center</value>
|
395
|
+
<value>justified</value>
|
396
|
+
</choice>
|
397
|
+
</define>
|
398
|
+
<define name="ParagraphType">
|
399
|
+
<attribute name="id">
|
400
|
+
<data type="ID"/>
|
401
|
+
</attribute>
|
402
|
+
<optional>
|
403
|
+
<attribute name="align">
|
404
|
+
<ref name="Alignments"/>
|
405
|
+
</attribute>
|
406
|
+
</optional>
|
407
|
+
<zeroOrMore>
|
408
|
+
<ref name="TextElement"/>
|
409
|
+
</zeroOrMore>
|
410
|
+
<zeroOrMore>
|
411
|
+
<ref name="note"/>
|
412
|
+
</zeroOrMore>
|
413
|
+
</define>
|
414
|
+
<define name="paragraph-with-footnote">
|
415
|
+
<element name="p">
|
416
|
+
<attribute name="id">
|
417
|
+
<data type="ID"/>
|
418
|
+
</attribute>
|
419
|
+
<optional>
|
420
|
+
<attribute name="align">
|
421
|
+
<ref name="Alignments"/>
|
422
|
+
</attribute>
|
423
|
+
</optional>
|
424
|
+
<zeroOrMore>
|
425
|
+
<choice>
|
426
|
+
<ref name="TextElement"/>
|
427
|
+
<ref name="fn"/>
|
428
|
+
</choice>
|
429
|
+
</zeroOrMore>
|
430
|
+
<zeroOrMore>
|
431
|
+
<ref name="note"/>
|
432
|
+
</zeroOrMore>
|
433
|
+
</element>
|
434
|
+
</define>
|
435
|
+
<define name="note">
|
436
|
+
<element name="note">
|
437
|
+
<attribute name="id">
|
438
|
+
<data type="ID"/>
|
439
|
+
</attribute>
|
440
|
+
<oneOrMore>
|
441
|
+
<ref name="paragraph"/>
|
442
|
+
</oneOrMore>
|
443
|
+
</element>
|
444
|
+
</define>
|
445
|
+
<define name="review">
|
446
|
+
<element name="review">
|
447
|
+
<attribute name="id">
|
448
|
+
<data type="ID"/>
|
449
|
+
</attribute>
|
450
|
+
<attribute name="reviewer"/>
|
451
|
+
<optional>
|
452
|
+
<attribute name="date">
|
453
|
+
<data type="dateTime"/>
|
454
|
+
</attribute>
|
455
|
+
</optional>
|
456
|
+
<attribute name="from">
|
457
|
+
<data type="IDREF"/>
|
458
|
+
</attribute>
|
459
|
+
<optional>
|
460
|
+
<attribute name="to">
|
461
|
+
<data type="IDREF"/>
|
462
|
+
</attribute>
|
463
|
+
</optional>
|
464
|
+
<oneOrMore>
|
465
|
+
<ref name="paragraph"/>
|
466
|
+
</oneOrMore>
|
467
|
+
</element>
|
468
|
+
</define>
|
469
|
+
<define name="formula">
|
470
|
+
<element name="formula">
|
471
|
+
<attribute name="id">
|
472
|
+
<data type="ID"/>
|
473
|
+
</attribute>
|
474
|
+
<optional>
|
475
|
+
<attribute name="unnumbered">
|
476
|
+
<data type="boolean"/>
|
477
|
+
</attribute>
|
478
|
+
</optional>
|
479
|
+
<ref name="stem"/>
|
480
|
+
<optional>
|
481
|
+
<ref name="dl"/>
|
482
|
+
</optional>
|
483
|
+
<zeroOrMore>
|
484
|
+
<ref name="note"/>
|
485
|
+
</zeroOrMore>
|
486
|
+
</element>
|
487
|
+
</define>
|
488
|
+
<define name="quote">
|
489
|
+
<element name="quote">
|
490
|
+
<attribute name="id">
|
491
|
+
<data type="ID"/>
|
492
|
+
</attribute>
|
493
|
+
<optional>
|
494
|
+
<attribute name="alignment">
|
495
|
+
<ref name="Alignments"/>
|
496
|
+
</attribute>
|
497
|
+
</optional>
|
498
|
+
<optional>
|
499
|
+
<ref name="quote-source"/>
|
500
|
+
</optional>
|
501
|
+
<optional>
|
502
|
+
<ref name="quote-author"/>
|
503
|
+
</optional>
|
504
|
+
<oneOrMore>
|
505
|
+
<ref name="paragraph-with-footnote"/>
|
506
|
+
</oneOrMore>
|
507
|
+
<zeroOrMore>
|
508
|
+
<ref name="note"/>
|
509
|
+
</zeroOrMore>
|
510
|
+
</element>
|
511
|
+
</define>
|
512
|
+
<define name="quote-source">
|
513
|
+
<element name="source">
|
514
|
+
<ref name="erefType"/>
|
515
|
+
</element>
|
516
|
+
</define>
|
517
|
+
<define name="quote-author">
|
518
|
+
<element name="author">
|
519
|
+
<text/>
|
520
|
+
</element>
|
521
|
+
</define>
|
522
|
+
<define name="sourcecode">
|
523
|
+
<element name="sourcecode">
|
524
|
+
<attribute name="id">
|
525
|
+
<data type="ID"/>
|
526
|
+
</attribute>
|
527
|
+
<optional>
|
528
|
+
<attribute name="unnumbered">
|
529
|
+
<data type="boolean"/>
|
530
|
+
</attribute>
|
531
|
+
</optional>
|
532
|
+
<optional>
|
533
|
+
<attribute name="lang"/>
|
534
|
+
</optional>
|
535
|
+
<optional>
|
536
|
+
<ref name="tname"/>
|
537
|
+
</optional>
|
538
|
+
<oneOrMore>
|
539
|
+
<choice>
|
540
|
+
<text/>
|
541
|
+
<ref name="callout"/>
|
542
|
+
</choice>
|
543
|
+
</oneOrMore>
|
544
|
+
<zeroOrMore>
|
545
|
+
<ref name="annotation"/>
|
546
|
+
</zeroOrMore>
|
547
|
+
<zeroOrMore>
|
548
|
+
<ref name="note"/>
|
549
|
+
</zeroOrMore>
|
550
|
+
</element>
|
551
|
+
</define>
|
552
|
+
<define name="pre">
|
553
|
+
<element name="pre">
|
554
|
+
<attribute name="id">
|
555
|
+
<data type="ID"/>
|
556
|
+
</attribute>
|
557
|
+
<optional>
|
558
|
+
<ref name="tname"/>
|
559
|
+
</optional>
|
560
|
+
<text/>
|
561
|
+
<zeroOrMore>
|
562
|
+
<ref name="note"/>
|
563
|
+
</zeroOrMore>
|
564
|
+
</element>
|
565
|
+
</define>
|
566
|
+
<define name="table">
|
567
|
+
<element name="table">
|
568
|
+
<attribute name="id">
|
569
|
+
<data type="ID"/>
|
570
|
+
</attribute>
|
571
|
+
<optional>
|
572
|
+
<attribute name="unnumbered">
|
573
|
+
<data type="boolean"/>
|
574
|
+
</attribute>
|
575
|
+
</optional>
|
576
|
+
<optional>
|
577
|
+
<attribute name="alt"/>
|
578
|
+
</optional>
|
579
|
+
<optional>
|
580
|
+
<ref name="tname"/>
|
581
|
+
</optional>
|
582
|
+
<optional>
|
583
|
+
<ref name="thead"/>
|
584
|
+
</optional>
|
585
|
+
<ref name="tbody"/>
|
586
|
+
<optional>
|
587
|
+
<ref name="tfoot"/>
|
588
|
+
</optional>
|
589
|
+
<zeroOrMore>
|
590
|
+
<ref name="table-note"/>
|
591
|
+
</zeroOrMore>
|
592
|
+
<optional>
|
593
|
+
<ref name="dl"/>
|
594
|
+
</optional>
|
595
|
+
</element>
|
596
|
+
</define>
|
597
|
+
<define name="tname">
|
598
|
+
<element name="name">
|
599
|
+
<text/>
|
600
|
+
</element>
|
601
|
+
</define>
|
602
|
+
<define name="thead">
|
603
|
+
<element name="thead">
|
604
|
+
<ref name="tr"/>
|
605
|
+
</element>
|
606
|
+
</define>
|
607
|
+
<define name="tfoot">
|
608
|
+
<element name="tfoot">
|
609
|
+
<ref name="tr"/>
|
610
|
+
</element>
|
611
|
+
</define>
|
612
|
+
<define name="tbody">
|
613
|
+
<element name="tbody">
|
614
|
+
<oneOrMore>
|
615
|
+
<ref name="tr"/>
|
616
|
+
</oneOrMore>
|
617
|
+
</element>
|
618
|
+
</define>
|
619
|
+
<define name="table-note">
|
620
|
+
<element name="note">
|
621
|
+
<ref name="paragraph"/>
|
622
|
+
</element>
|
623
|
+
</define>
|
624
|
+
<define name="tr">
|
625
|
+
<element name="tr">
|
626
|
+
<oneOrMore>
|
627
|
+
<choice>
|
628
|
+
<ref name="td"/>
|
629
|
+
<ref name="th"/>
|
630
|
+
</choice>
|
631
|
+
</oneOrMore>
|
632
|
+
</element>
|
633
|
+
</define>
|
634
|
+
<define name="td">
|
635
|
+
<element name="td">
|
636
|
+
<optional>
|
637
|
+
<attribute name="colspan"/>
|
638
|
+
</optional>
|
639
|
+
<optional>
|
640
|
+
<attribute name="rowspan"/>
|
641
|
+
</optional>
|
642
|
+
<optional>
|
643
|
+
<attribute name="align">
|
644
|
+
<choice>
|
645
|
+
<value>left</value>
|
646
|
+
<value>right</value>
|
647
|
+
<value>center</value>
|
648
|
+
</choice>
|
649
|
+
</attribute>
|
650
|
+
</optional>
|
651
|
+
<choice>
|
652
|
+
<zeroOrMore>
|
653
|
+
<ref name="TextElement"/>
|
654
|
+
</zeroOrMore>
|
655
|
+
<oneOrMore>
|
656
|
+
<ref name="paragraph-with-footnote"/>
|
657
|
+
</oneOrMore>
|
658
|
+
</choice>
|
659
|
+
</element>
|
660
|
+
</define>
|
661
|
+
<define name="th">
|
662
|
+
<element name="th">
|
663
|
+
<optional>
|
664
|
+
<attribute name="colspan"/>
|
665
|
+
</optional>
|
666
|
+
<optional>
|
667
|
+
<attribute name="rowspan"/>
|
668
|
+
</optional>
|
669
|
+
<optional>
|
670
|
+
<attribute name="align">
|
671
|
+
<choice>
|
672
|
+
<value>left</value>
|
673
|
+
<value>right</value>
|
674
|
+
<value>center</value>
|
675
|
+
</choice>
|
676
|
+
</attribute>
|
677
|
+
</optional>
|
678
|
+
<choice>
|
679
|
+
<zeroOrMore>
|
680
|
+
<ref name="TextElement"/>
|
681
|
+
</zeroOrMore>
|
682
|
+
<oneOrMore>
|
683
|
+
<ref name="paragraph-with-footnote"/>
|
684
|
+
</oneOrMore>
|
685
|
+
</choice>
|
686
|
+
</element>
|
687
|
+
</define>
|
688
|
+
<define name="example">
|
689
|
+
<element name="example">
|
690
|
+
<attribute name="id">
|
691
|
+
<data type="ID"/>
|
692
|
+
</attribute>
|
693
|
+
<optional>
|
694
|
+
<attribute name="unnumbered">
|
695
|
+
<data type="boolean"/>
|
696
|
+
</attribute>
|
697
|
+
</optional>
|
698
|
+
<oneOrMore>
|
699
|
+
<choice>
|
700
|
+
<ref name="formula"/>
|
701
|
+
<ref name="ul"/>
|
702
|
+
<ref name="ol"/>
|
703
|
+
<ref name="dl"/>
|
704
|
+
<ref name="quote"/>
|
705
|
+
<ref name="sourcecode"/>
|
706
|
+
<ref name="paragraph-with-footnote"/>
|
707
|
+
</choice>
|
708
|
+
</oneOrMore>
|
709
|
+
<zeroOrMore>
|
710
|
+
<ref name="note"/>
|
711
|
+
</zeroOrMore>
|
712
|
+
</element>
|
713
|
+
</define>
|
714
|
+
<define name="admonition">
|
715
|
+
<element name="admonition">
|
716
|
+
<attribute name="type">
|
717
|
+
<choice>
|
718
|
+
<value>warning</value>
|
719
|
+
<value>note</value>
|
720
|
+
<value>tip</value>
|
721
|
+
<value>important</value>
|
722
|
+
<value>caution</value>
|
723
|
+
</choice>
|
724
|
+
</attribute>
|
725
|
+
<attribute name="id">
|
726
|
+
<data type="ID"/>
|
727
|
+
</attribute>
|
728
|
+
<zeroOrMore>
|
729
|
+
<ref name="paragraph-with-footnote"/>
|
730
|
+
</zeroOrMore>
|
731
|
+
<zeroOrMore>
|
732
|
+
<ref name="note"/>
|
733
|
+
</zeroOrMore>
|
734
|
+
</element>
|
735
|
+
</define>
|
736
|
+
<define name="figure">
|
737
|
+
<element name="figure">
|
738
|
+
<attribute name="id">
|
739
|
+
<data type="ID"/>
|
740
|
+
</attribute>
|
741
|
+
<optional>
|
742
|
+
<attribute name="unnumbered">
|
743
|
+
<data type="boolean"/>
|
744
|
+
</attribute>
|
745
|
+
</optional>
|
746
|
+
<optional>
|
747
|
+
<ref name="source"/>
|
748
|
+
</optional>
|
749
|
+
<optional>
|
750
|
+
<ref name="tname"/>
|
751
|
+
</optional>
|
752
|
+
<choice>
|
753
|
+
<ref name="image"/>
|
754
|
+
<ref name="pre"/>
|
755
|
+
<zeroOrMore>
|
756
|
+
<ref name="figure"/>
|
757
|
+
</zeroOrMore>
|
758
|
+
</choice>
|
759
|
+
<zeroOrMore>
|
760
|
+
<ref name="fn"/>
|
761
|
+
</zeroOrMore>
|
762
|
+
<optional>
|
763
|
+
<ref name="dl"/>
|
764
|
+
</optional>
|
765
|
+
<zeroOrMore>
|
766
|
+
<ref name="note"/>
|
767
|
+
</zeroOrMore>
|
768
|
+
</element>
|
769
|
+
</define>
|
770
|
+
<define name="TextElement">
|
771
|
+
<choice>
|
772
|
+
<text/>
|
773
|
+
<ref name="em"/>
|
774
|
+
<ref name="eref"/>
|
775
|
+
<ref name="strong"/>
|
776
|
+
<ref name="stem"/>
|
777
|
+
<ref name="sub"/>
|
778
|
+
<ref name="sup"/>
|
779
|
+
<ref name="tt"/>
|
780
|
+
<ref name="keyword"/>
|
781
|
+
<ref name="strike"/>
|
782
|
+
<ref name="smallcap"/>
|
783
|
+
<ref name="xref"/>
|
784
|
+
<ref name="br"/>
|
785
|
+
<ref name="hyperlink"/>
|
786
|
+
<ref name="hr"/>
|
787
|
+
<ref name="pagebreak"/>
|
788
|
+
<ref name="bookmark"/>
|
789
|
+
</choice>
|
790
|
+
</define>
|
791
|
+
<define name="PureTextElement">
|
792
|
+
<choice>
|
793
|
+
<text/>
|
794
|
+
<ref name="em"/>
|
795
|
+
<ref name="strong"/>
|
796
|
+
<ref name="sub"/>
|
797
|
+
<ref name="sup"/>
|
798
|
+
<ref name="tt"/>
|
799
|
+
<ref name="keyword"/>
|
800
|
+
<ref name="strike"/>
|
801
|
+
<ref name="smallcap"/>
|
802
|
+
<ref name="br"/>
|
803
|
+
</choice>
|
804
|
+
</define>
|
805
|
+
<define name="source">
|
806
|
+
<element name="source">
|
807
|
+
<ref name="TypedUri"/>
|
808
|
+
</element>
|
809
|
+
</define>
|
810
|
+
<define name="em">
|
811
|
+
<element name="em">
|
812
|
+
<zeroOrMore>
|
813
|
+
<ref name="PureTextElement"/>
|
814
|
+
</zeroOrMore>
|
815
|
+
</element>
|
816
|
+
</define>
|
817
|
+
<define name="strong">
|
818
|
+
<element name="strong">
|
819
|
+
<zeroOrMore>
|
820
|
+
<ref name="PureTextElement"/>
|
821
|
+
</zeroOrMore>
|
822
|
+
</element>
|
823
|
+
</define>
|
824
|
+
<define name="tt">
|
825
|
+
<element name="tt">
|
826
|
+
<zeroOrMore>
|
827
|
+
<ref name="PureTextElement"/>
|
828
|
+
</zeroOrMore>
|
829
|
+
</element>
|
830
|
+
</define>
|
831
|
+
<define name="keyword">
|
832
|
+
<element name="keyword">
|
833
|
+
<zeroOrMore>
|
834
|
+
<ref name="PureTextElement"/>
|
835
|
+
</zeroOrMore>
|
836
|
+
</element>
|
837
|
+
</define>
|
838
|
+
<define name="sub">
|
839
|
+
<element name="sub">
|
840
|
+
<zeroOrMore>
|
841
|
+
<ref name="PureTextElement"/>
|
842
|
+
</zeroOrMore>
|
843
|
+
</element>
|
844
|
+
</define>
|
845
|
+
<define name="sup">
|
846
|
+
<element name="sup">
|
847
|
+
<zeroOrMore>
|
848
|
+
<ref name="PureTextElement"/>
|
849
|
+
</zeroOrMore>
|
850
|
+
</element>
|
851
|
+
</define>
|
852
|
+
<define name="strike">
|
853
|
+
<element name="strike">
|
854
|
+
<zeroOrMore>
|
855
|
+
<ref name="PureTextElement"/>
|
856
|
+
</zeroOrMore>
|
857
|
+
</element>
|
858
|
+
</define>
|
859
|
+
<define name="smallcap">
|
860
|
+
<element name="smallcap">
|
861
|
+
<zeroOrMore>
|
862
|
+
<ref name="PureTextElement"/>
|
863
|
+
</zeroOrMore>
|
864
|
+
</element>
|
865
|
+
</define>
|
866
|
+
<define name="br">
|
867
|
+
<element name="br">
|
868
|
+
<empty/>
|
869
|
+
</element>
|
870
|
+
</define>
|
871
|
+
<define name="hr">
|
872
|
+
<element name="hr">
|
873
|
+
<empty/>
|
874
|
+
</element>
|
875
|
+
</define>
|
876
|
+
<define name="pagebreak">
|
877
|
+
<element name="pagebreak">
|
878
|
+
<empty/>
|
879
|
+
</element>
|
880
|
+
</define>
|
881
|
+
<!-- bare ID element, used for referencing arbitrary spans of text -->
|
882
|
+
<define name="bookmark">
|
883
|
+
<element name="bookmark">
|
884
|
+
<attribute name="id">
|
885
|
+
<data type="ID"/>
|
886
|
+
</attribute>
|
887
|
+
<empty/>
|
888
|
+
</element>
|
889
|
+
</define>
|
890
|
+
<define name="ReferenceFormat">
|
891
|
+
<choice>
|
892
|
+
<value>external</value>
|
893
|
+
<value>inline</value>
|
894
|
+
<value>footnote</value>
|
895
|
+
<value>callout</value>
|
896
|
+
</choice>
|
897
|
+
</define>
|
898
|
+
<define name="eref">
|
899
|
+
<element name="eref">
|
900
|
+
<ref name="erefType"/>
|
901
|
+
</element>
|
902
|
+
</define>
|
903
|
+
<define name="erefType">
|
904
|
+
<optional>
|
905
|
+
<attribute name="normative">
|
906
|
+
<data type="boolean"/>
|
907
|
+
</attribute>
|
908
|
+
</optional>
|
909
|
+
<attribute name="citeas"/>
|
910
|
+
<attribute name="type">
|
911
|
+
<ref name="ReferenceFormat"/>
|
912
|
+
</attribute>
|
913
|
+
<ref name="CitationType"/>
|
914
|
+
<text/>
|
915
|
+
</define>
|
916
|
+
<define name="hyperlink">
|
917
|
+
<element name="link">
|
918
|
+
<attribute name="target">
|
919
|
+
<data type="anyURI"/>
|
920
|
+
</attribute>
|
921
|
+
<attribute name="type">
|
922
|
+
<ref name="ReferenceFormat"/>
|
923
|
+
</attribute>
|
924
|
+
<optional>
|
925
|
+
<attribute name="alt"/>
|
926
|
+
</optional>
|
927
|
+
<text/>
|
928
|
+
</element>
|
929
|
+
</define>
|
930
|
+
<define name="xref">
|
931
|
+
<element name="xref">
|
932
|
+
<attribute name="target">
|
933
|
+
<data type="IDREF"/>
|
934
|
+
</attribute>
|
935
|
+
<attribute name="type">
|
936
|
+
<ref name="ReferenceFormat"/>
|
937
|
+
</attribute>
|
938
|
+
<text/>
|
939
|
+
</element>
|
940
|
+
</define>
|
941
|
+
<define name="fn">
|
942
|
+
<element name="fn">
|
943
|
+
<attribute name="reference"/>
|
944
|
+
<oneOrMore>
|
945
|
+
<ref name="paragraph"/>
|
946
|
+
</oneOrMore>
|
947
|
+
</element>
|
948
|
+
</define>
|
949
|
+
<!--
|
950
|
+
This is xref with fixed @type="footnote", and @target built in as paragraph+
|
951
|
+
@reference replaces ReferenceElement/text
|
952
|
+
so <fn reference="2"><p>This is a footnote</p></fn>
|
953
|
+
corresponds to
|
954
|
+
<eref type="footnote" target="fn2">2</xref> <p id="fn2">This is a footnote</p>
|
955
|
+
-->
|
956
|
+
<define name="callout">
|
957
|
+
<element name="callout">
|
958
|
+
<attribute name="target">
|
959
|
+
<data type="IDREF"/>
|
960
|
+
</attribute>
|
961
|
+
<text/>
|
962
|
+
</element>
|
963
|
+
</define>
|
964
|
+
<!--
|
965
|
+
This is xref with fixed @type="callout"; the target by convention is in an annotation in the same source code snippet
|
966
|
+
so <callout target="xyz">1</callout>
|
967
|
+
corresponds to <xref type="callout" target="xyz">1</xref>
|
968
|
+
-->
|
969
|
+
<define name="image">
|
970
|
+
<element name="image">
|
971
|
+
<attribute name="id">
|
972
|
+
<data type="ID"/>
|
973
|
+
</attribute>
|
974
|
+
<optional>
|
975
|
+
<attribute name="src">
|
976
|
+
<data type="anyURI"/>
|
977
|
+
</attribute>
|
978
|
+
</optional>
|
979
|
+
<attribute name="imagetype">
|
980
|
+
<choice>
|
981
|
+
<value>SVG</value>
|
982
|
+
<value>JPEG</value>
|
983
|
+
<value>GIF</value>
|
984
|
+
<value>PNG</value>
|
985
|
+
<value>PDF</value>
|
986
|
+
</choice>
|
987
|
+
</attribute>
|
988
|
+
<optional>
|
989
|
+
<attribute name="width">
|
990
|
+
<choice>
|
991
|
+
<data type="int"/>
|
992
|
+
<value>auto</value>
|
993
|
+
</choice>
|
994
|
+
</attribute>
|
995
|
+
</optional>
|
996
|
+
<optional>
|
997
|
+
<attribute name="height">
|
998
|
+
<choice>
|
999
|
+
<data type="int"/>
|
1000
|
+
<value>auto</value>
|
1001
|
+
</choice>
|
1002
|
+
</attribute>
|
1003
|
+
</optional>
|
1004
|
+
<optional>
|
1005
|
+
<attribute name="alt"/>
|
1006
|
+
</optional>
|
1007
|
+
</element>
|
1008
|
+
</define>
|
1009
|
+
<define name="stem">
|
1010
|
+
<element name="stem">
|
1011
|
+
<attribute name="type">
|
1012
|
+
<choice>
|
1013
|
+
<value>MathML</value>
|
1014
|
+
<value>AsciiMath</value>
|
1015
|
+
</choice>
|
1016
|
+
</attribute>
|
1017
|
+
<oneOrMore>
|
1018
|
+
<choice>
|
1019
|
+
<text/>
|
1020
|
+
<ref name="AnyElement"/>
|
1021
|
+
</choice>
|
1022
|
+
</oneOrMore>
|
1023
|
+
</element>
|
1024
|
+
</define>
|
1025
|
+
<define name="annotation">
|
1026
|
+
<element name="annotation">
|
1027
|
+
<attribute name="id">
|
1028
|
+
<data type="ID"/>
|
1029
|
+
</attribute>
|
1030
|
+
<ref name="paragraph"/>
|
1031
|
+
</element>
|
1032
|
+
</define>
|
1033
|
+
<define name="ul">
|
1034
|
+
<element name="ul">
|
1035
|
+
<attribute name="id">
|
1036
|
+
<data type="ID"/>
|
1037
|
+
</attribute>
|
1038
|
+
<oneOrMore>
|
1039
|
+
<ref name="li"/>
|
1040
|
+
</oneOrMore>
|
1041
|
+
<zeroOrMore>
|
1042
|
+
<ref name="note"/>
|
1043
|
+
</zeroOrMore>
|
1044
|
+
</element>
|
1045
|
+
</define>
|
1046
|
+
<define name="li">
|
1047
|
+
<element name="li">
|
1048
|
+
<optional>
|
1049
|
+
<attribute name="id">
|
1050
|
+
<data type="ID"/>
|
1051
|
+
</attribute>
|
1052
|
+
</optional>
|
1053
|
+
<oneOrMore>
|
1054
|
+
<ref name="paragraph-with-footnote"/>
|
1055
|
+
</oneOrMore>
|
1056
|
+
</element>
|
1057
|
+
</define>
|
1058
|
+
<define name="ol">
|
1059
|
+
<element name="ol">
|
1060
|
+
<attribute name="id">
|
1061
|
+
<data type="ID"/>
|
1062
|
+
</attribute>
|
1063
|
+
<attribute name="type">
|
1064
|
+
<choice>
|
1065
|
+
<value>roman</value>
|
1066
|
+
<value>alphabet</value>
|
1067
|
+
<value>arabic</value>
|
1068
|
+
<value>roman_upper</value>
|
1069
|
+
<value>alphabet_upper</value>
|
1070
|
+
</choice>
|
1071
|
+
</attribute>
|
1072
|
+
<oneOrMore>
|
1073
|
+
<ref name="li"/>
|
1074
|
+
</oneOrMore>
|
1075
|
+
<zeroOrMore>
|
1076
|
+
<ref name="note"/>
|
1077
|
+
</zeroOrMore>
|
1078
|
+
</element>
|
1079
|
+
</define>
|
1080
|
+
<define name="dl">
|
1081
|
+
<element name="dl">
|
1082
|
+
<attribute name="id">
|
1083
|
+
<data type="ID"/>
|
1084
|
+
</attribute>
|
1085
|
+
<oneOrMore>
|
1086
|
+
<ref name="dt"/>
|
1087
|
+
<ref name="dd"/>
|
1088
|
+
</oneOrMore>
|
1089
|
+
<zeroOrMore>
|
1090
|
+
<ref name="note"/>
|
1091
|
+
</zeroOrMore>
|
1092
|
+
</element>
|
1093
|
+
</define>
|
1094
|
+
<define name="dt">
|
1095
|
+
<element name="dt">
|
1096
|
+
<zeroOrMore>
|
1097
|
+
<ref name="TextElement"/>
|
1098
|
+
</zeroOrMore>
|
1099
|
+
</element>
|
1100
|
+
</define>
|
1101
|
+
<define name="dd">
|
1102
|
+
<element name="dd">
|
1103
|
+
<zeroOrMore>
|
1104
|
+
<ref name="paragraph-with-footnote"/>
|
1105
|
+
</zeroOrMore>
|
1106
|
+
</element>
|
1107
|
+
</define>
|
1108
|
+
<define name="ext">
|
1109
|
+
<element name="ext">
|
1110
|
+
<ref name="BibDataExtensionType"/>
|
1111
|
+
</element>
|
1112
|
+
</define>
|
1113
|
+
<define name="BibDataExtensionType">
|
1114
|
+
<optional>
|
1115
|
+
<ref name="doctype"/>
|
1116
|
+
</optional>
|
1117
|
+
</define>
|
1118
|
+
<define name="doctype">
|
1119
|
+
<element name="doctype">
|
1120
|
+
<ref name="DocumentType"/>
|
1121
|
+
</element>
|
1122
|
+
</define>
|
1123
|
+
<define name="DocumentType">
|
1124
|
+
<value>document</value>
|
1125
|
+
</define>
|
1126
|
+
<define name="BibData">
|
1127
|
+
<ref name="BibliographicItem"/>
|
1128
|
+
<optional>
|
1129
|
+
<ref name="ext"/>
|
1130
|
+
</optional>
|
1131
|
+
</define>
|
1132
|
+
</grammar>
|