Merge branch 'upstream'
[routino] / xml / xsd.xsd
1 <?xml version="1.0" encoding="utf-8" ?>
2
3 <!-- ============================================================
4      $Header: /home/amb/routino/xml/RCS/xsd.xsd,v 1.1 2010/03/28 15:27:05 amb Exp $
5
6      An XML Schema Definition for the XML Schema Definition XML format
7
8      Not a full definition but sufficient to allow the xsd-to-xmlparser to
9      read it to bootstrap itself - a program to read in other files in the
10      same format to create more XML parsers for other useful things.
11      ============================================================
12      This file Copyright 2010 Andrew M. Bishop
13
14      This program is free software: you can redistribute it and/or modify
15      it under the terms of the GNU Affero General Public License as published by
16      the Free Software Foundation, either version 3 of the License, or
17      (at your option) any later version.
18      ============================================================ -->
19
20 <xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
21
22   <!-- The top level xsd:schema element -->
23
24   <xsd:element name="xsd:schema" type="schemaType"/>
25
26   <xsd:complexType name="schemaType">
27     <xsd:sequence>
28       <xsd:element name="xsd:element"        type="elementType"/>
29       <xsd:element name="xsd:complexType"    type="complexType"    minOccurs="0" maxOccurs="unbounded"/>
30     </xsd:sequence>
31     <xsd:attribute name="elementFormDefault" type="xsd:string"/>
32     <xsd:attribute name="xmlns:xsd"          type="xsd:string"/>
33   </xsd:complexType>
34
35   <!-- The second level xsd:element and xsd:complexType elements -->
36
37   <xsd:complexType name="elementType">
38     <xsd:attribute name="name"               type="xsd:string"/>
39     <xsd:attribute name="type"               type="xsd:string"/>
40     <xsd:attribute name="minOccurs"          type="xsd:string"/>
41     <xsd:attribute name="maxOccurs"          type="xsd:string"/>
42   </xsd:complexType>
43
44   <xsd:complexType name="complexType">
45     <xsd:sequence>
46       <xsd:element name="xsd:sequence"       type="sequenceType"   minOccurs="0"/>
47       <xsd:element name="xsd:attribute"      type="attributeType"  minOccurs="0" maxOccurs="unbounded"/>
48     </xsd:sequence>
49     <xsd:attribute name="name"               type="xsd:string"/>
50   </xsd:complexType>
51
52   <!-- The third level elements and their contents -->
53
54   <xsd:complexType name="sequenceType">
55     <xsd:sequence>
56       <xsd:element name="xsd:element"        type="elementType"    minOccurs="0" maxOccurs="unbounded"/>
57     </xsd:sequence>
58   </xsd:complexType>
59
60   <xsd:complexType name="attributeType">
61     <xsd:attribute name="name"               type="xsd:string"/>
62     <xsd:attribute name="type"               type="xsd:string"/>
63   </xsd:complexType>
64
65 </xsd:schema>