source: rfc2629xslt/rfc2629.rnc @ 723

Last change on this file since 723 was 713, checked in by julian.reschke@…, 10 years ago

upgrade to latest version of rfc2629.xslt/xml2rfc.tcl; remove now superfluous empty <organization/> elements in references

File size: 9.9 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 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
94front =
95  element front {
96    attlist.front,
97    title,
98    author+,
99    date,
100    area*,
101    workgroup*,
102    keyword*,
103    abstract?,
104    note*
105  }
106attlist.front &= empty
107# the "abbrev" attribute is used for headers, etc.
108title = element title { attlist.title, CTEXT }
109attlist.title &= attribute abbrev { ATEXT }?
110author = element author { attlist.author, organization?, address? }
111attlist.author &=
112  attribute initials { ATEXT }?,
113  attribute surname { ATEXT }?,
114  attribute fullname { ATEXT }?,
115  attribute role { "editor" }?
116organization = element organization { attlist.organization, CTEXT }
117attlist.organization &= attribute abbrev { ATEXT }?
118address =
119  element address {
120    attlist.address, postal?, phone?, facsimile?, email?, uri?
121  }
122attlist.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
126postal =
127  element postal {
128    attlist.postal, street+, (city | region | code | country)*
129  }
130attlist.postal &= empty
131street = element street { attlist.street, CTEXT }
132attlist.street &= empty
133city = element city { attlist.city, CTEXT }
134attlist.city &= empty
135region = element region { attlist.region, CTEXT }
136attlist.region &= empty
137code = element code { attlist.code, CTEXT }
138attlist.code &= empty
139country = element country { attlist.country, CTEXT }
140attlist.country &= empty
141phone = element phone { attlist.phone, CTEXT }
142attlist.phone &= empty
143facsimile = element facsimile { attlist.facsimile, CTEXT }
144attlist.facsimile &= empty
145email = element email { attlist.email, CTEXT }
146attlist.email &= empty
147uri = element uri { attlist.uri, CTEXT }
148attlist.uri &= empty
149date = element date { attlist.date, empty }
150attlist.date &=
151  attribute day { DAY }?,
152  attribute month { MONTH }?,
153  attribute year { YEAR }?
154# meta-data...
155area = element area { attlist.area, CTEXT }
156attlist.area &= empty
157workgroup = element workgroup { attlist.workgroup, CTEXT }
158attlist.workgroup &= empty
159keyword = element keyword { attlist.keyword, CTEXT }
160attlist.keyword &= empty
161abstract = element abstract { attlist.abstract, t+ }
162attlist.abstract &= empty
163note = element note { attlist.note, t+ }
164attlist.note &= attribute title { ATEXT }
165# The body
166middle = element middle { attlist.middle, section+ }
167attlist.middle &= empty
168section =
169  element section {
170    attlist.section, (t | figure | texttable | iref)*, section*
171  }
172attlist.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...
186t =
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  }
199attlist.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+ }
205attlist.list &=
206  attribute style { ATEXT }?,
207  attribute hangIndent { NUMBER }?,
208  attribute counter { ATEXT }?
209xref = element xref { attlist.xref, CTEXT }
210attlist.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" }?
215eref = element eref { attlist.eref, CTEXT }
216attlist.eref &= attribute target { URI }
217iref = element iref { attlist.iref, empty }
218attlist.iref &=
219  attribute item { ATEXT },
220  [ a:defaultValue = "" ] attribute subitem { ATEXT }?,
221  [ a:defaultValue = "false" ] attribute primary { "true" | "false" }?
222cref = element cref { attlist.cref, CTEXT }
223attlist.cref &=
224  attribute anchor { xsd:ID }?,
225  attribute source { ATEXT }?
226spanx = element spanx { attlist.spanx, CTEXT }
227attlist.spanx &=
228  [ a:defaultValue = "preserve" ]
229  attribute xml:space { "default" | "preserve" }?,
230  [ a:defaultValue = "emph" ] attribute style { ATEXT }?
231vspace = element vspace { attlist.vspace, empty }
232attlist.vspace &=
233  [ a:defaultValue = "0" ] attribute blankLines { NUMBER }?
234figure =
235  element figure {
236    attlist.figure, iref*, preamble?, artwork, postamble?
237  }
238attlist.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 }?
249preamble =
250  element preamble {
251    attlist.preamble, (TEXT | xref | eref | iref | cref | spanx)*
252  }
253attlist.preamble &= empty
254artwork = element artwork { attlist.artwork, TEXT* }
255attlist.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 }?
266postamble =
267  element postamble {
268    attlist.postamble, (TEXT | xref | eref | iref | cref | spanx)*
269  }
270attlist.postamble &= empty
271texttable =
272  element texttable {
273    attlist.texttable, preamble?, ttcol+, c*, postamble?
274  }
275attlist.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" }?
284ttcol = element ttcol { attlist.ttcol, CTEXT }
285attlist.ttcol &=
286  attribute width { ATEXT }?,
287  [ a:defaultValue = "left" ]
288  attribute align { "left" | "center" | "right" }?
289c = element c { attlist.c, (TEXT | xref | eref | iref | cref | spanx)* }
290attlist.c &= empty
291# Back matter
292
293# sections, if present, are appendices
294back = element back { attlist.back, references*, section* }
295attlist.back &= empty
296references = element references { attlist.references, reference+ }
297attlist.references &=
298  [ a:defaultValue = "References" ] attribute title { ATEXT }?
299reference =
300  element reference {
301    attlist.reference, front, seriesInfo*, format*, annotation*
302  }
303attlist.reference &=
304  attribute anchor { xsd:ID }?,
305  attribute target { URI }?
306seriesInfo = element seriesInfo { attlist.seriesInfo, empty }
307attlist.seriesInfo &=
308  attribute name { ATEXT },
309  attribute value { ATEXT }
310format = element format { attlist.format, empty }
311attlist.format &=
312  attribute target { URI }?,
313  attribute type { ATEXT },
314  attribute octets { NUMBER }?
315annotation =
316  element annotation {
317    attlist.annotation, (TEXT | xref | eref | iref | cref | spanx)*
318  }
319attlist.annotation &= empty
320start = rfc
Note: See TracBrowser for help on using the repository browser.