1 | # revised DTD for the RFC document series, draft of 2008-03-06
|
---|
2 |
|
---|
3 | # Typical invocation:
|
---|
4 | # <!DOCTYPE rfc PUBLIC "-//IETF//DTD RFC 2629//EN"
|
---|
5 | # "http://xml.resource.org/authoring/rfc2629.dtd" [
|
---|
6 | # ... dtd subset ...
|
---|
7 | # ]>
|
---|
8 | # or
|
---|
9 | # <!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
|
---|
10 | # ... dtd subset ...
|
---|
11 | # ]>
|
---|
12 |
|
---|
13 | # Contents
|
---|
14 | #
|
---|
15 | # Character entities
|
---|
16 | #
|
---|
17 | # DTD data types
|
---|
18 | #
|
---|
19 | # The top-level
|
---|
20 | #
|
---|
21 | # Front matter
|
---|
22 | #
|
---|
23 | # The Body
|
---|
24 | #
|
---|
25 | # Back matter
|
---|
26 |
|
---|
27 | # Character entities
|
---|
28 |
|
---|
29 | # DTD data types:
|
---|
30 | #
|
---|
31 | # entity description
|
---|
32 | # ====== ===============================================
|
---|
33 | # NUMBER [0-9]+
|
---|
34 | # NUMBERS a comma-separated list of NUMBER
|
---|
35 | #
|
---|
36 | # DAY the day of the month, e.g., "1"
|
---|
37 | # MONTH the month of the year, e.g., "January"
|
---|
38 | # YEAR a four-digit year, e.g., "1999"
|
---|
39 | #
|
---|
40 | # URI e.g., "http://invisible.net/"
|
---|
41 | #
|
---|
42 | # ATEXT/CTEXT printable ASCII text (no line-terminators)
|
---|
43 | #
|
---|
44 | # TEXT character data
|
---|
45 |
|
---|
46 | namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
|
---|
47 |
|
---|
48 | NUMBER = string
|
---|
49 | NUMBERS = string
|
---|
50 | DAY = string
|
---|
51 | MONTH = string
|
---|
52 | YEAR = string
|
---|
53 | URI = string
|
---|
54 | ATEXT = string
|
---|
55 | CTEXT = text
|
---|
56 | TEXT = text
|
---|
57 | # The top-level
|
---|
58 |
|
---|
59 | # attributes for the "rfc" element are supplied by the RFC
|
---|
60 | # editor. when preparing drafts, authors should leave them blank.
|
---|
61 | #
|
---|
62 | # the "seriesNo" attribute is used if the category is, e.g., BCP.
|
---|
63 | rfc = element rfc { attlist.rfc, front, middle, back? }
|
---|
64 | attlist.rfc &=
|
---|
65 | attribute number { NUMBER }?,
|
---|
66 | [ a:defaultValue = "" ] attribute obsoletes { NUMBERS }?,
|
---|
67 | [ a:defaultValue = "" ] attribute updates { NUMBERS }?,
|
---|
68 | attribute category { "std" | "bcp" | "info" | "exp" | "historic" }?,
|
---|
69 | attribute seriesNo { NUMBER }?,
|
---|
70 | attribute ipr {
|
---|
71 | "full2026"
|
---|
72 | | "noDerivativeWorks2026"
|
---|
73 | | "none"
|
---|
74 | | "full3667"
|
---|
75 | | "noModification3667"
|
---|
76 | | "noDerivatives3667"
|
---|
77 | | "full3978"
|
---|
78 | | "noModification3978"
|
---|
79 | | "noDerivatives3978"
|
---|
80 | | "trust200811"
|
---|
81 | | "noModificationTrust200811"
|
---|
82 | | "noDerivativesTrust200811"
|
---|
83 | | "trust200902"
|
---|
84 | | "noModificationTrust200902"
|
---|
85 | | "noDerivativesTrust200902"
|
---|
86 | | "pre5378Trust200902"
|
---|
87 | }?,
|
---|
88 | attribute iprExtract { xsd:IDREF }?,
|
---|
89 | [ a:defaultValue = "IETF" ]
|
---|
90 | attribute submissionType { "IETF" | "independent" }?,
|
---|
91 | attribute docName { ATEXT }?,
|
---|
92 | [ a:defaultValue = "en" ] attribute xml:lang { ATEXT }?
|
---|
93 | # Front matter
|
---|
94 | front =
|
---|
95 | element front {
|
---|
96 | attlist.front,
|
---|
97 | title,
|
---|
98 | author+,
|
---|
99 | date,
|
---|
100 | area*,
|
---|
101 | workgroup*,
|
---|
102 | keyword*,
|
---|
103 | abstract?,
|
---|
104 | note*
|
---|
105 | }
|
---|
106 | attlist.front &= empty
|
---|
107 | # the "abbrev" attribute is used for headers, etc.
|
---|
108 | title = element title { attlist.title, CTEXT }
|
---|
109 | attlist.title &= attribute abbrev { ATEXT }?
|
---|
110 | author = element author { attlist.author, organization, address? }
|
---|
111 | attlist.author &=
|
---|
112 | attribute initials { ATEXT }?,
|
---|
113 | attribute surname { ATEXT }?,
|
---|
114 | attribute fullname { ATEXT }?,
|
---|
115 | attribute role { "editor" }?
|
---|
116 | organization = element organization { attlist.organization, CTEXT }
|
---|
117 | attlist.organization &= attribute abbrev { ATEXT }?
|
---|
118 | address =
|
---|
119 | element address {
|
---|
120 | attlist.address, postal?, phone?, facsimile?, email?, uri?
|
---|
121 | }
|
---|
122 | attlist.address &= empty
|
---|
123 | # this content model should be more strict:
|
---|
124 | # at most one of each the city, region, code, and country
|
---|
125 | # elements may be present
|
---|
126 | postal =
|
---|
127 | element postal {
|
---|
128 | attlist.postal, street+, (city | region | code | country)*
|
---|
129 | }
|
---|
130 | attlist.postal &= empty
|
---|
131 | street = element street { attlist.street, CTEXT }
|
---|
132 | attlist.street &= empty
|
---|
133 | city = element city { attlist.city, CTEXT }
|
---|
134 | attlist.city &= empty
|
---|
135 | region = element region { attlist.region, CTEXT }
|
---|
136 | attlist.region &= empty
|
---|
137 | code = element code { attlist.code, CTEXT }
|
---|
138 | attlist.code &= empty
|
---|
139 | country = element country { attlist.country, CTEXT }
|
---|
140 | attlist.country &= empty
|
---|
141 | phone = element phone { attlist.phone, CTEXT }
|
---|
142 | attlist.phone &= empty
|
---|
143 | facsimile = element facsimile { attlist.facsimile, CTEXT }
|
---|
144 | attlist.facsimile &= empty
|
---|
145 | email = element email { attlist.email, CTEXT }
|
---|
146 | attlist.email &= empty
|
---|
147 | uri = element uri { attlist.uri, CTEXT }
|
---|
148 | attlist.uri &= empty
|
---|
149 | date = element date { attlist.date, empty }
|
---|
150 | attlist.date &=
|
---|
151 | attribute day { DAY }?,
|
---|
152 | attribute month { MONTH }?,
|
---|
153 | attribute year { YEAR }?
|
---|
154 | # meta-data...
|
---|
155 | area = element area { attlist.area, CTEXT }
|
---|
156 | attlist.area &= empty
|
---|
157 | workgroup = element workgroup { attlist.workgroup, CTEXT }
|
---|
158 | attlist.workgroup &= empty
|
---|
159 | keyword = element keyword { attlist.keyword, CTEXT }
|
---|
160 | attlist.keyword &= empty
|
---|
161 | abstract = element abstract { attlist.abstract, t+ }
|
---|
162 | attlist.abstract &= empty
|
---|
163 | note = element note { attlist.note, t+ }
|
---|
164 | attlist.note &= attribute title { ATEXT }
|
---|
165 | # The body
|
---|
166 | middle = element middle { attlist.middle, section+ }
|
---|
167 | attlist.middle &= empty
|
---|
168 | section =
|
---|
169 | element section {
|
---|
170 | attlist.section, (t | figure | texttable | iref)*, section*
|
---|
171 | }
|
---|
172 | attlist.section &=
|
---|
173 | attribute anchor { xsd:ID }?,
|
---|
174 | attribute title { ATEXT },
|
---|
175 | [ a:defaultValue = "default" ]
|
---|
176 | attribute toc { "include" | "exclude" | "default" }?
|
---|
177 | # use of <appendix/> is deprecated...
|
---|
178 | # <!ELEMENT appendix ((t|figure|texttable|iref)*,appendix*)>
|
---|
179 | # <!ATTLIST appendix
|
---|
180 | # anchor ID #IMPLIED
|
---|
181 | # title %ATEXT; #REQUIRED
|
---|
182 | # toc (include|exclude|default)
|
---|
183 | # "default">
|
---|
184 |
|
---|
185 | # use of <figure/> is deprecated...
|
---|
186 | t =
|
---|
187 | element t {
|
---|
188 | attlist.t,
|
---|
189 | (TEXT
|
---|
190 | | \list
|
---|
191 | | figure
|
---|
192 | | xref
|
---|
193 | | eref
|
---|
194 | | iref
|
---|
195 | | cref
|
---|
196 | | spanx
|
---|
197 | | vspace)*
|
---|
198 | }
|
---|
199 | attlist.t &=
|
---|
200 | attribute anchor { xsd:ID }?,
|
---|
201 | attribute hangText { ATEXT }?
|
---|
202 | # the value of the style attribute is inherited from the closest
|
---|
203 | # parent
|
---|
204 | \list = element list { attlist.list, t+ }
|
---|
205 | attlist.list &=
|
---|
206 | attribute style { ATEXT }?,
|
---|
207 | attribute hangIndent { NUMBER }?,
|
---|
208 | attribute counter { ATEXT }?
|
---|
209 | xref = element xref { attlist.xref, CTEXT }
|
---|
210 | attlist.xref &=
|
---|
211 | attribute target { xsd:IDREF },
|
---|
212 | [ a:defaultValue = "false" ] attribute pageno { "true" | "false" }?,
|
---|
213 | [ a:defaultValue = "default" ]
|
---|
214 | attribute format { "counter" | "title" | "none" | "default" }?
|
---|
215 | eref = element eref { attlist.eref, CTEXT }
|
---|
216 | attlist.eref &= attribute target { URI }
|
---|
217 | iref = element iref { attlist.iref, empty }
|
---|
218 | attlist.iref &=
|
---|
219 | attribute item { ATEXT },
|
---|
220 | [ a:defaultValue = "" ] attribute subitem { ATEXT }?,
|
---|
221 | [ a:defaultValue = "false" ] attribute primary { "true" | "false" }?
|
---|
222 | cref = element cref { attlist.cref, CTEXT }
|
---|
223 | attlist.cref &=
|
---|
224 | attribute anchor { xsd:ID }?,
|
---|
225 | attribute source { ATEXT }?
|
---|
226 | spanx = element spanx { attlist.spanx, CTEXT }
|
---|
227 | attlist.spanx &=
|
---|
228 | [ a:defaultValue = "preserve" ]
|
---|
229 | attribute xml:space { "default" | "preserve" }?,
|
---|
230 | [ a:defaultValue = "emph" ] attribute style { ATEXT }?
|
---|
231 | vspace = element vspace { attlist.vspace, empty }
|
---|
232 | attlist.vspace &=
|
---|
233 | [ a:defaultValue = "0" ] attribute blankLines { NUMBER }?
|
---|
234 | figure =
|
---|
235 | element figure {
|
---|
236 | attlist.figure, iref*, preamble?, artwork, postamble?
|
---|
237 | }
|
---|
238 | attlist.figure &=
|
---|
239 | attribute anchor { xsd:ID }?,
|
---|
240 | [ a:defaultValue = "" ] attribute title { ATEXT }?,
|
---|
241 | [ a:defaultValue = "false" ]
|
---|
242 | attribute suppress-title { "true" | "false" }?,
|
---|
243 | attribute src { URI }?,
|
---|
244 | [ a:defaultValue = "left" ]
|
---|
245 | attribute align { "left" | "center" | "right" }?,
|
---|
246 | [ a:defaultValue = "" ] attribute alt { ATEXT }?,
|
---|
247 | [ a:defaultValue = "" ] attribute width { ATEXT }?,
|
---|
248 | [ a:defaultValue = "" ] attribute height { ATEXT }?
|
---|
249 | preamble =
|
---|
250 | element preamble {
|
---|
251 | attlist.preamble, (TEXT | xref | eref | iref | cref | spanx)*
|
---|
252 | }
|
---|
253 | attlist.preamble &= empty
|
---|
254 | artwork = element artwork { attlist.artwork, TEXT* }
|
---|
255 | attlist.artwork &=
|
---|
256 | [ a:defaultValue = "preserve" ]
|
---|
257 | attribute xml:space { "default" | "preserve" }?,
|
---|
258 | [ a:defaultValue = "" ] attribute name { ATEXT }?,
|
---|
259 | [ a:defaultValue = "" ] attribute type { ATEXT }?,
|
---|
260 | attribute src { URI }?,
|
---|
261 | [ a:defaultValue = "left" ]
|
---|
262 | attribute align { "left" | "center" | "right" }?,
|
---|
263 | [ a:defaultValue = "" ] attribute alt { ATEXT }?,
|
---|
264 | [ a:defaultValue = "" ] attribute width { ATEXT }?,
|
---|
265 | [ a:defaultValue = "" ] attribute height { ATEXT }?
|
---|
266 | postamble =
|
---|
267 | element postamble {
|
---|
268 | attlist.postamble, (TEXT | xref | eref | iref | cref | spanx)*
|
---|
269 | }
|
---|
270 | attlist.postamble &= empty
|
---|
271 | texttable =
|
---|
272 | element texttable {
|
---|
273 | attlist.texttable, preamble?, ttcol+, c*, postamble?
|
---|
274 | }
|
---|
275 | attlist.texttable &=
|
---|
276 | attribute anchor { xsd:ID }?,
|
---|
277 | [ a:defaultValue = "" ] attribute title { ATEXT }?,
|
---|
278 | [ a:defaultValue = "false" ]
|
---|
279 | attribute suppress-title { "true" | "false" }?,
|
---|
280 | [ a:defaultValue = "center" ]
|
---|
281 | attribute align { "left" | "center" | "right" }?,
|
---|
282 | [ a:defaultValue = "full" ]
|
---|
283 | attribute style { "all" | "none" | "headers" | "full" }?
|
---|
284 | ttcol = element ttcol { attlist.ttcol, CTEXT }
|
---|
285 | attlist.ttcol &=
|
---|
286 | attribute width { ATEXT }?,
|
---|
287 | [ a:defaultValue = "left" ]
|
---|
288 | attribute align { "left" | "center" | "right" }?
|
---|
289 | c = element c { attlist.c, (TEXT | xref | eref | iref | cref | spanx)* }
|
---|
290 | attlist.c &= empty
|
---|
291 | # Back matter
|
---|
292 |
|
---|
293 | # sections, if present, are appendices
|
---|
294 | back = element back { attlist.back, references*, section* }
|
---|
295 | attlist.back &= empty
|
---|
296 | references = element references { attlist.references, reference+ }
|
---|
297 | attlist.references &=
|
---|
298 | [ a:defaultValue = "References" ] attribute title { ATEXT }?
|
---|
299 | reference =
|
---|
300 | element reference {
|
---|
301 | attlist.reference, front, seriesInfo*, format*, annotation*
|
---|
302 | }
|
---|
303 | attlist.reference &=
|
---|
304 | attribute anchor { xsd:ID }?,
|
---|
305 | attribute target { URI }?
|
---|
306 | seriesInfo = element seriesInfo { attlist.seriesInfo, empty }
|
---|
307 | attlist.seriesInfo &=
|
---|
308 | attribute name { ATEXT },
|
---|
309 | attribute value { ATEXT }
|
---|
310 | format = element format { attlist.format, empty }
|
---|
311 | attlist.format &=
|
---|
312 | attribute target { URI }?,
|
---|
313 | attribute type { ATEXT },
|
---|
314 | attribute octets { NUMBER }?
|
---|
315 | annotation =
|
---|
316 | element annotation {
|
---|
317 | attlist.annotation, (TEXT | xref | eref | iref | cref | spanx)*
|
---|
318 | }
|
---|
319 | attlist.annotation &= empty
|
---|
320 | start = rfc
|
---|