source: rfc2629xslt/rfc2629-ext.rnc @ 2734

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

update XSLTs, switch to Saxon 9.6 HE in Makefile, regen specs

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