source: rfc2629xslt/rfc2629.rnc @ 415

Last change on this file since 415 was 380, checked in by julian.reschke@…, 12 years ago

add base RNC

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