source: rfc2629xslt/rfc2629-ext.rnc @ 2738

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

update rfc2629.xslt

File size: 12.6 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 <annotation> to allow more markup
18  annotation =
19    element annotation {
20      attlist.annotation,
21      (TEXT
22        | xref
23        | eref
24        | iref
25        | cref
26        | spanx
27        | v3_tt
28        )*
29    }
30
31  # Redefine <artwork> to allow markup
32  artwork =
33    element artwork {
34      attlist.artwork,
35      (TEXT
36        | eref
37        | iref
38        | spanx
39        | xref
40        | v3_em
41        | v3_strong
42        | x_abnf-char-sequence
43        | x_bb
44        | x_bc
45        | x_bcp14
46        | x_bt
47        | x_highlight
48        | x_length-of
49        | x_parse-xml
50        | x_ref
51        | x_span
52        | x_x)*
53    }
54
55  # Redefine <back> to allow boilerplate
56  back =
57    element back {
58      attlist.back,
59      v3_displayreference*,
60      references*,
61      section*,
62      x_boilerplate?
63    }
64
65  # Redefine <c> to allow our extension elements
66  c =
67    element c {
68      attlist.c,
69      (TEXT
70        | xref
71        | eref
72        | iref
73        | cref
74        | spanx
75        | v3_em
76        | v3_strong
77        | v3_tt
78        | x_ref)*
79    }
80
81  # Redefine <cref> to allow more child elements
82  cref =
83    element cref {
84      attlist.cref,
85      (TEXT
86        | eref
87        | xref)*
88    }
89
90  # Redefine <front> to allow boilerplate
91  front =
92    element front {
93      attlist.front,
94      title,
95      author+,
96      date,
97      area*,
98      workgroup*,
99      keyword*,
100      x_boilerplate?,
101      abstract?,
102      note*
103    }
104 
105  # Redefine <list> element to allow <x:lt> child elements
106  \list =
107    element list {
108      attlist.list,
109      (t+ | x_lt+)
110    }   
111   
112  # Redefine <preamble> to allow our extension elements
113  preamble =
114    element preamble {
115      attlist.preamble,
116      (TEXT
117        | xref
118        | eref
119        | iref
120        | cref
121        | spanx
122        | v3_em
123        | v3_strong
124        | v3_tt
125        | x_anchor-alias
126        | x_bcp14)*
127  }
128
129  # Redefine <postal> to allow <postalLine>
130  postal =
131    element postal {
132      (
133        (city
134          | code
135          | country
136          | region
137          | street)*
138        | v3_postalLine+)
139    }
140
141  # Redefine <postamble> to allow our extension elements
142  postamble =
143    element postamble {
144      attlist.postamble,
145      (TEXT
146        | xref
147        | eref
148        | iref
149        | cref
150        | spanx
151        | v3_em
152        | v3_strong
153        | v3_tt
154        | x_bcp14)*
155    }
156
157  # Redefine <reference> to allow our extension elements
158  reference =
159    element reference {
160      attlist.reference,
161      front,
162      seriesInfo*,
163      x_prose?,
164      v3_refcontent?,
165      format*,
166      annotation*,
167      x_source?
168    }
169
170  # Redefine <references> to allow our <name>
171  references =
172    element references {
173      attribute title { text }?,
174      v3_name?,
175      reference+
176    }
177
178  # Redefine <rfc> to allow our extension elements
179  rfc =
180    element rfc {
181      attlist.rfc,
182      x_link*,
183      x_feedback?,
184      x_assign-section-number*,
185      front,
186      middle,
187      back?
188    }
189
190  # Redefine <section> to allow our extension elements
191  section =
192    element section {
193      attlist.x_section,
194      (t
195       | figure
196       | texttable
197       | iref
198       | section
199       | v3_aside
200       | v3_blockquote
201       | v3_dl
202       | v3_name
203       | v3_ol
204       | v3_ul
205       | x_anchor-alias
206       | x_blockquote
207       | x_include-author
208       | x_note
209       | rdf_Description)*
210    }
211
212  # Redefine <spanx> to allow some markup
213  spanx =
214    element spanx {
215      attlist.spanx,
216      (TEXT
217        | iref
218        | xref
219        | x_ref)*
220    }
221
222  # Redefine <t> to allow our extension elements
223  t =
224    element t {
225      attlist.t,
226      (TEXT
227       | \list
228       | figure
229       | xref
230       | eref
231       | iref
232       | cref
233       | spanx
234       | vspace
235       | v3_bcp14
236       | v3_em
237       | v3_strong
238       | v3_sub
239       | v3_sup
240       | v3_tt
241       | x_abnf-char-sequence
242       | x_anchor-alias
243       | x_bcp14
244       | x_dfn
245       | x_h
246       | x_q
247       | x_ref
248       | x_span
249       | x_sup)*
250    }
251}
252
253# Allow x:indent-with attribute on <artwork>
254attlist.artwork &=
255  attribute x:indent-with { ATEXT }?,
256  attribute x:is-code-component { "no" | "yes" }?
257
258# Allow anchor and x:annotation attributes on <author>
259attlist.author &=
260  attribute anchor { xsd:ID }?,
261  attribute x:annotation { ATEXT }?
262 
263# Extend attribute set for <c> (see Section 11.24)
264attlist.c &=
265  attribute anchor { xsd:ID }?
266
267# Extend attribute set for <iref> (see Section 11.24)
268attlist.iref &=
269  attribute x:for-anchor { ATEXT }?
270
271# Extend attribute set for <list> (see Section 11.25)
272attlist.list &=
273  attribute x:indent { ATEXT }?
274
275# Extend attribute set for <preamble>
276attlist.preamble &=
277  attribute anchor { xsd:ID }?
278
279# Extend attribute set for <reference>
280attlist.reference &=
281  attribute quoteTitle { "false" | "true" }? # see Section 12.14.1
282
283# Extend attribute set for <rfc>
284attlist.rfc &=
285  attribute grddl:transformation { ATEXT }?,
286  attribute x:maturity-level { "proposed" | "draft" | "internet" }?
287
288# Extend/Relax attribute set for <section> (see Section 11.27)
289attlist.x_section &=
290  attribute anchor { xsd:ID }?,
291  attribute title { ATEXT }?,
292  attribute toc { "include" | "exclude" | "default" }?,
293  attribute numbered { "false" | "true" }?, # see Section 12.15.1
294  attribute removeInRFC { "false" | "true" }?, # see Section 12.15.2
295  attribute x:fixed-section-number { ATEXT }?
296
297# Allow anchor attribute on <spanx>
298attlist.spanx &=
299  attribute anchor { xsd:ID }?
300
301# Allow x:quotes attribute on <title>
302attlist.title &=
303  attribute x:quotes { "true" | "false" }?
304
305# Allow annotation attribute on <uri>
306attlist.uri &=
307  attribute x:annotation { ATEXT }?
308
309# Extend attribute set for <xref> (see Section 11.28)
310attlist.xref &=
311  attribute x:fmt  { "()" | "," | "of" | "number" | "sec" |
312                     "none" }?,
313  attribute x:rel  { ATEXT }?,
314  attribute x:sec  { ATEXT }?,
315  attribute relative { ATEXT }?,      # Section 12.21.1
316  attribute section { ATEXT }?,       # Section 12.21.2
317  attribute sectionFormat { ATEXT }?  # Section 12.21.3
318
319# Side Note (see Section 12.1)
320v3_aside =
321  element aside {
322    attribute anchor { xsd:ID }?,
323    t+
324  }
325
326# BCP14/RFC2119 keywords (see Section 12.2)
327v3_bcp14 =
328  element bcp14 {
329    "MAY"
330    | "MUST"
331    | "MUST NOT"
332    | "NOT RECOMMENDED"
333    | "OPTIONAL"
334    | "RECOMMENDED"
335    | "REQUIRED"
336    | "SHALL"
337    | "SHALL NOT"
338    | "SHOULD"
339    | "SHOULD NOT"
340  }
341
342# Blockquote (see Section 12.3)
343v3_blockquote =
344  element blockquote {
345    attribute anchor { xsd:ID }?,
346    attribute cite { URI }?,
347    t+
348  }
349
350# Mapping of reference names to display names (see Section 12.4)
351v3_displayreference =
352  element displayreference {
353    attribute target { xsd:IDREF },
354    attribute to { ATEXT }
355  }
356
357# Definition List Description Element (see Section 12.5)
358v3_dd =
359  element dd {
360    (t
361      | v3_dl)+ |
362    (TEXT
363      | cref
364      | eref
365      | iref
366      | xref
367      | v3_em
368      | v3_tt
369      | v3_strong)*
370  }
371
372# Definition List (see Section 12.6)
373v3_dl =
374  element dl {
375       attribute spacing { "normal" | "compact" }?,
376       attribute hanging { "false" | "true" }?,
377       (v3_dt, v3_dd)+
378  }
379
380# Definition List Description Term (see Section 12.7)
381v3_dt =
382  element dt {
383    attribute anchor { xsd:ID }?,
384    (TEXT
385      | cref
386      | eref
387      | iref
388      | xref
389      | v3_em
390      | v3_tt
391      | v3_strong)*
392  }
393
394# Emphasized Text (see Section 12.8)
395v3_em =
396  element em {
397    (TEXT
398      | xref
399      | v3_strong
400      | x_ref)*
401  }
402
403# Definition List (see Section 12.9)
404v3_li =
405  element li {
406    attribute anchor { xsd:ID }?,
407    ((v3_dl | v3_ol  | t | v3_ul )+
408      |
409    (TEXT
410      | cref
411      | eref
412      | iref
413      | xref
414      | v3_em
415      | v3_strong
416      | v3_sub
417      | v3_sup
418      | v3_tt
419      | x_ref)*
420    )
421  }
422
423# Section/Figure/Table Name (see Section 12.10)
424v3_name =
425  element name {
426    (TEXT
427      | v3_tt
428      | xref)*
429  }
430
431# Ordered List (see Section 12.11)
432v3_ol =
433  element ol {
434    attribute anchor { xsd:ID }?,
435    attribute start { TEXT }?,
436    v3_li+
437  }
438
439# Line in postal address (see Section 12.12)
440v3_postalLine =
441  element postalLine {
442    TEXT
443  }
444
445# additional content for references (see Section 12.13)
446v3_refcontent =
447  element refcontent {
448    (TEXT
449      | v3_em)*
450  }
451
452# Emphasized Text (see Section 12.16)
453v3_strong =
454  element strong {
455    (TEXT
456      | xref
457      | v3_em
458      | x_ref)*
459  }
460
461# Subscript (see Section 12.17)
462v3_sub =
463  element sub {
464    (TEXT)*
465  }
466
467# Superscript (see Section 12.18)
468v3_sup =
469  element sup {
470    (TEXT)*
471  }
472
473# Monospaced Text (see Section 12.19)
474v3_tt =
475  element tt {
476    (TEXT
477      | xref
478      | v3_em
479      | x_ref)*
480  }
481
482# Unordered List (see Section 12.20)
483v3_ul =
484  element ul {
485    attribute anchor { xsd:ID }?,
486    attribute empty { TEXT }?,
487    v3_li+
488  }
489
490# Conversion to ABNF char sequence (see Section 11.1)
491x_abnf-char-sequence =
492  element x:abnf-char-sequence {
493    TEXT
494  }
495
496# Aliasing of anchors (see Section 11.2)
497x_anchor-alias =
498  element x:anchor-alias {
499    attribute value { TEXT },
500    empty
501  }
502
503# Supply feedback links (see Section 11.10)
504x_feedback =
505  element x:feedback {
506    attribute template { TEXT },
507    empty
508  }
509
510# Including Author information
511# (experimental)
512x_include-author =
513  element x:include-author {
514    attribute target { xsd:IDREF }
515  }
516
517# Setting section numbers for internally generated sections
518# (experimental)
519x_assign-section-number =
520  element x:assign-section-number {
521    attribute builtin-target { "authors" },
522    attribute number { TEXT },
523    empty
524  }
525
526# Bottom line of box drawing (see Section 11.4)
527x_bb =
528  element x:bb {
529    (TEXT
530      | iref
531      | xref
532      | x_bb
533      | x_bc
534      | x_bt
535      | x_ref)*
536  }
537
538# Center line of box drawing (see Section 11.5)
539x_bc =
540  element x:bc {
541    (TEXT
542      | iref
543      | spanx
544      | xref
545      | x_bb
546      | x_bc
547      | x_bt
548      | x_ref)*
549  }
550
551# BCP14/RFC2119 keywords (see Section 11.3)
552x_bcp14 =
553  element x:bcp14 {
554    "MAY"
555    | "MUST"
556    | "MUST NOT"
557    | "NOT RECOMMENDED"
558    | "OPTIONAL"
559    | "RECOMMENDED"
560    | "REQUIRED"
561    | "SHALL"
562    | "SHALL NOT"
563    | "SHOULD"
564    | "SHOULD NOT"
565  }
566 
567# Blockquote (see Section 11.6)
568x_blockquote =
569  element x:blockquote {
570    attribute anchor { xsd:ID }?,
571    attribute cite { URI }?,
572    t+
573  }
574
575# Boilerplate (see Section 11.6)
576x_boilerplate =
577  element x:boilerplate {
578    section+
579  }
580
581# Top line of box drawing (see Section 11.8)
582x_bt =
583  element x:bt {
584    (TEXT
585      | iref
586      | xref
587      | x_bb
588      | x_bc
589      | x_bt
590      | x_ref)*
591  }
592
593# Definition (see Section 11.9)
594x_dfn =
595  element x:dfn {
596    attribute anchor { xsd:ID }?,
597    (TEXT
598      | iref)*
599  }
600 
601# Heading (see Section 11.11)
602x_h =
603  element x:h {
604    TEXT
605  }
606
607# Heading (see Section 11.12)
608x_highlight =
609  element x:highlight {
610    TEXT
611  }
612
613# Length Measurement (see Section 11.13)
614x_length-of =
615  element x:length-of {
616    attribute indented { NUMBER }?,
617    attribute target { xsd:IDREF },
618    empty
619  }
620
621# Link (see Section 11.14)
622x_link =
623  element x:link {
624    attribute basename { URI }?,
625    attribute href { URI }?,
626    attribute title { TEXT }?,
627    attribute rel { TEXT },
628    empty
629  }
630 
631# Extended list item (see Section 11.15)
632x_lt =
633  element x:lt {
634    attribute anchor { xsd:ID }?,
635    attribute hangText { TEXT }?,
636    t+
637  }
638
639# Note (see Section 11.16)
640x_note =
641  element x:note {
642    attribute anchor { xsd:ID }?,
643    t+
644  }
645
646# Signal XML content (see Section 11.17)
647x_parse-xml =
648  element x:parse-xml {
649    (TEXT
650      | xref)*
651  }
652
653# Inline prose in a reference (see Section 11.18)
654x_prose =
655  element x:prose {
656    TEXT
657  }
658
659# Inline quote (see Section 11.19)
660x_q =
661  element x:q {
662    TEXT
663  }
664
665# Anchor reference (see Section 11.20) 
666x_ref =
667  element x:ref {
668    attribute anchor { xsd:ID }?,
669    TEXT
670  }
671
672# source information (see Section 11.21) 
673x_source =
674  element x:source {
675    attribute basename { ATEXT }?,
676    attribute href { URI },
677    empty
678  }
679
680# superscript (see Section 11.22)
681x_sup =
682  element x:sup {
683    TEXT
684  }
685
686# Inline Span
687x_span =
688  element x:span {
689    attribute anchor { xsd:ID }?,
690    (TEXT
691      | x_parse-xml)*
692  }
693
694# Nop (for alignment in source)
695x_x =
696  element x:x {
697    empty
698  }
699
700# Embed RDF statements
701rdf_Description =
702  element rdf:Description {
703    rdf_content
704  }
705 
706rdf_content =
707  ( TEXT | element * { rdf_content })*
Note: See TracBrowser for help on using the repository browser.