source: rfc2629xslt/rfc2629.rnc @ 1667

Last change on this file since 1667 was 1103, checked in by julian.reschke@…, 9 years ago

Upgrade to latest version of rfc2629.xslt and xml2rfc.tcl; bump up document dates

File size: 10.0 KB
Line 
1# revised DTD for the RFC document series, draft of 2009-10-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
46namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
47
48NUMBER = string
49NUMBERS = string
50DAY = string
51MONTH = string
52YEAR = string
53URI = string
54ATEXT = string
55CTEXT = text
56TEXT = 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.
63rfc = element rfc { attlist.rfc, front, middle, back? }
64attlist.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 consensus { "no" | "yes" }?,
70  attribute seriesNo { NUMBER }?,
71  attribute ipr {
72    "full2026"
73    | "noDerivativeWorks2026"
74    | "none"
75    | "full3667"
76    | "noModification3667"
77    | "noDerivatives3667"
78    | "full3978"
79    | "noModification3978"
80    | "noDerivatives3978"
81    | "trust200811"
82    | "noModificationTrust200811"
83    | "noDerivativesTrust200811"
84    | "trust200902"
85    | "noModificationTrust200902"
86    | "noDerivativesTrust200902"
87    | "pre5378Trust200902"
88  }?,
89  attribute iprExtract { xsd:IDREF }?,
90  [ a:defaultValue = "IETF" ]
91  attribute submissionType { "IETF" | "IAB" | "IRTF" | "independent" }?,
92  attribute docName { ATEXT }?,
93  [ a:defaultValue = "en" ] attribute xml:lang { ATEXT }?
94# Front matter
95front =
96  element front {
97    attlist.front,
98    title,
99    author+,
100    date,
101    area*,
102    workgroup*,
103    keyword*,
104    abstract?,
105    note*
106  }
107attlist.front &= empty
108# the "abbrev" attribute is used for headers, etc.
109title = element title { attlist.title, CTEXT }
110attlist.title &= attribute abbrev { ATEXT }?
111author = element author { attlist.author, organization?, address? }
112attlist.author &=
113  attribute initials { ATEXT }?,
114  attribute surname { ATEXT }?,
115  attribute fullname { ATEXT }?,
116  attribute role { "editor" }?
117organization = element organization { attlist.organization, CTEXT }
118attlist.organization &= attribute abbrev { ATEXT }?
119address =
120  element address {
121    attlist.address, postal?, phone?, facsimile?, email?, uri?
122  }
123attlist.address &= empty
124# this content model should be more strict:
125# at most one of each the city, region, code, and country
126# elements may be present
127postal =
128  element postal {
129    attlist.postal, street+, (city | region | code | country)*
130  }
131attlist.postal &= empty
132street = element street { attlist.street, CTEXT }
133attlist.street &= empty
134city = element city { attlist.city, CTEXT }
135attlist.city &= empty
136region = element region { attlist.region, CTEXT }
137attlist.region &= empty
138code = element code { attlist.code, CTEXT }
139attlist.code &= empty
140country = element country { attlist.country, CTEXT }
141attlist.country &= empty
142phone = element phone { attlist.phone, CTEXT }
143attlist.phone &= empty
144facsimile = element facsimile { attlist.facsimile, CTEXT }
145attlist.facsimile &= empty
146email = element email { attlist.email, CTEXT }
147attlist.email &= empty
148uri = element uri { attlist.uri, CTEXT }
149attlist.uri &= empty
150date = element date { attlist.date, empty }
151attlist.date &=
152  attribute day { DAY }?,
153  attribute month { MONTH }?,
154  attribute year { YEAR }?
155# meta-data...
156area = element area { attlist.area, CTEXT }
157attlist.area &= empty
158workgroup = element workgroup { attlist.workgroup, CTEXT }
159attlist.workgroup &= empty
160keyword = element keyword { attlist.keyword, CTEXT }
161attlist.keyword &= empty
162abstract = element abstract { attlist.abstract, t+ }
163attlist.abstract &= empty
164note = element note { attlist.note, t+ }
165attlist.note &= attribute title { ATEXT }
166# The body
167middle = element middle { attlist.middle, section+ }
168attlist.middle &= empty
169section =
170  element section {
171    attlist.section, (t | figure | texttable | iref)*, section*
172  }
173attlist.section &=
174  attribute anchor { xsd:ID }?,
175  attribute title { ATEXT },
176  [ a:defaultValue = "default" ]
177  attribute toc { "include" | "exclude" | "default" }?
178# use of <appendix/> is deprecated...
179# <!ELEMENT appendix    ((t|figure|texttable|iref)*,appendix*)>
180# <!ATTLIST appendix
181#           anchor      ID                 #IMPLIED
182#           title       %ATEXT;            #REQUIRED
183#           toc         (include|exclude|default)
184#                                          "default">
185
186# use of <figure/> is deprecated...
187t =
188  element t {
189    attlist.t,
190    (TEXT
191     | \list
192     | figure
193     | xref
194     | eref
195     | iref
196     | cref
197     | spanx
198     | vspace)*
199  }
200attlist.t &=
201  attribute anchor { xsd:ID }?,
202  attribute hangText { ATEXT }?
203# the value of the style attribute is inherited from the closest
204# parent
205\list = element list { attlist.list, t+ }
206attlist.list &=
207  attribute style { ATEXT }?,
208  attribute hangIndent { NUMBER }?,
209  attribute counter { ATEXT }?
210xref = element xref { attlist.xref, CTEXT }
211attlist.xref &=
212  attribute target { xsd:IDREF },
213  [ a:defaultValue = "false" ] attribute pageno { "true" | "false" }?,
214  [ a:defaultValue = "default" ]
215  attribute format { "counter" | "title" | "none" | "default" }?
216eref = element eref { attlist.eref, CTEXT }
217attlist.eref &= attribute target { URI }
218iref = element iref { attlist.iref, empty }
219attlist.iref &=
220  attribute item { ATEXT },
221  [ a:defaultValue = "" ] attribute subitem { ATEXT }?,
222  [ a:defaultValue = "false" ] attribute primary { "true" | "false" }?
223cref = element cref { attlist.cref, CTEXT }
224attlist.cref &=
225  attribute anchor { xsd:ID }?,
226  attribute source { ATEXT }?
227spanx = element spanx { attlist.spanx, CTEXT }
228attlist.spanx &=
229  [ a:defaultValue = "preserve" ]
230  attribute xml:space { "default" | "preserve" }?,
231  [ a:defaultValue = "emph" ] attribute style { ATEXT }?
232vspace = element vspace { attlist.vspace, empty }
233attlist.vspace &=
234  [ a:defaultValue = "0" ] attribute blankLines { NUMBER }?
235figure =
236  element figure {
237    attlist.figure, iref*, preamble?, artwork, postamble?
238  }
239attlist.figure &=
240  attribute anchor { xsd:ID }?,
241  [ a:defaultValue = "" ] attribute title { ATEXT }?,
242  [ a:defaultValue = "false" ]
243  attribute suppress-title { "true" | "false" }?,
244  attribute src { URI }?,
245  [ a:defaultValue = "left" ]
246  attribute align { "left" | "center" | "right" }?,
247  [ a:defaultValue = "" ] attribute alt { ATEXT }?,
248  [ a:defaultValue = "" ] attribute width { ATEXT }?,
249  [ a:defaultValue = "" ] attribute height { ATEXT }?
250preamble =
251  element preamble {
252    attlist.preamble, (TEXT | xref | eref | iref | cref | spanx)*
253  }
254attlist.preamble &= empty
255artwork = element artwork { attlist.artwork, TEXT* }
256attlist.artwork &=
257  [ a:defaultValue = "preserve" ]
258  attribute xml:space { "default" | "preserve" }?,
259  [ a:defaultValue = "" ] attribute name { ATEXT }?,
260  [ a:defaultValue = "" ] attribute type { ATEXT }?,
261  attribute src { URI }?,
262  [ a:defaultValue = "left" ]
263  attribute align { "left" | "center" | "right" }?,
264  [ a:defaultValue = "" ] attribute alt { ATEXT }?,
265  [ a:defaultValue = "" ] attribute width { ATEXT }?,
266  [ a:defaultValue = "" ] attribute height { ATEXT }?
267postamble =
268  element postamble {
269    attlist.postamble, (TEXT | xref | eref | iref | cref | spanx)*
270  }
271attlist.postamble &= empty
272texttable =
273  element texttable {
274    attlist.texttable, preamble?, ttcol+, c*, postamble?
275  }
276attlist.texttable &=
277  attribute anchor { xsd:ID }?,
278  [ a:defaultValue = "" ] attribute title { ATEXT }?,
279  [ a:defaultValue = "false" ]
280  attribute suppress-title { "true" | "false" }?,
281  [ a:defaultValue = "center" ]
282  attribute align { "left" | "center" | "right" }?,
283  [ a:defaultValue = "full" ]
284  attribute style { "all" | "none" | "headers" | "full" }?
285ttcol = element ttcol { attlist.ttcol, CTEXT }
286attlist.ttcol &=
287  attribute width { ATEXT }?,
288  [ a:defaultValue = "left" ]
289  attribute align { "left" | "center" | "right" }?
290c = element c { attlist.c, (TEXT | xref | eref | iref | cref | spanx)* }
291attlist.c &= empty
292# Back matter
293
294# sections, if present, are appendices
295back = element back { attlist.back, references*, section* }
296attlist.back &= empty
297references = element references { attlist.references, reference+ }
298attlist.references &=
299  [ a:defaultValue = "References" ] attribute title { ATEXT }?
300reference =
301  element reference {
302    attlist.reference, front, seriesInfo*, format*, annotation*
303  }
304attlist.reference &=
305  attribute anchor { xsd:ID }?,
306  attribute target { URI }?
307seriesInfo = element seriesInfo { attlist.seriesInfo, empty }
308attlist.seriesInfo &=
309  attribute name { ATEXT },
310  attribute value { ATEXT }
311format = element format { attlist.format, empty }
312attlist.format &=
313  attribute target { URI }?,
314  attribute type { ATEXT },
315  attribute octets { NUMBER }?
316annotation =
317  element annotation {
318    attlist.annotation, (TEXT | xref | eref | iref | cref | spanx)*
319  }
320attlist.annotation &= empty
321start = rfc
Note: See TracBrowser for help on using the repository browser.