1   namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
2   namespace xi = "http://www.w3.org/2001/XInclude"
3
4   # xml2rfc Version 3 grammar
5
6   rfc =
7     element rfc {
8       attribute xml:base { text }?,
9       attribute xml:lang { text }?,
10       attribute number { text }?,
11       [ a:defaultValue = "" ] attribute obsoletes { text }?,
12       [ a:defaultValue = "" ] attribute updates { text }?,
13       attribute category { "std" | "bcp" | "exp" | "info" | "historic" }?,
14       attribute mode { text }?,
15       [ a:defaultValue = "false" ]
16       attribute consensus { "no" | "yes" | "false" | "true" }?,
17       attribute seriesNo { text }?,
18       attribute ipr { text }?,
19       attribute iprExtract { xsd:IDREF }?,
20       [ a:defaultValue = "IETF" ]
21       attribute submissionType {
22         "IETF" | "IAB" | "IRTF" | "independent"
23       }?,
24       attribute docName { text }?,
25       [ a:defaultValue = "false" ]
26       attribute sortRefs { "true" | "false" }?,
27       [ a:defaultValue = "true" ]
28       attribute symRefs { "true" | "false" }?,
29       [ a:defaultValue = "true" ]
30       attribute tocInclude { "true" | "false" }?,
31       [ a:defaultValue = "3" ] attribute tocDepth { text }?,
32       attribute prepTime { text }?,
33       [ a:defaultValue = "true" ]
34       attribute indexInclude { "true" | "false" }?,
35       attribute version { text }?,
36       [ a:defaultValue = "Common,Latin" ] attribute scripts { text }?,
37       attribute expiresDate { text }?,
38       link*,
39       front,
40       middle,
41       back?
42     }
43
44   link =
45     element link {
46       attribute xml:base { text }?,
47       attribute xml:lang { text }?,
48       attribute href { text },
49       attribute rel { text }?
50     }
51
52   xinclude =
53     element xi:include {
54       attribute href { text }
55   }
56
57   front =
58     element front {
59       attribute xml:base { text }?,
60       attribute xml:lang { text }?,
61       title,
62       seriesInfo*,
63       author+,
64       date?,
65       area*,
66       workgroup*,
67       keyword*,
68       abstract?,
69       note*,
70       boilerplate?
71     }
72
73   title =
74     element title {
75       attribute xml:base { text }?,
76       attribute xml:lang { text }?,
77       attribute abbrev { text }?,
78       attribute ascii { text }?,
79       ( text | br )+
80     }
81
82   author =
83     element author {
84       attribute xml:base { text }?,
85       attribute xml:lang { text }?,
86       attribute anchor { xsd:ID }?,
87       attribute initials { text }?,
88       attribute asciiInitials { text }?,
89       attribute surname { text }?,
90       attribute asciiSurname { text }?,
91       attribute fullname { text }?,
92       attribute role { "editor" }?,
93       attribute asciiFullname { text }?,
94       organization?,
95       address?
96     }
97
98   organization =
99     element organization {
100       attribute xml:base { text }?,
101       attribute xml:lang { text }?,
102       attribute abbrev { text }?,
103       attribute ascii { text }?,
104       attribute asciiAbbrev { text }?,
105       [ a:defaultValue = "true" ]
106       attribute showOnFrontPage { "true" | "false" }?,
107       text
108     }
109
110   address =
111     element address {
112       attribute xml:base { text }?,
113       attribute xml:lang { text }?,
114       postal?,
115       phone?,
116       facsimile?,
117       email?,
118       uri?
119     }
120
121   postal =
122     element postal {
123       attribute xml:base { text }?,
124       attribute xml:lang { text }?,
125       ((city | code | country | region | street)*
126        | postalLine+
127        | (city?
128           & cityarea?
129           & code?
130           & country
131           & extaddr*
132           & pobox?
133           & region?
134           & sortingcode?
135           & street*))
136     }
137
138   extaddr =
139     element extaddr {
140       attribute xml:base { text }?,
141       attribute xml:lang { text }?,
142       attribute ascii { text }?,
143       text
144     }
145
146   pobox =
147     element pobox {
148       attribute xml:base { text }?,
149       attribute xml:lang { text }?,
150       attribute ascii { text }?,
151       text
152     }
153
154   street =
155     element street {
156       attribute xml:base { text }?,
157       attribute xml:lang { text }?,
158       attribute ascii { text }?,
159       text
160     }
161
162   cityarea =
163     element cityarea {
164       attribute xml:base { text }?,
165       attribute xml:lang { text }?,
166       attribute ascii { text }?,
167       text
168     }
169
170   city =
171     element city {
172       attribute xml:base { text }?,
173       attribute xml:lang { text }?,
174       attribute ascii { text }?,
175       text
176     }
177
178   region =
179     element region {
180       attribute xml:base { text }?,
181       attribute xml:lang { text }?,
182       attribute ascii { text }?,
183       text
184     }
185
186   code =
187     element code {
188       attribute xml:base { text }?,
189       attribute xml:lang { text }?,
190       attribute ascii { text }?,
191       text
192     }
193
194   sortingcode =
195     element sortingcode {
196       attribute xml:base { text }?,
197       attribute xml:lang { text }?,
198       attribute ascii { text }?,
199       text
200     }
201
202   country =
203     element country {
204       attribute xml:base { text }?,
205       attribute xml:lang { text }?,
206       attribute ascii { text }?,
207       text
208     }
209
210   postalLine =
211     element postalLine {
212       attribute xml:base { text }?,
213       attribute xml:lang { text }?,
214       attribute ascii { text }?,
215       text
216     }
217
218   phone =
219     element phone {
220       attribute xml:base { text }?,
221       attribute xml:lang { text }?,
222       text
223     }
224
225   facsimile =
226     element facsimile {
227       attribute xml:base { text }?,
228       attribute xml:lang { text }?,
229       text
230     }
231
232   email =
233     element email {
234       attribute xml:base { text }?,
235       attribute xml:lang { text }?,
236       attribute ascii { text }?,
237       text
238     }
239
240   uri =
241     element uri {
242       attribute xml:base { text }?,
243       attribute xml:lang { text }?,
244       text
245     }
246
247   date =
248     element date {
249       attribute xml:base { text }?,
250       attribute xml:lang { text }?,
251       attribute day { text }?,
252       attribute month { text }?,
253       attribute year { text }?,
254       text
255     }
256
257   area =
258     element area {
259       attribute xml:base { text }?,
260       attribute xml:lang { text }?,
261       text
262     }
263
264   workgroup =
265     element workgroup {
266       attribute xml:base { text }?,
267       attribute xml:lang { text }?,
268       text
269     }
270
271   keyword =
272     element keyword {
273       attribute xml:base { text }?,
274       attribute xml:lang { text }?,
275       text
276     }
277
278   abstract =
279     element abstract {
280       attribute xml:base { text }?,
281       attribute xml:lang { text }?,
282       attribute anchor { xsd:ID }?,
283       attribute pn { xsd:ID }?,
284       (dl | ol | t | ul)+
285     }
286
287   note =
288     element note {
289       attribute xml:base { text }?,
290       attribute xml:lang { text }?,
291       attribute title { text }?,
292       attribute pn { xsd:ID }?,
293       [ a:defaultValue = "false" ]
294       attribute removeInRFC { "true" | "false" }?,
295       name?,
296       (dl | ol | t | ul)+
297     }
298
299   boilerplate =
300     element boilerplate {
301       attribute xml:base { text }?,
302       attribute xml:lang { text }?,
303       section+
304     }
305
306   middle =
307     element middle {
308       attribute xml:base { text }?,
309       attribute xml:lang { text }?,
310       section+
311     }
312
313   section =
314     element section {
315       attribute xml:base { text }?,
316       attribute xml:lang { text }?,
317       attribute anchor { xsd:ID }?,
318       attribute pn { xsd:ID }?,
319       attribute title { text }?,
320       [ a:defaultValue = "true" ]
321       attribute numbered { "true" | "false" }?,
322       [ a:defaultValue = "default" ]
323       attribute toc { "include" | "exclude" | "default" }?,
324       [ a:defaultValue = "false" ]
325       attribute removeInRFC { "true" | "false" }?,
326       name?,
327       (artset
328        | artwork
329        | aside
330	| author
331        | blockquote
332        | dl
333        | figure
334        | iref
335        | ol
336        | sourcecode
337        | t
338        | table
339        | texttable
340        | ul)*,
341       section*
342     }
343
344   name =
345     element name {
346       attribute xml:base { text }?,
347       attribute xml:lang { text }?,
348       attribute slugifiedName { xsd:ID }?,
349       (text
350        | bcp14
351        | cref
352        | em
353        | eref
354        | iref
355        | relref
356        | strong
357        | sub
358        | sup
359        | tt
360        | xref)*
361     }
362
363   t =
364     element t {
365       attribute xml:base { text }?,
366       attribute xml:lang { text }?,
367       attribute anchor { xsd:ID }?,
368       attribute pn { xsd:ID }?,
369       attribute hangText { text }?,
370       [ a:defaultValue = "false" ]
371       attribute keepWithNext { "false" | "true" }?,
372       [ a:defaultValue = "false" ]
373       attribute keepWithPrevious { "false" | "true" }?,
374       (text
375        | bcp14
376        | br
377        | cref
378        | em
379        | eref
380        | iref
381        | \list
382        | relref
383        | spanx
384        | strong
385        | sub
386        | sup
387        | tt
388        | u
389        | vspace
390        | xref)*
391     }
392
393   aside =
394     element aside {
395       attribute xml:base { text }?,
396       attribute xml:lang { text }?,
397       attribute anchor { xsd:ID }?,
398       attribute pn { xsd:ID }?,
399       (artset | artwork | dl | figure | iref | ol | t | table | ul)*
400     }
401
402   blockquote =
403     element blockquote {
404       attribute xml:base { text }?,
405       attribute xml:lang { text }?,
406       attribute anchor { xsd:ID }?,
407       attribute pn { xsd:ID }?,
408       attribute cite { text }?,
409       attribute quotedFrom { text }?,
410       ((artset | artwork | dl | figure | ol | sourcecode | t | ul)+
411        | (text
412           | bcp14
413           | br
414           | cref
415           | em
416           | eref
417           | iref
418           | relref
419           | strong
420           | sub
421           | sup
422           | tt
423           | u
424           | xref)+)
425     }
426
427   \list =
428     element list {
429       attribute xml:base { text }?,
430       attribute xml:lang { text }?,
431       [ a:defaultValue = "empty" ] attribute style { text }?,
432       attribute hangIndent { text }?,
433       attribute counter { text }?,
434       attribute pn { xsd:ID }?,
435       t+
436     }
437
438   ol =
439     element ol {
440       attribute xml:base { text }?,
441       attribute xml:lang { text }?,
442       attribute anchor { xsd:ID }?,
443       [ a:defaultValue = "1" ] attribute type { text }?,
444       [ a:defaultValue = "1" ] attribute start { text }?,
445       attribute group { text }?,
446       [ a:defaultValue = "normal" ]
447       attribute spacing { "normal" | "compact" }?,
448       attribute indent { text }?,
449       attribute pn { xsd:ID }?,
450       li+
451     }
452
453   ul =
454     element ul {
455       attribute xml:base { text }?,
456       attribute xml:lang { text }?,
457       attribute anchor { xsd:ID }?,
458       [ a:defaultValue = "normal" ]
459       attribute spacing { "normal" | "compact" }?,
460       ([ a:defaultValue = "false" ]
461        attribute empty { "false" | "true"},
462	[ a:defaultValue = "false" ]
463        attribute bare { "false" | "true"}?,
464        attribute indent { text }?,
465        attribute pn { xsd:ID }?)?,
466       li+
467     }
468
469   li =
470     element li {
471       attribute xml:base { text }?,
472       attribute xml:lang { text }?,
473       attribute anchor { xsd:ID }?,
474       attribute derivedCounter { text }?,
475       attribute pn { xsd:ID }?,
476       ((artset | artwork | blockquote | dl | figure | ol | sourcecode | t | ul)+
477        | (text
478           | bcp14
479           | br
480           | cref
481           | em
482           | eref
483           | iref
484           | relref
485           | strong
486           | sub
487           | sup
488           | tt
489           | u
490           | xref)+)
491     }
492
493   dl =
494     element dl {
495       attribute xml:base { text }?,
496       attribute xml:lang { text }?,
497       attribute anchor { xsd:ID }?,
498       [ a:defaultValue = "normal" ]
499       attribute spacing { "normal" | "compact" }?,
500       [ a:defaultValue = "false" ]
501       attribute newline { "false" | "true" }?,
502       attribute indent { text }?,
503       attribute pn { xsd:ID }?,
504       (dt, dd)+
505     }
506
507   dt =
508     element dt {
509       attribute xml:base { text }?,
510       attribute xml:lang { text }?,
511       attribute anchor { xsd:ID }?,
512       attribute pn { xsd:ID }?,
513       (text
514        | bcp14
515        | br
516        | cref
517        | em
518        | eref
519        | iref
520        | relref
521        | strong
522        | sub
523        | sup
524        | tt
525        | xref)*
526     }
527
528   dd =
529     element dd {
530       attribute xml:base { text }?,
531       attribute xml:lang { text }?,
532       attribute anchor { xsd:ID }?,
533       attribute pn { xsd:ID }?,
534       ((artset | artwork | dl | figure | ol | sourcecode | t | ul)+
535        | (text
536           | bcp14
537           | br
538           | cref
539           | em
540           | eref
541           | iref
542           | relref
543           | strong
544           | sub
545           | sup
546           | tt
547           | u
548           | xref)+)
549     }
550
551   xref =
552     element xref {
553       attribute xml:base { text }?,
554       attribute xml:lang { text }?,
555       attribute target { xsd:IDREF },
556       [ a:defaultValue = "false" ]
557       attribute pageno { "true" | "false" }?,
558       [ a:defaultValue = "default" ]
559       attribute format { "default" | "title" | "counter" | "none" }?,
560       attribute derivedContent { text }?,
561       [ a:defaultValue = "of" ]
562       attribute sectionFormat { "of" | "comma" | "parens" | "bare" }?,
563       attribute section { text }?,
564       attribute relative { text }?,
565       attribute derivedLink { text }?,
566       text
567     }
568
569   relref =
570     element relref {
571       attribute xml:base { text }?,
572       attribute xml:lang { text }?,
573       attribute target { xsd:IDREF },
574       [ a:defaultValue = "of" ]
575       attribute displayFormat { "of" | "comma" | "parens" | "bare" }?,
576       attribute derivedContent { text }?,
577       attribute section { text },
578       attribute relative { text }?,
579       attribute derivedLink { text }?,
580       text
581     }
582
583   eref =
584     element eref {
585       attribute xml:base { text }?,
586       attribute xml:lang { text }?,
587       attribute target { text },
588       text
589     }
590
591   iref =
592     element iref {
593       attribute xml:base { text }?,
594       attribute xml:lang { text }?,
595       attribute item { text },
596       [ a:defaultValue = "" ] attribute subitem { text }?,
597       [ a:defaultValue = "false" ]
598       attribute primary { "true" | "false" }?,
599       attribute pn { xsd:ID }?,
600       empty
601     }
602
603   cref =
604     element cref {
605       attribute xml:base { text }?,
606       attribute xml:lang { text }?,
607       attribute anchor { xsd:ID }?,
608       attribute source { text }?,
609       [ a:defaultValue = "true" ]
610       attribute display { "true" | "false" }?,
611       (text | em | eref | relref | strong | sub | sup | tt | xref)*
612     }
613
614   tt =
615     element tt {
616       attribute xml:base { text }?,
617       attribute xml:lang { text }?,
618       (text
619        | bcp14
620        | br
621        | cref
622        | em
623        | eref
624        | iref
625        | relref
626        | strong
627        | sub
628        | sup
629        | xref)*
630     }
631
632   strong =
633     element strong {
634       attribute xml:base { text }?,
635       attribute xml:lang { text }?,
636       (text
637        | bcp14
638        | br
639        | cref
640        | em
641        | eref
642        | iref
643        | relref
644        | sub
645        | sup
646        | tt
647        | xref)*
648     }
649
650   em =
651     element em {
652       attribute xml:base { text }?,
653       attribute xml:lang { text }?,
654       (text
655        | bcp14
656        | br
657        | cref
658        | eref
659        | iref
660        | relref
661        | strong
662        | sub
663        | sup
664        | tt
665        | xref)*
666     }
667
668   sub =
669     element sub {
670       attribute xml:base { text }?,
671       attribute xml:lang { text }?,
672       (text
673        | bcp14
674        | br
675        | cref
676        | em
677        | eref
678        | iref
679        | relref
680        | strong
681        | tt
682        | xref)*
683     }
684
685   sup =
686     element sup {
687       attribute xml:base { text }?,
688       attribute xml:lang { text }?,
689       (text
690        | bcp14
691        | br
692        | cref
693        | em
694        | eref
695        | iref
696        | relref
697        | strong
698        | tt
699        | xref)*
700     }
701
702   spanx =
703     element spanx {
704       attribute xml:base { text }?,
705       attribute xml:lang { text }?,
706       [ a:defaultValue = "preserve" ]
707       attribute xml:space { "default" | "preserve" }?,
708       [ a:defaultValue = "emph" ] attribute style { text }?,
709       text
710     }
711
712   vspace =
713     element vspace {
714       attribute xml:base { text }?,
715       attribute xml:lang { text }?,
716       [ a:defaultValue = "0" ] attribute blankLines { text }?,
717       empty
718     }
719
720   figure =
721     element figure {
722       attribute xml:base { text }?,
723       attribute xml:lang { text }?,
724       attribute anchor { xsd:ID }?,
725       attribute pn { xsd:ID }?,
726       [ a:defaultValue = "" ] attribute title { text }?,
727       [ a:defaultValue = "false" ]
728       attribute suppress-title { "true" | "false" }?,
729       attribute src { text }?,
730       attribute originalSrc { text }?,
731       [ a:defaultValue = "left" ]
732       attribute align { "left" | "center" | "right" }?,
733       [ a:defaultValue = "" ] attribute alt { text }?,
734       [ a:defaultValue = "" ] attribute width { text }?,
735       [ a:defaultValue = "" ] attribute height { text }?,
736       name?,
737       iref*,
738       preamble?,
739       (artset | artwork | sourcecode)+,
740       postamble?
741     }
742
743   table =
744     element table {
745       attribute xml:base { text }?,
746       attribute xml:lang { text }?,
747       [ a:defaultValue = "center" ]
748       attribute align { "left" | "center" | "right" }?,
749       attribute anchor { xsd:ID }?,
750       attribute pn { xsd:ID }?,
751       name?,
752       iref*,
753       thead?,
754       tbody+,
755       tfoot?
756     }
757
758   preamble =
759     element preamble {
760       attribute xml:base { text }?,
761       attribute xml:lang { text }?,
762       (text
763        | bcp14
764        | br
765        | cref
766        | em
767        | eref
768        | iref
769        | relref
770        | spanx
771        | strong
772        | sub
773        | sup
774        | tt
775        | u
776        | xref)*
777     }
778
779   artset =
780     element artset {
781       attribute xml:base { text }?,
782       attribute xml:lang { text }?,
783       attribute anchor { xsd:ID }?,
784       attribute pn { xsd:ID }?,
785       artwork+
786     }
787
788
789   artwork =
790     element artwork {
791       attribute xml:base { text }?,
792       attribute xml:lang { text }?,
793       attribute anchor { xsd:ID }?,
794       attribute pn { xsd:ID }?,
795       attribute xml:space { text }?,
796       [ a:defaultValue = "" ] attribute name { text }?,
797       [ a:defaultValue = "" ] attribute type { text }?,
798       attribute src { text }?,
799       [ a:defaultValue = "left" ]
800       attribute align { "left" | "center" | "right" }?,
801       [ a:defaultValue = "" ] attribute alt { text }?,
802       [ a:defaultValue = "" ] attribute width { text }?,
803       [ a:defaultValue = "" ] attribute height { text }?,
804       attribute originalSrc { text }?,
805       (text* | svg | xinclude )
806     }
807   include "SVG-1.2-RFC.rnc"
808
809   sourcecode =
810     element sourcecode {
811       attribute xml:base { text }?,
812       attribute xml:lang { text }?,
813       attribute anchor { xsd:ID }?,
814       attribute pn { xsd:ID }?,
815       [ a:defaultValue = "" ] attribute name { text }?,
816       [ a:defaultValue = "" ] attribute type { text }?,
817       [ a:defaultValue = "false" ]
818       attribute markers { "true" | "false" }?,
819       attribute src { text }?,
820       attribute originalSrc { text }?,
821       text
822     }
823
824   thead =
825     element thead {
826       attribute xml:base { text }?,
827       attribute xml:lang { text }?,
828       attribute anchor { xsd:ID }?,
829       tr+
830     }
831
832   tbody =
833     element tbody {
834       attribute xml:base { text }?,
835       attribute xml:lang { text }?,
836       attribute anchor { xsd:ID }?,
837       tr+
838     }
839
840   tfoot =
841     element tfoot {
842       attribute xml:base { text }?,
843       attribute xml:lang { text }?,
844       attribute anchor { xsd:ID }?,
845       tr+
846     }
847
848   tr =
849     element tr {
850       attribute xml:base { text }?,
851       attribute xml:lang { text }?,
852       attribute anchor { xsd:ID }?,
853       (td | th)+
854     }
855
856   td =
857     element td {
858       attribute xml:base { text }?,
859       attribute xml:lang { text }?,
860       attribute anchor { xsd:ID }?,
861       [ a:defaultValue = "1" ] attribute colspan { text }?,
862       [ a:defaultValue = "1" ] attribute rowspan { text }?,
863       [ a:defaultValue = "left" ]
864       attribute align { "left" | "center" | "right" }?,
865       ((artset | artwork | dl | figure | ol | sourcecode | t | ul)+
866        | (text
867           | bcp14
868           | br
869           | cref
870           | em
871           | eref
872           | iref
873           | relref
874           | strong
875           | sub
876           | sup
877           | tt
878           | u
879           | xref)*)
880     }
881
882   th =
883     element th {
884       attribute xml:base { text }?,
885       attribute xml:lang { text }?,
886       attribute anchor { xsd:ID }?,
887       [ a:defaultValue = "1" ] attribute colspan { text }?,
888       [ a:defaultValue = "1" ] attribute rowspan { text }?,
889       [ a:defaultValue = "left" ]
890       attribute align { "left" | "center" | "right" }?,
891       ((artset | artwork | dl | figure | ol | sourcecode | t | ul)+
892        | (text
893           | bcp14
894           | br
895           | cref
896           | em
897           | eref
898           | iref
899           | relref
900           | strong
901           | sub
902           | sup
903           | tt
904           | u
905           | xref)*)
906     }
907
908   postamble =
909     element postamble {
910       attribute xml:base { text }?,
911       attribute xml:lang { text }?,
912       (text | cref | eref | iref | spanx | xref)*
913     }
914
915   texttable =
916     element texttable {
917       attribute xml:base { text }?,
918       attribute xml:lang { text }?,
919       attribute anchor { xsd:ID }?,
920       [ a:defaultValue = "" ] attribute title { text }?,
921       [ a:defaultValue = "false" ]
922       attribute suppress-title { "true" | "false" }?,
923       [ a:defaultValue = "center" ]
924       attribute align { "left" | "center" | "right" }?,
925       [ a:defaultValue = "full" ]
926       attribute style { "all" | "none" | "headers" | "full" }?,
927       name?,
928       preamble?,
929       ttcol+,
930       c*,
931       postamble?
932     }
933
934   ttcol =
935     element ttcol {
936       attribute xml:base { text }?,
937       attribute xml:lang { text }?,
938       attribute width { text }?,
939       [ a:defaultValue = "left" ]
940       attribute align { "left" | "center" | "right" }?,
941       (cref | eref | iref | xref | text)*
942     }
943
944   c =
945     element c {
946       attribute xml:base { text }?,
947       attribute xml:lang { text }?,
948       (text | cref | eref | iref | spanx | xref)*
949     }
950
951   bcp14 =
952     element bcp14 {
953       attribute xml:base { text }?,
954       attribute xml:lang { text }?,
955       text
956     }
957
958   br =
959     element br {
960       attribute xml:base { text }?,
961       attribute xml:lang { text }?,
962       empty
963     }
964
965   back =
966     element back {
967       attribute xml:base { text }?,
968       attribute xml:lang { text }?,
969       displayreference*,
970       references*,
971       section*
972     }
973
974   displayreference =
975     element displayreference {
976       attribute xml:base { text }?,
977       attribute xml:lang { text }?,
978       attribute target { xsd:IDREF },
979       attribute to { text }
980     }
981
982   references =
983     element references {
984       attribute xml:base { text }?,
985       attribute xml:lang { text }?,
986       attribute pn { xsd:ID }?,
987       attribute anchor { xsd:ID }?,
988       attribute title { text }?,
989       name?,
990       (references+ | (reference | referencegroup | xinclude )*)
991     }
992
993   reference =
994     element reference {
995       attribute xml:base { text }?,
996       attribute xml:lang { text }?,
997       attribute anchor { xsd:ID },
998       attribute derivedAnchor { text }?,
999       attribute target { text }?,
1000       [ a:defaultValue = "true" ]
1001       attribute quoteTitle { "true" | "false" }?,
1002       attribute quote-title { "true" | "false" }?,
1003       stream?,
1004       front,
1005       (annotation | format | refcontent | seriesInfo)*
1006     }
1007
1008   stream =
1009     element stream {
1010       ( "IETF" | "IAB" | "IRTF" | "independent" )?
1011   }
1012
1013   referencegroup =
1014     element referencegroup {
1015       attribute xml:base { text }?,
1016       attribute xml:lang { text }?,
1017       attribute anchor { xsd:ID },
1018       attribute derivedAnchor { text }?,
1019       attribute target { text }?,
1020       reference+
1021     }
1022
1023   seriesInfo =
1024     element seriesInfo {
1025       attribute xml:base { text }?,
1026       attribute xml:lang { text }?,
1027       attribute name { text },
1028       attribute value { text },
1029       attribute asciiName { text }?,
1030       attribute asciiValue { text }?,
1031       attribute status { text }?,
1032       attribute stream { "IETF" | "IAB" | "IRTF" | "independent" }?,
1033       empty
1034     }
1035
1036   format =
1037     element format {
1038       attribute xml:base { text }?,
1039       attribute xml:lang { text }?,
1040       attribute target { text }?,
1041       attribute type { text },
1042       attribute octets { text }?,
1043       empty
1044     }
1045
1046   annotation =
1047     element annotation {
1048       attribute xml:base { text }?,
1049       attribute xml:lang { text }?,
1050       (text
1051        | bcp14
1052        | br
1053        | cref
1054        | em
1055        | eref
1056        | iref
1057        | relref
1058        | spanx
1059        | strong
1060        | sub
1061        | sup
1062        | tt
1063        | u
1064        | xref)*
1065     }
1066
1067   refcontent =
1068     element refcontent {
1069       attribute xml:base { text }?,
1070       attribute xml:lang { text }?,
1071       (text | bcp14 | em | strong | sub | sup | tt)*
1072     }
1073   start |= rfc
1074
1075   u =
1076     element u {
1077       attribute anchor { xsd:ID }?,
1078       attribute ascii { text }?,
1079       [ a:defaultValue = "lit-name-num" ]
1080       attribute format { text }?,
1081       attribute pn { xsd:ID }?,
1082       text
1083     }
1084