Merge pull request #205 from m3rlinez/master
[mono.git] / mcs / tools / mdoc / Resources / monodoc-ecma.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Author: John Luke <john.luke@gmail.com>
4 This is a (not very strict) schema for the monodoc
5 ecma-provider format.
6 TODO:
7 make base type for summary, remarks, returns, etc
8 alias duplicate attributes
9 make stricter in order and occurance
10 add masterdoc support?
11 -->
12 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
13
14   <!-- define attributes -->
15   <xs:attribute name="argnames" type="xs:string" />
16   <xs:attribute name="cref" type="xs:string" />
17   <xs:attribute name="Deprecated" type="xs:boolean" />
18   <xs:attribute name="FullName" type="xs:string" />
19   <xs:attribute name="FullNameSP" type="xs:string" />
20   <xs:attribute name="inherited" type="xs:string" />
21   <xs:attribute name="language" type="xs:string" />
22   <xs:attribute name="Language" type="xs:string" />
23   <xs:attribute name="lang" type="xs:string" />
24   <xs:attribute name="langword" type="xs:string" />
25   <xs:attribute name="Library" type="xs:string" />
26   <xs:attribute name="location" type="xs:string" />
27   <xs:attribute name="Maintainer" type="xs:string" />
28   <xs:attribute name="MemberName" type="xs:string" />
29   <xs:attribute name="name" type="xs:string" />
30   <xs:attribute name="Name" type="xs:string" />
31   <xs:attribute name="namespace" type="xs:string" />
32   <xs:attribute name="propertytype" type="xs:string" />
33   <xs:attribute name="qualify" type="xs:boolean" />
34   <xs:attribute name="RefType" type="xs:string" />
35   <xs:attribute name="returntype" type="xs:string" />
36   <xs:attribute name="source" type="xs:string" />
37   <xs:attribute name="src" type="xs:string" />
38   <xs:attribute name="subset" type="xs:string" />
39   <xs:attribute name="Value" type="xs:string" />
40   <xs:attribute name="version" type="xs:string" />
41   <xs:attribute name="type" type="xs:string" />
42   <xs:attribute name="Type" type="xs:string" />
43   <xs:attribute name="TypeParamName" type="xs:string" />
44
45   <!-- define simple elements -->
46   <xs:element name="AssemblyName" type="xs:string" />
47   <xs:element name="AssemblyPublicKey" type="xs:string" />
48   <xs:element name="AssemblyVersion" type="xs:string" />
49   <xs:element name="AssemblyCulture" type="xs:string" />
50   <xs:element name="AttributeName" type="xs:string" />
51   <xs:element name="BaseTypeName" type="xs:string" />
52   <xs:element name="Excluded" type="xs:string" />
53   <xs:element name="ExcludedBaseTypeName" type="xs:string" />
54   <xs:element name="ExcludedLibrary" type="xs:string" />
55   <xs:element name="ExcludedLibraryName" type="xs:string" />
56   <xs:element name="ExcludedTypeName" type="xs:string" />
57   <xs:element name="i" type="xs:string" />
58   <xs:element name="InterfaceName" type="xs:string" />
59   <xs:element name="li" type="xs:string" />
60   <xs:element name="MemberOfLibrary" type="xs:string" />
61   <xs:element name="MemberType" type="xs:string" />
62   <xs:element name="MemberValue" type="xs:string" />
63   <xs:element name="onequarter" />
64   <xs:element name="PRE" />
65   <xs:element name="permille" />
66   <xs:element name="pi" />
67   <xs:element name="pre" />
68   <xs:element name="ReturnType" type="xs:string" />
69   <xs:element name="TypeExcluded" type="xs:string" />
70
71   <!-- define complex elements -->
72   <xs:element name="altcompliant">
73     <xs:complexType>
74       <xs:attribute ref="cref" />
75     </xs:complexType>
76   </xs:element>
77
78   <xs:element name="altmember">
79     <xs:complexType>
80       <xs:simpleContent>
81         <xs:extension base="xs:string">
82           <xs:attribute ref="cref" />
83         </xs:extension>
84       </xs:simpleContent>
85     </xs:complexType>
86   </xs:element>
87
88   <xs:element name="AssemblyInfo">
89     <xs:complexType>
90       <xs:sequence>
91         <xs:element ref="AssemblyName" minOccurs="0" />
92         <xs:element ref="AssemblyPublicKey" minOccurs="0" />
93         <xs:element ref="AssemblyVersion" minOccurs="0" maxOccurs="unbounded" />
94         <xs:element ref="AssemblyCulture" minOccurs="0" />
95         <xs:element ref="Attributes" minOccurs="0" />
96       </xs:sequence>
97     </xs:complexType>
98   </xs:element>
99
100   <xs:element name="Attribute">
101     <xs:complexType>
102       <xs:sequence>
103         <xs:element ref="AttributeName" />
104         <xs:element ref="Excluded" minOccurs="0" />
105         <xs:element ref="ExcludedTypeName" minOccurs="0" />
106         <xs:element ref="ExcludedLibraryName" minOccurs="0" />
107       </xs:sequence>
108     </xs:complexType>
109   </xs:element>
110
111   <xs:element name="Attributes">
112     <xs:complexType>
113       <xs:sequence>
114         <xs:element ref="Attribute" minOccurs="0" maxOccurs="unbounded" />
115       </xs:sequence>
116     </xs:complexType>
117   </xs:element>
118
119   <xs:element name="Base">
120     <xs:complexType>
121       <xs:sequence>
122         <xs:element ref="BaseTypeName" minOccurs="0" />
123         <xs:element ref="BaseTypeArguments" minOccurs="0" />
124         <xs:element ref="ExcludedBaseTypeName" minOccurs="0" />
125         <xs:element ref="ExcludedLibraryName" minOccurs="0" />
126       </xs:sequence>
127     </xs:complexType>
128   </xs:element>
129
130   <xs:element name="BaseTypeArgument">
131     <xs:complexType mixed="true">
132       <xs:attribute ref="TypeParamName" />
133     </xs:complexType>
134   </xs:element>
135
136   <xs:element name="BaseTypeArguments">
137     <xs:complexType>
138       <xs:sequence>
139         <xs:element ref="BaseTypeArgument" minOccurs="0" />
140       </xs:sequence>
141     </xs:complexType>
142   </xs:element>
143
144   <xs:element name="block">
145     <xs:complexType mixed="true">
146       <xs:choice minOccurs="0" maxOccurs="unbounded">
147         <xs:element ref="block" />
148         <xs:element ref="c" />
149         <xs:element ref="code" />
150         <xs:element ref="format" />
151         <xs:element ref="list" />
152         <xs:element ref="para" />
153         <xs:element ref="paramref" />
154         <xs:element ref="see" />
155         <xs:element ref="subscript" />
156         <xs:element ref="sup" />
157         <xs:element ref="pi" />
158         <xs:element ref="typeparamref" />
159       </xs:choice>
160       <xs:attribute ref="subset" />
161       <xs:attribute ref="type" />
162     </xs:complexType>
163   </xs:element>
164
165   <xs:element name="c">
166     <xs:complexType mixed="true">
167       <xs:choice minOccurs="0" maxOccurs="unbounded">
168         <xs:element ref="code" />
169         <xs:element ref="para" />
170         <xs:element ref="paramref" />
171         <xs:element ref="see" />
172         <xs:element ref="typeparamref" />
173       </xs:choice>
174     </xs:complexType>
175   </xs:element>
176
177   <xs:element name="class">
178     <xs:complexType>
179       <xs:choice minOccurs="0" maxOccurs="unbounded">
180         <xs:element ref="constructor" />
181         <xs:element ref="property" />
182         <xs:element ref="method" />
183         <xs:element ref="field" />
184         <xs:element ref="operator" />
185         <xs:element ref="event" />
186         <xs:element ref="enum" />
187         <xs:element ref="class" />
188         <xs:element ref="struct" />
189         <xs:element ref="interface" />
190         <xs:element ref="delegate" />
191       </xs:choice>
192       <xs:attribute ref="name" />
193       <xs:attribute ref="namespace" />
194     </xs:complexType>
195   </xs:element>
196
197   <xs:element name="code">
198     <xs:complexType>
199       <xs:simpleContent>
200         <xs:extension base="xs:string">
201           <xs:attribute ref="lang" />
202           <xs:attribute ref="language" />
203           <xs:attribute ref="source" />
204           <xs:attribute ref="src" />
205         </xs:extension>
206       </xs:simpleContent>
207     </xs:complexType>
208   </xs:element>
209
210   <xs:element name="constructor">
211     <xs:complexType>
212           <xs:attribute ref="name" />
213           <xs:attribute ref="argnames" />
214     </xs:complexType>
215   </xs:element>
216
217   <xs:element name="delegate">
218     <xs:complexType>
219       <xs:choice maxOccurs="unbounded">
220         <xs:element ref="constructor" />
221         <xs:element ref="method" />
222         <xs:element ref="property" />
223         <xs:element ref="operator" />
224       </xs:choice>
225       <xs:attribute ref="name" />
226       <xs:attribute ref="namespace" />
227     </xs:complexType>
228   </xs:element>
229
230   <xs:element name="description">
231     <xs:complexType mixed="true">
232       <xs:choice minOccurs="0" maxOccurs="unbounded">
233         <xs:element ref="c" />
234         <xs:element ref="block" />
235         <xs:element ref="geq" />
236         <xs:element ref="leq" />
237         <xs:element ref="paramref" />
238         <xs:element ref="para" />
239         <xs:element ref="permille" />
240         <xs:element ref="plusminus" />
241         <xs:element ref="SPAN" />
242         <xs:element ref="see" />
243         <xs:element ref="sub" />
244         <xs:element ref="typeparamref" />
245       </xs:choice>
246     </xs:complexType>
247   </xs:element>
248
249   <xs:element name="Docs">
250     <xs:complexType>
251       <xs:choice minOccurs="0" maxOccurs="unbounded">
252         <xs:element ref="summary" />
253         <xs:element ref="param" />
254         <xs:element ref="exception" />
255         <xs:element ref="returns" />
256         <xs:element ref="remarks" />
257         <xs:element ref="example" />
258         <xs:element ref="value" />
259         <xs:element ref="permission" />
260         <xs:element ref="PermissionSet" />
261         <xs:element ref="altmember" />
262         <xs:element ref="altcompliant" />
263         <xs:element ref="since" />
264         <xs:element ref="threadsafe" />
265         <xs:element ref="typeparam" />
266         <xs:element ref="filterpriority" />
267         <xs:element ref="related" />
268       </xs:choice>
269     </xs:complexType>
270   </xs:element>
271
272   <xs:simpleType name="relatedType">
273     <restriction base="string">
274       <!-- External code/application samples -->
275       <enumeration value="sample"/>
276       <!-- e.g. ECMA, OPC, OData, ... specs -->
277       <enumeration value="specification"/>
278       <!-- e.g. Apple documentation -->
279       <enumeration value="externalDocumentation" />
280       <!-- e.g. a more in-depth article at docs.xamarin.com -->
281       <enumeration value="article" />
282     </restriction>
283   </xs:simpleType>
284
285   <xs:element name="related">
286     <xs:complexType>
287       <xs:attribute name="type" type="relatedType" />
288       <xs:attribute name="href" type="anyURI" />
289     </xs:complexType>
290   </xs:element>
291
292   <xs:element name="enum">
293     <xs:complexType>
294       <xs:choice minOccurs="0" maxOccurs="unbounded">
295         <xs:element ref="field" />
296         <xs:element ref="method" />
297       </xs:choice>
298       <xs:attribute ref="name" />
299       <xs:attribute ref="namespace" />
300     </xs:complexType>
301   </xs:element>
302
303   <xs:element name="event">
304     <xs:complexType>
305           <xs:attribute ref="name" />
306           <xs:attribute ref="inherited" />
307     </xs:complexType>
308   </xs:element>
309
310   <xs:element name="example">
311     <xs:complexType mixed="true">
312       <xs:choice maxOccurs="unbounded">
313         <xs:element ref="format" />
314         <xs:element ref="para" />
315         <xs:element ref="code" />
316         <xs:element ref="codelink" />
317         <xs:element ref="c" />
318         <xs:element ref="list" />
319         <xs:element ref="see" />
320       </xs:choice>
321     </xs:complexType>
322   </xs:element>
323
324   <xs:element name="exception">
325     <xs:complexType mixed="true">
326       <xs:choice minOccurs="0" maxOccurs="unbounded">
327         <xs:element ref="block" />
328         <xs:element ref="format" />
329         <xs:element ref="para" />
330         <xs:element ref="paramref" />
331         <xs:element ref="see" />
332         <xs:element ref="SPAN" />
333         <xs:element ref="typeparamref" />
334       </xs:choice>
335       <xs:attribute ref="cref" />
336     </xs:complexType>
337   </xs:element>
338
339   <xs:element name="field">
340     <xs:complexType>
341       <xs:attribute ref="name" />
342       <xs:attribute ref="inherited" />
343     </xs:complexType>
344   </xs:element>
345
346   <xs:element name="format">
347     <xs:complexType>
348       <xs:sequence>
349         <xs:any minOccurs="0" processContents="lax" />
350       </xs:sequence>
351       <xs:attribute ref="type" />
352     </xs:complexType>
353   </xs:element>
354
355   <xs:element name="interface">
356     <xs:complexType>
357       <xs:choice minOccurs="0" maxOccurs="unbounded">
358         <xs:element ref="constructor" />
359         <xs:element ref="property" />
360         <xs:element ref="method" />
361         <xs:element ref="field" />
362         <xs:element ref="event" />
363       </xs:choice>
364       <xs:attribute ref="name" />
365       <xs:attribute ref="namespace" />
366     </xs:complexType>
367   </xs:element>
368
369   <xs:element name="Interface">
370     <xs:complexType>
371       <xs:sequence>
372         <xs:element ref="InterfaceName" />
373         <xs:element ref="Excluded" minOccurs="0" />
374       </xs:sequence>
375     </xs:complexType>
376   </xs:element>
377
378   <xs:element name="Interfaces">
379     <xs:complexType>
380       <xs:sequence>
381         <xs:element ref="Interface" minOccurs="0" maxOccurs="unbounded" />
382       </xs:sequence>
383     </xs:complexType>
384   </xs:element>
385
386   <xs:element name="item">
387     <xs:complexType>
388         <xs:sequence>
389           <xs:element ref="term" minOccurs="1" maxOccurs="1" />
390           <xs:element ref="description" minOccurs="0" maxOccurs="unbounded" />
391         </xs:sequence>
392     </xs:complexType>
393   </xs:element>
394
395   <xs:element name="link">
396     <xs:complexType>
397       <xs:simpleContent>
398         <xs:extension base="xs:string">
399           <xs:attribute ref="location" />
400         </xs:extension>
401       </xs:simpleContent>
402     </xs:complexType>
403   </xs:element>
404
405   <xs:element name="list">
406     <xs:complexType>
407         <xs:sequence>
408           <xs:element ref="listheader" minOccurs="0" maxOccurs="1" />
409           <xs:element ref="item" minOccurs="0" maxOccurs="unbounded" />
410         </xs:sequence>
411         <xs:attribute name="type" type="xs:string" />
412     </xs:complexType>
413   </xs:element>
414
415   <xs:element name="listheader">
416     <xs:complexType>
417       <xs:sequence>
418           <xs:element ref="term" />
419           <xs:element ref="description" maxOccurs="unbounded" />
420       </xs:sequence>
421     </xs:complexType>
422   </xs:element>
423
424   <xs:element name="masterdoc">
425     <xs:complexType>
426        <xs:choice minOccurs="0" maxOccurs="unbounded">
427          <xs:element ref="class" />
428          <xs:element ref="delegate" />
429          <xs:element ref="interface" />
430          <xs:element ref="struct" />
431          <xs:element ref="enum" />
432        </xs:choice>
433        <xs:attribute name="assembly" type="xs:string" />
434     </xs:complexType>
435   </xs:element>
436
437   <xs:element name="MemberSignature">
438     <xs:complexType>
439       <xs:attribute ref="Language" />
440       <xs:attribute ref="Value" />
441     </xs:complexType>
442   </xs:element>
443
444   <xs:element name="Link">
445     <xs:complexType>
446       <xs:attribute ref="Type" use="required" />
447       <xs:attribute name="Member" type="xs:string" use="required" />
448     </xs:complexType>
449   </xs:element>
450
451   <xs:element name="Member">
452     <xs:complexType>
453       <xs:sequence>
454         <xs:element ref="MemberSignature" minOccurs="1" maxOccurs="unbounded" />
455         <xs:element ref="MemberType" maxOccurs="1" />
456         <xs:element ref="AssemblyInfo" minOccurs="0" maxOccurs="1" />
457         <xs:element ref="Attributes" minOccurs="0" maxOccurs="1" />
458         <xs:element ref="ReturnValue" minOccurs="0" maxOccurs="1" />
459         <xs:element ref="TypeParameters" minOccurs="0" maxOccurs="1" />
460         <xs:element ref="Parameters" minOccurs="0" maxOccurs="1" />
461         <xs:element ref="MemberValue" minOccurs="0" maxOccurs="1" />
462         <xs:element ref="Docs" maxOccurs="1" />
463         <xs:element ref="Excluded" minOccurs="0" maxOccurs="1" />
464         <xs:element ref="ExcludedLibrary" minOccurs="0" maxOccurs="unbounded" />
465         <xs:element ref="Link" minOccurs="0" maxOccurs="1" />
466       </xs:sequence>
467       <xs:attribute ref="MemberName" />
468       <xs:attribute ref="Deprecated" />
469     </xs:complexType>
470   </xs:element>
471
472   <xs:element name="Members">
473     <xs:complexType>
474       <xs:sequence>
475         <xs:element ref="Member" minOccurs="0" maxOccurs="unbounded" />
476       </xs:sequence>
477     </xs:complexType>
478   </xs:element>
479
480   <xs:element name="method">
481     <xs:complexType>
482       <xs:attribute ref="name" />
483       <xs:attribute ref="argnames" />
484       <xs:attribute ref="inherited" />
485       <xs:attribute ref="returntype" />
486     </xs:complexType>
487   </xs:element>
488
489   <xs:element name="Namespace">
490     <xs:complexType>
491       <xs:sequence>
492         <xs:element ref="Docs" maxOccurs="1" />
493       </xs:sequence>
494       <xs:attribute ref="Name" />
495       <xs:attribute ref="FullName" />
496       <xs:attribute ref="FullNameSP" />
497       <xs:attribute ref="Maintainer" />
498     </xs:complexType>
499   </xs:element>
500
501   <xs:element name="operator">
502     <xs:complexType>
503       <xs:attribute ref="name" />
504       <xs:attribute ref="argnames" />
505     </xs:complexType>
506   </xs:element>
507
508   <xs:element name="para">
509     <xs:complexType mixed="true">
510       <xs:choice minOccurs="0" maxOccurs="unbounded">
511         <xs:element ref="block" />
512         <xs:element ref="i" />
513         <xs:element ref="format" />
514         <xs:element ref="see" />
515         <xs:element ref="geq" />
516         <xs:element ref="leq" />
517         <xs:element ref="list" />
518         <xs:element ref="link" />
519         <xs:element ref="ul" />
520         <xs:element ref="paramref" />
521         <xs:element ref="c" />
522         <xs:element ref="onequarter" />
523         <xs:element ref="sub" />
524         <xs:element ref="superscript" />
525         <xs:element ref="sup" />
526         <xs:element ref="permille" />
527         <xs:element ref="plusminus" />
528         <xs:element ref="SPAN" />
529         <xs:element ref="pi" />
530         <xs:element ref="theta" />
531         <xs:element ref="typeparamref" />
532         <xs:element ref="whitespace" />
533         <xs:element ref="img" />
534       </xs:choice>
535     </xs:complexType>
536   </xs:element>
537
538   <xs:element name="img">
539         <xs:complexType>
540           <xs:attribute name="href" type="xs:string" use="required" />
541           <xs:attribute name="class" type="xs:string" use="optional" />
542         </xs:complexType>
543   </xs:element>
544
545   <xs:element name="param">
546     <xs:complexType mixed="true">
547       <xs:choice minOccurs="0" maxOccurs="unbounded">
548         <xs:element ref="c" />
549         <xs:element ref="format" />
550         <xs:element ref="see" />
551         <xs:element ref="block" />
552         <xs:element ref="geq" />
553         <xs:element ref="leq" />
554         <xs:element ref="paramref" />
555         <xs:element ref="plusminus" />
556         <xs:element ref="para" />
557         <xs:element ref="SPAN" />
558         <xs:element ref="typeparamref" />
559         <xs:element ref="whitespace" />
560       </xs:choice>
561       <xs:attribute ref="name" use="required" />
562     </xs:complexType>
563   </xs:element>
564
565   <xs:element name="paramref">
566     <xs:complexType>
567       <xs:attribute ref="name" use="required" />
568     </xs:complexType>
569   </xs:element>
570
571   <xs:element name="Parameter">
572     <xs:complexType>
573       <xs:sequence>
574         <xs:element ref="Attributes" minOccurs="0" maxOccurs="1" />
575       </xs:sequence>
576       <xs:attribute ref="Name" />
577       <xs:attribute ref="Type" />
578       <xs:attribute ref="RefType" />
579     </xs:complexType>
580   </xs:element>
581
582   <xs:element name="Parameters">
583     <xs:complexType>
584       <xs:sequence>
585         <xs:element ref="Parameter" minOccurs="0" maxOccurs="unbounded" />
586       </xs:sequence>
587     </xs:complexType>
588   </xs:element>
589
590   <xs:element name="permission">
591     <xs:complexType mixed="true">
592       <xs:choice minOccurs="0" maxOccurs="unbounded">
593         <xs:element ref="block" />
594         <xs:element ref="format" />
595         <xs:element ref="para" />
596         <xs:element ref="paramref" />
597         <xs:element ref="see" />
598         <xs:element ref="typeparamref" />
599       </xs:choice>
600       <xs:attribute ref="cref" />
601     </xs:complexType>
602   </xs:element>
603
604   <xs:element name="property">
605     <xs:complexType>
606       <xs:attribute ref="name" />
607       <xs:attribute ref="inherited" />
608       <xs:attribute ref="propertytype" />
609     </xs:complexType>
610   </xs:element>
611
612   <xs:element name="remarks">
613     <xs:complexType mixed="true">
614       <xs:choice minOccurs="0" maxOccurs="unbounded">
615         <xs:element ref="block" />
616         <xs:element ref="c" />
617         <xs:element ref="code" />
618         <xs:element ref="format" />
619         <xs:element ref="para" />
620         <xs:element ref="paramref" />
621         <xs:element ref="PRE" />
622         <xs:element ref="pre" />
623         <xs:element ref="see" />
624         <xs:element ref="ul" />
625         <xs:element ref="example" />
626         <xs:element ref="list" />
627         <xs:element ref="SPAN" />
628         <xs:element ref="typeparamref" />
629       </xs:choice>
630     </xs:complexType>
631   </xs:element>
632
633   <xs:element name="returns">
634     <xs:complexType mixed="true">
635       <xs:choice minOccurs="0" maxOccurs="unbounded">
636         <xs:element ref="format" />
637         <xs:element ref="geq" />
638         <xs:element ref="leq" />
639         <xs:element ref="list" />
640         <xs:element ref="para" />
641         <xs:element ref="paramref" />
642         <xs:element ref="pi" />
643         <xs:element ref="see" />
644         <xs:element ref="theta" />
645         <xs:element ref="typeparamref" />
646         <xs:element ref="ul" />
647         <xs:element ref="whitespace" />
648       </xs:choice>
649     </xs:complexType>
650   </xs:element>
651
652   <xs:element name="ReturnValue">
653     <xs:complexType>
654       <xs:sequence>
655         <xs:element ref="ReturnType" minOccurs="0" maxOccurs="1" />
656         <xs:element ref="Attributes" minOccurs="0" />
657       </xs:sequence>
658     </xs:complexType>
659   </xs:element>
660
661   <xs:element name="see">
662     <xs:complexType>
663       <xs:attribute ref="cref" />
664       <xs:attribute ref="langword"  />
665       <xs:attribute ref="qualify"  />
666     </xs:complexType>
667   </xs:element>
668
669   <xs:element name="since">
670     <xs:complexType>
671       <xs:attribute ref="version" />
672     </xs:complexType>
673   </xs:element>
674
675   <xs:element name="SPAN">
676     <xs:complexType mixed="true">
677       <xs:choice minOccurs="0" maxOccurs="unbounded">
678         <xs:element ref="block" />
679         <xs:element ref="format" />
680         <xs:element ref="para" />
681         <xs:element ref="paramref" />
682         <xs:element ref="see" />
683         <xs:element ref="SPAN" />
684         <xs:element ref="typeparamref" />
685       </xs:choice>
686       <xs:attribute ref="version" />
687     </xs:complexType>
688   </xs:element>
689
690   <xs:element name="struct">
691     <xs:complexType>
692       <xs:choice minOccurs="0" maxOccurs="unbounded">
693         <xs:element ref="constructor" />
694         <xs:element ref="property" />
695         <xs:element ref="method" />
696         <xs:element ref="field" />
697         <xs:element ref="operator" />
698         <xs:element ref="struct" />
699         <xs:element ref="class" />
700       </xs:choice>
701       <xs:attribute ref="name" />
702       <xs:attribute ref="namespace" />
703     </xs:complexType>
704   </xs:element>
705
706   <xs:element name="sub">
707     <xs:complexType mixed="true">
708       <xs:choice minOccurs="0" maxOccurs="unbounded">
709         <xs:element ref="paramref" />
710         <xs:element ref="typeparamref" />
711       </xs:choice>
712     </xs:complexType>
713   </xs:element>
714
715   <xs:element name="subscript">
716     <xs:complexType>
717       <xs:attribute name="term" type="xs:string" use="required" />
718     </xs:complexType>
719   </xs:element>
720
721   <xs:element name="summary">
722     <xs:complexType mixed="true">
723       <xs:choice minOccurs="0" maxOccurs="unbounded">
724         <xs:element ref="block" />
725         <xs:element ref="c" />
726         <xs:element ref="format" />
727         <xs:element ref="para" />
728         <xs:element ref="paramref" />
729         <xs:element ref="see" />
730         <xs:element ref="typeparamref" />
731         <xs:element ref="ul" />
732         <xs:element ref="list" />
733       </xs:choice>
734     </xs:complexType>
735   </xs:element>
736
737   <xs:element name="sup">
738     <xs:complexType mixed="true">
739       <xs:choice minOccurs="0" maxOccurs="unbounded">
740         <xs:element ref="i" />
741         <xs:element ref="paramref" />
742         <xs:element ref="typeparamref" />
743       </xs:choice>
744     </xs:complexType>
745   </xs:element>
746
747   <xs:element name="superscript">
748     <xs:complexType>
749       <xs:attribute name="term" type="xs:string" use="required" />
750     </xs:complexType>
751   </xs:element>
752
753   <xs:element name="term">
754     <xs:complexType mixed="true">
755         <xs:choice minOccurs="0" maxOccurs="unbounded">
756           <xs:element ref="block" />
757           <xs:element ref="c" />
758           <xs:element ref="format" />
759           <xs:element ref="geq" />
760           <xs:element ref="leq" />
761           <xs:element ref="see" />
762           <xs:element ref="para"  />
763           <xs:element ref="paramref" />
764           <xs:element ref="pi" />
765           <xs:element ref="plusminus" />
766           <xs:element ref="sup" />
767           <xs:element ref="theta" />
768           <xs:element ref="typeparamref" />
769           <xs:element ref="whitespace" />
770         </xs:choice>
771     </xs:complexType>
772   </xs:element>
773
774   <xs:element name="theta" />
775
776   <xs:element name="threadsafe">
777     <xs:complexType>
778      <xs:sequence>
779        <xs:element ref="para" minOccurs="1" maxOccurs="unbounded" />
780      </xs:sequence>
781     </xs:complexType>
782   </xs:element>
783
784   <xs:element name="ThreadingSafetyStatement">
785     <xs:complexType mixed="true">
786      <xs:sequence>
787        <xs:element ref="link" minOccurs="0" />
788      </xs:sequence>
789     </xs:complexType>
790   </xs:element>
791
792   <xs:element name="ThreadSafetyStatement">
793     <xs:complexType mixed="true">
794      <xs:sequence>
795        <xs:element ref="link" minOccurs="0" />
796      </xs:sequence>
797     </xs:complexType>
798   </xs:element>
799
800   <xs:element name="Type">
801     <xs:complexType>
802       <xs:choice maxOccurs="unbounded">
803         <xs:element ref="TypeSignature" minOccurs="1" />
804         <xs:element ref="MemberOfLibrary" minOccurs="0" />
805         <xs:element ref="AssemblyInfo" minOccurs="1" />
806         <xs:element ref="TypeParameters" minOccurs="0" maxOccurs="1" />
807         <xs:element ref="ThreadingSafetyStatement" minOccurs="0" />
808         <xs:element ref="ThreadSafetyStatement" minOccurs="0" />
809         <xs:element ref="Docs" minOccurs="1" />
810         <xs:element ref="Base" minOccurs="1" />
811         <xs:element ref="Interfaces" minOccurs="1" />
812         <xs:element ref="Attributes" minOccurs="1" />
813         <xs:element ref="Members" minOccurs="1" />
814         <xs:element ref="Parameters" minOccurs="0" />
815         <xs:element ref="ReturnValue" minOccurs="0" />
816         <xs:element ref="TypeExcluded" minOccurs="0" />
817       </xs:choice>
818       <xs:attribute ref="Name" use="required" />
819       <xs:attribute ref="FullName" use="required" />
820       <xs:attribute ref="FullNameSP" />
821       <xs:attribute ref="Maintainer" />
822     </xs:complexType>
823   </xs:element>
824
825   <xs:element name="Types">
826     <xs:complexType>
827       <xs:choice minOccurs="1" maxOccurs="unbounded">
828         <xs:element ref="Type" />
829       </xs:choice>
830       <xs:attribute ref="Library" use="required" />
831     </xs:complexType>
832   </xs:element>
833
834   <xs:element name="typeparam">
835     <xs:complexType mixed="true">
836       <xs:choice minOccurs="0" maxOccurs="unbounded">
837         <xs:element ref="block" />
838         <xs:element ref="c" />
839         <xs:element ref="format" />
840         <xs:element ref="para" />
841         <xs:element ref="paramref" />
842         <xs:element ref="see" />
843         <xs:element ref="typeparamref" />
844       </xs:choice>
845       <xs:attribute ref="name" use="required" />
846     </xs:complexType>
847   </xs:element>
848
849   <xs:element name="typeparamref">
850     <xs:complexType>
851       <xs:attribute ref="name" use="required" />
852     </xs:complexType>
853   </xs:element>
854
855   <xs:element name="TypeParameters">
856     <xs:complexType>
857       <xs:choice maxOccurs="unbounded">
858         <xs:element ref="TypeParameter" />
859       </xs:choice>
860     </xs:complexType>
861   </xs:element>
862
863   <xs:element name="TypeParameter">
864     <xs:complexType mixed="true">
865       <xs:choice minOccurs="0" maxOccurs="unbounded">
866         <xs:element ref="Attributes" />
867         <xs:element ref="Constraints" />
868       </xs:choice>
869       <xs:attribute ref="Name" use="required" />
870     </xs:complexType>
871   </xs:element>
872
873   <xs:element name="Constraints">
874     <xs:complexType mixed="true">
875       <xs:choice minOccurs="0" maxOccurs="unbounded">
876         <xs:element name="ParameterAttribute" type="xs:string" />
877         <xs:element ref="BaseTypeName" />
878         <xs:element ref="InterfaceName" />
879       </xs:choice>
880     </xs:complexType>
881   </xs:element>
882
883   <xs:element name="TypeSignature">
884     <xs:complexType>
885       <xs:attribute ref="Language" use="required" />
886       <xs:attribute ref="Value" use="required" />
887       <xs:attribute ref="Maintainer" />
888     </xs:complexType>
889   </xs:element>
890
891   <xs:element name="ul">
892     <xs:complexType>
893       <xs:sequence>
894         <xs:element ref="li" minOccurs="1" maxOccurs="unbounded" />
895       </xs:sequence>
896     </xs:complexType>
897   </xs:element>
898
899   <xs:element name="value">
900     <xs:complexType mixed="true">
901       <xs:choice minOccurs="0" maxOccurs="unbounded">
902         <xs:element ref="block" />
903         <xs:element ref="c" />
904         <xs:element ref="para" />
905         <xs:element ref="paramref" />
906         <xs:element ref="see" />
907         <xs:element ref="typeparamref" />
908         <xs:element ref="ul" />
909         <xs:element ref="example" />
910         <xs:element ref="list" />
911       </xs:choice>
912     </xs:complexType>
913   </xs:element>
914
915   <!-- 
916     index.xml & namespace-name.xml support 
917     -->
918
919   <!-- define attributes -->
920   <xs:attribute name="Version" type="xs:string" />
921   <xs:attribute name="DisplayName" type="xs:string" />
922   <xs:attribute name="Kind" type="xs:string" />
923
924   <!-- define simple elements -->
925   <xs:element name="Title" type="xs:string" />
926
927   <!-- define complex elements -->
928   <xs:element name="Assemblies">
929     <xs:complexType>
930       <xs:choice minOccurs="0" maxOccurs="unbounded">
931         <xs:element ref="Assembly" />
932       </xs:choice>
933     </xs:complexType>
934   </xs:element>
935
936   <xs:element name="Assembly">
937     <xs:complexType>
938       <xs:choice minOccurs="0" maxOccurs="unbounded">
939         <xs:element ref="AssemblyPublicKey" />
940         <xs:element ref="AssemblyCulture" />
941         <xs:element ref="Attributes" />
942       </xs:choice>
943       <xs:attribute ref="Name" />
944       <xs:attribute ref="Version" />
945     </xs:complexType>
946   </xs:element>
947
948   <xs:element name="Copyright">
949     <xs:complexType mixed="true">
950       <xs:choice minOccurs="0" maxOccurs="unbounded">
951         <xs:element ref="block" />
952         <xs:element ref="code" />
953         <xs:element ref="example" />
954         <xs:element ref="list" />
955         <xs:element ref="para" />
956         <xs:element ref="paramref" />
957         <xs:element ref="see" />
958         <xs:element ref="typeparamref" />
959         <xs:element ref="ul" />
960       </xs:choice>
961     </xs:complexType>
962   </xs:element>
963
964   <xs:element name="ExtensionMethods">
965     <xs:complexType>
966       <xs:sequence>
967         <xs:element ref="ExtensionMethod" minOccurs="0" maxOccurs="unbounded" />
968       </xs:sequence>
969     </xs:complexType>
970   </xs:element>
971
972   <xs:element name="ExtensionMethod">
973     <xs:complexType>
974       <xs:sequence>
975         <xs:element name="Targets" minOccurs="1" maxOccurs="1">
976           <xs:complexType>
977             <xs:choice minOccurs="1" maxOccurs="unbounded">
978               <xs:element name="Target">
979                 <xs:complexType>
980                   <xs:attribute ref="Type" use="required" />
981                 </xs:complexType>
982               </xs:element>
983             </xs:choice>
984           </xs:complexType>
985         </xs:element>
986         <xs:element ref="Member" minOccurs="1" maxOccurs="1" />
987       </xs:sequence>
988     </xs:complexType>
989   </xs:element>
990
991   <xs:element name="Overview">
992     <xs:complexType>
993       <xs:choice minOccurs="0" maxOccurs="unbounded">
994         <xs:element ref="Assemblies" />
995         <xs:element ref="Copyright" />
996         <xs:element ref="Remarks" />
997         <xs:element ref="Title" />
998         <xs:element name="Types">
999           <xs:complexType>
1000             <xs:choice minOccurs="0" maxOccurs="unbounded">
1001               <xs:element name="Namespace">
1002                 <xs:complexType>
1003                   <xs:choice minOccurs="0" maxOccurs="unbounded">
1004                     <xs:element name="Type">
1005                       <xs:complexType>
1006                         <xs:attribute ref="Name" use="required" />
1007                         <xs:attribute ref="DisplayName" />
1008                         <xs:attribute ref="Kind" />
1009                       </xs:complexType>
1010                     </xs:element>
1011                   </xs:choice>
1012                   <xs:attribute ref="Name" />
1013                 </xs:complexType>
1014               </xs:element>
1015             </xs:choice>
1016           </xs:complexType>
1017         </xs:element>
1018         <xs:element ref="ExtensionMethods" />
1019       </xs:choice>
1020     </xs:complexType>
1021   </xs:element>
1022
1023   <xs:element name="Remarks">
1024     <xs:complexType mixed="true">
1025       <xs:choice minOccurs="0" maxOccurs="unbounded">
1026         <xs:element ref="block" />
1027         <xs:element ref="code" />
1028         <xs:element ref="example" />
1029         <xs:element ref="list" />
1030         <xs:element ref="para" />
1031         <xs:element ref="paramref" />
1032         <xs:element ref="typeparamref" />
1033         <xs:element ref="see" />
1034         <xs:element ref="ul" />
1035       </xs:choice>
1036     </xs:complexType>
1037   </xs:element>
1038
1039   <!--
1040     ECMA 335 CLILibraryTypes.xml support
1041     -->
1042
1043   <xs:element name="Libraries">
1044     <xs:complexType>
1045       <xs:choice minOccurs="0" maxOccurs="unbounded">
1046         <xs:element ref="Types" minOccurs = "1" maxOccurs="unbounded" />
1047       </xs:choice>
1048     </xs:complexType>
1049   </xs:element>
1050
1051         <xs:element name="codelink">
1052     <xs:complexType>
1053       <xs:attribute name="SampleID" type="xs:string" />
1054       <xs:attribute name="SnippedID" type="xs:string" />
1055     </xs:complexType>
1056         </xs:element>
1057
1058   <xs:element name="filterpriority" type="xs:string" />
1059
1060   <xs:element name="geq" />
1061   <xs:element name="leq" />
1062   <xs:element name="plusminus" />
1063   <xs:element name="whitespace" />
1064
1065   <xs:element name="PermissionSet">
1066     <xs:complexType>
1067       <xs:choice minOccurs="0" maxOccurs="unbounded">
1068         <xs:element name="IPermission">
1069           <xs:complexType>
1070             <xs:attribute name="class" type="xs:string" />
1071             <xs:attribute name="Flags" type="xs:string" />
1072             <xs:attribute name="Name" type="xs:string" />
1073             <xs:attribute name="PathDiscovery" type="xs:string" />
1074             <xs:attribute name="PublicKeyBlob" type="xs:string" />
1075             <xs:attribute name="Read" type="xs:string" />
1076             <xs:attribute name="Unrestricted" type="xs:string" />
1077             <xs:attribute name="version" type="xs:string" />
1078             <xs:attribute name="Window" type="xs:string" />
1079           </xs:complexType>
1080         </xs:element>
1081       </xs:choice>
1082     </xs:complexType>
1083   </xs:element>
1084
1085   <!--
1086     ECMA 334 Annex E Documentation Comments support.
1087     -->
1088
1089   <xs:element name="seealso">
1090     <xs:complexType>
1091       <xs:simpleContent>
1092         <xs:extension base="xs:string">
1093           <xs:attribute ref="cref" />
1094         </xs:extension>
1095       </xs:simpleContent>
1096     </xs:complexType>
1097   </xs:element>
1098
1099   <xs:element name="doc">
1100     <xs:complexType>
1101       <xs:sequence>
1102         <xs:element name="assembly">
1103           <xs:complexType>
1104             <xs:choice>
1105               <xs:element name="name" type="xs:string" />
1106             </xs:choice>
1107           </xs:complexType>
1108         </xs:element>
1109         <xs:element name="members">
1110           <xs:complexType>
1111             <xs:choice minOccurs="0" maxOccurs="unbounded">>
1112               <xs:element name="member">
1113                 <xs:complexType>
1114                   <xs:choice minOccurs="0" maxOccurs="unbounded">
1115                     <xs:element ref="seealso" />
1116                     <xs:element ref="example" />
1117                     <xs:element ref="exception" />
1118                     <xs:element ref="param" />
1119                     <xs:element ref="permission" />
1120                     <xs:element ref="PermissionSet" />
1121                     <xs:element ref="remarks" />
1122                     <xs:element ref="returns" />
1123                     <xs:element ref="summary" />
1124                     <xs:element ref="threadsafe" />
1125                     <xs:element ref="typeparam" />
1126                     <xs:element ref="value" />
1127                   </xs:choice>
1128                   <xs:attribute name="name" type="xs:type" />
1129                 </xs:complexType>
1130               </xs:element>
1131             </xs:choice>
1132           </xs:complexType>
1133         </xs:element>
1134       </xs:sequence>
1135     </xs:complexType>
1136   </xs:element>
1137 </xs:schema>
1138