source: rfc2629xslt/rfc2629.rnc @ 446

Last change on this file since 446 was 446, checked in by julian.reschke@…, 11 years ago

Update to latest version of rfc2629.xslt, and add experimental version of xml2rfc.tcl (supporting the new IPR escape clause), use that clause in P1..P7 (but not for the method registrations).

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