source: rfc2629xslt/rfc2629-ext.rnc @ 1327

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

bump up document dates, update to latest version of rfc2629.xslt

File size: 7.9 KB
Line 
1# Automatically extracted from rfc2629xslt.xml. DO NOT EDIT!
2
3# WORK IN PROGRESS! PLEASE REPORT PROBLEMS TO THE AUTHOR.
4
5# Define our extension namespace
6namespace x = "http://purl.org/net/xml2rfc/ext"
7
8# Define GRDDL namespace
9namespace grddl = "http://www.w3.org/2003/g/data-view#"
10
11# Define RDF namespace
12namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
13
14# Include rfc2629bis RNC grammar
15include "rfc2629.rnc" {
16 
17  # Redefine <artwork> to allow markup
18  artwork =
19    element artwork {
20      attlist.artwork,
21      (TEXT
22        | eref
23        | iref
24        | spanx
25        | xref
26        | x_abnf-char-sequence
27        | x_bb
28        | x_bc
29        | x_bcp14
30        | x_bt
31        | x_highlight
32        | x_length-of
33        | x_parse-xml
34        | x_ref
35        | x_span
36        | x_x)*
37    }
38
39  # Redefine <back> to allow boilerplate
40  back =
41    element back {
42      attlist.back,
43      references*,
44      section*,
45      x_boilerplate?
46    }
47
48  # Redefine <c> to allow our extension elements
49  c =
50    element c {
51      attlist.c,
52      (TEXT
53        | xref
54        | eref
55        | iref
56        | cref
57        | spanx
58        | x_ref)*
59    }
60
61  # Redefine <cref> to allow more child elements
62  cref =
63    element cref {
64      attlist.cref,
65      (TEXT
66        | eref
67        | xref)*
68    }
69
70  # Redefine <front> to allow boilerplate
71  front =
72    element front {
73      attlist.front,
74      title,
75      author+,
76      date,
77      area*,
78      workgroup*,
79      keyword*,
80      x_boilerplate?,
81      abstract?,
82      note*
83    }
84 
85  # Redefine <list> element to allow <x:lt> child elements
86  \list =
87    element list {
88      attlist.list,
89      (t+ | x_lt+)
90    }   
91   
92  # Redefine <preamble> to allow our extension elements
93  preamble =
94    element preamble {
95      attlist.preamble,
96      (TEXT
97        | xref
98        | eref
99        | iref
100        | cref
101        | spanx
102        | x_anchor-alias)*
103    }
104
105  # Redefine <postamble> to allow our extension elements
106  postamble =
107    element postamble {
108      attlist.postamble,
109      (TEXT
110        | xref
111        | eref
112        | iref
113        | cref
114        | spanx
115        | x_bcp14)*
116    }
117
118  # Redefine <reference> to allow our extension elements
119  reference =
120    element reference {
121      attlist.reference,
122      front,
123      seriesInfo*,
124      x_prose?
125      format*,
126      annotation*,
127      x_source?
128    }
129
130  # Redefine <rfc> to allow our extension elements
131  rfc =
132    element rfc {
133      attlist.rfc,
134      x_link*,
135      x_assign-section-number*,
136      front,
137      middle,
138      back?
139    }
140
141  # Redefine <section> to allow our extension elements
142  section =
143    element section {
144      attlist.section,
145      (t
146       | figure
147       | texttable
148       | iref
149       | section
150       | x_anchor-alias
151       | x_blockquote
152       | x_include-author
153       | x_note
154       | rdf_Description)*
155    }
156
157  # Redefine <spanx> to allow some markup
158  spanx =
159    element spanx {
160      attlist.spanx,
161      (TEXT
162        | iref
163        | xref
164        | x_ref)*
165    }
166
167  # Redefine <t> to allow our extension elements
168  t =
169    element t {
170      attlist.t,
171      (TEXT
172       | \list
173       | figure
174       | xref
175       | eref
176       | iref
177       | cref
178       | spanx
179       | vspace
180       | x_abnf-char-sequence
181       | x_anchor-alias
182       | x_bcp14
183       | x_dfn
184       | x_h
185       | x_q
186       | x_ref
187       | x_sup)*
188    }
189}
190
191# Allow x:indent-with attribute on <artwork>
192attlist.artwork &=
193  attribute x:indent-with { ATEXT }?
194
195# Allow anchor and x:annotation attributes on <author>
196attlist.author &=
197  attribute anchor { xsd:ID }?,
198  attribute x:annotation { ATEXT }?
199 
200  # Extend attribute set for <iref> (see Section 11.23)
201attlist.iref &=
202  attribute x:for-anchor { ATEXT }?
203
204# Extend attribute set for <list> (see Section 11.24)
205attlist.list &=
206  attribute x:indent { ATEXT }?
207
208# Extend attribute set for <preamble>
209attlist.preamble &=
210  attribute anchor { xsd:ID }?
211
212# Extend attribute set for <rfc>
213attlist.rfc &=
214  attribute grddl:transformation { ATEXT }?,
215  attribute x:maturity-level { "proposed" | "draft" | "internet" }?
216
217# Extend attribute set for <section> (see Section 11.26)
218attlist.section &=
219  attribute x:fixed-section-number { ATEXT }?
220
221# Allow anchor attribute on <spanx>
222attlist.spanx &=
223  attribute anchor { xsd:ID }?
224
225# Allow x:quotes attribute on <title>
226attlist.title &=
227  attribute x:quotes { "true" | "false" }?
228
229# Allow annotation attribute on <uri>
230attlist.uri &=
231  attribute x:annotation { ATEXT }?
232
233# Extend attribute set for <xref> (see Section 11.27)
234attlist.xref &=
235  attribute x:fmt  { "()" | "," | "anchor" | "of" | "number" | "sec" |
236                     "none" }?,
237  attribute x:rel  { ATEXT }?,
238  attribute x:sec  { ATEXT }?
239
240# Conversion to ABNF char sequence (see Section 11.1)
241x_abnf-char-sequence =
242  element x:abnf-char-sequence {
243    TEXT
244  }
245
246# Aliasing of anchors (see Section 11.2)
247x_anchor-alias =
248  element x:anchor-alias {
249    attribute value { TEXT },
250    empty
251  }
252
253# Including Author information
254# (experimental)
255x_include-author =
256  element x:include-author {
257    attribute target { xsd:IDREF }
258  }
259
260# Setting section numbers for internally generated sections
261# (experimental)
262x_assign-section-number =
263  element x:assign-section-number {
264    attribute builtin-target { "authors" },
265    attribute number { TEXT },
266    empty
267  }
268
269# Bottom line of box drawing (see Section 11.4)
270x_bb =
271  element x:bb {
272    (TEXT
273      | iref
274      | xref
275      | x_bb
276      | x_bc
277      | x_bt
278      | x_ref)*
279  }
280
281# Center line of box drawing (see Section 11.5)
282x_bc =
283  element x:bc {
284    (TEXT
285      | iref
286      | spanx
287      | xref
288      | x_bb
289      | x_bc
290      | x_bt
291      | x_ref)*
292  }
293
294# BCP14/RFC2119 keywords (see Section 11.3)
295x_bcp14 =
296  element x:bcp14 {
297    "MAY"
298    | "MUST"
299    | "MUST NOT"
300    | "NOT RECOMMENDED"
301    | "OPTIONAL"
302    | "RECOMMENDED"
303    | "REQUIRED"
304    | "SHALL"
305    | "SHALL NOT"
306    | "SHOULD"
307    | "SHOULD NOT"
308  }
309 
310# Blockquote (see Section 11.6)
311x_blockquote =
312  element x:blockquote {
313    attribute cite { URI }?,
314    t+
315  }
316
317# Boilerplate (see Section 11.6)
318x_boilerplate =
319  element x:boilerplate {
320    section+
321  }
322
323# Top line of box drawing (see Section 11.8)
324x_bt =
325  element x:bt {
326    (TEXT
327      | iref
328      | xref
329      | x_bb
330      | x_bc
331      | x_bt
332      | x_ref)*
333  }
334
335# Definition (see Section 11.9)
336x_dfn =
337  element x:dfn {
338    attribute anchor { xsd:ID }?,
339    (TEXT
340      | iref)*
341  }
342 
343# Heading (see Section 11.10)
344x_h =
345  element x:h {
346    TEXT
347  }
348
349# Heading (see Section 11.11)
350x_highlight =
351  element x:highlight {
352    TEXT
353  }
354
355# Length Measurement (see Section 11.12)
356x_length-of =
357  element x:length-of {
358    attribute indented { NUMBER }?,
359    attribute target { xsd:IDREF },
360    empty
361  }
362
363# Link (see Section 11.13)
364x_link =
365  element x:link {
366    attribute href { URI },
367    attribute title { TEXT }?,
368    attribute rel { TEXT },
369    empty
370  }
371 
372# Extended list item (see Section 11.14)
373x_lt =
374  element x:lt {
375    attribute anchor { xsd:ID }?,
376    attribute hangText { TEXT }?,
377    t+
378  }
379
380# Note (see Section 11.15)
381x_note =
382  element x:note {
383    t+
384  }
385
386# Signal XML content (see Section 11.16)
387x_parse-xml =
388  element x:parse-xml {
389    (TEXT
390      | xref)*
391  }
392
393# Inline prose in a reference (see Section 11.17)
394x_prose =
395  element x:prose {
396    TEXT
397  }
398
399# Inline quote (see Section 11.18)
400x_q =
401  element x:q {
402    TEXT
403  }
404
405# Anchor reference (see Section 11.19) 
406x_ref =
407  element x:ref {
408    attribute anchor { xsd:ID }?,
409    TEXT
410  }
411
412# source information (see Section 11.20) 
413x_source =
414  element x:source {
415    attribute basename { ATEXT }?,
416    attribute href { URI },
417    empty
418  }
419
420# superscript (see Section 11.21)
421x_sup =
422  element x:sup {
423    TEXT
424  }
425
426# Inline Span
427x_span =
428  element x:span {
429    attribute anchor { xsd:ID }?,
430    (TEXT
431      | x_parse-xml)*
432  }
433
434# Nop (for alignment in source)
435x_x =
436  element x:x {
437    empty
438  }
439
440# Embed RDF statements
441rdf_Description =
442  element rdf:Description {
443    rdf_content
444  }
445 
446rdf_content =
447  ( TEXT | element * { rdf_content })*
Note: See TracBrowser for help on using the repository browser.