Xcos modelica init: fix the XSD Schema
[scilab.git] / scilab / modules / xcos / etc / Modelica.xsd
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2 <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
3   <xs:complexType name="Info" final="extension restriction">
4     <xs:annotation>
5       <xs:documentation>Specify the size of all the parameters, state, inputs or outputs.</xs:documentation>
6     </xs:annotation>
7     <xs:sequence>
8       <xs:element name="number_of_integer_parameters" type="xs:nonNegativeInteger" minOccurs="0"/>
9       <xs:element name="number_of_real_parameters" type="xs:nonNegativeInteger" minOccurs="0"/>
10       <xs:element name="number_of_string_parameters" type="xs:nonNegativeInteger" minOccurs="0"/>
11       <xs:element name="number_of_discrete_variables" type="xs:nonNegativeInteger" minOccurs="0"/>
12       <xs:element name="number_of_continuous_variables" type="xs:nonNegativeInteger" minOccurs="0"/>
13       <xs:element name="number_of_continuous_unknowns" type="xs:nonNegativeInteger" minOccurs="0"/>
14       <xs:element name="number_of_continuous_states" type="xs:nonNegativeInteger" minOccurs="0"/>
15       <xs:element name="number_of_inputs" type="xs:nonNegativeInteger" minOccurs="0"/>
16       <xs:element name="number_of_outputs" type="xs:nonNegativeInteger" minOccurs="0"/>
17       <xs:element name="number_of_modes" type="xs:nonNegativeInteger" minOccurs="0"/>
18       <xs:element name="number_of_zero_crossings" type="xs:nonNegativeInteger" minOccurs="0"/>
19     </xs:sequence>
20   </xs:complexType>
21
22   <xs:complexType name="ModelicaValue" final="extension restriction">
23     <xs:annotation>
24       <xs:documentation>Modelica String assignation. The default value is specified to ease serialization.</xs:documentation>
25     </xs:annotation>
26     <xs:attribute name="value" type="xs:string" use="required" />
27   </xs:complexType>
28
29   <xs:complexType name="Struct" final="extension restriction">
30     <xs:annotation>
31       <xs:documentation>Partial tree of a structured content. Each node of a this type must not be a leaf.</xs:documentation>
32     </xs:annotation>
33     <xs:sequence>
34       <xs:element name="name" type="xs:string"/>
35       <xs:element name="subnodes">
36         <xs:complexType>
37           <xs:sequence>
38             <xs:choice minOccurs="0" maxOccurs="unbounded">
39               <xs:element name="struct" type="Struct"/>
40               <xs:element name="terminal" type="Terminal"/>
41             </xs:choice>
42           </xs:sequence>
43         </xs:complexType>
44       </xs:element>
45     </xs:sequence>
46   </xs:complexType>
47
48   <xs:complexType name="Terminal" final="extension restriction">
49     <xs:annotation>
50       <xs:documentation>Terminal node of a {@link Struct} tree. This node is always a leaf.</xs:documentation>
51     </xs:annotation>
52     <xs:sequence>
53       <xs:element name="name" type="xs:string"/>
54       <xs:element name="kind" type="xs:string"/>
55       <xs:element name="id" type="xs:string"/>
56       <xs:element name="fixed" type="ModelicaValue" minOccurs="0"/>
57       <xs:element name="initial_value" type="ModelicaValue" minOccurs="0"/>
58       <xs:element name="weight" type="ModelicaValue" minOccurs="0"/>
59       <xs:element name="max" type="ModelicaValue" minOccurs="0"/>
60       <xs:element name="min" type="ModelicaValue" minOccurs="0"/>
61       <xs:element name="nominal_value" type="ModelicaValue" minOccurs="0"/>
62       <xs:element name="comment" type="ModelicaValue" minOccurs="0"/>
63       <xs:element name="selected" type="ModelicaValue" minOccurs="0"/>
64       <xs:element name="output" minOccurs="0" maxOccurs="1">
65         <xs:complexType />
66       </xs:element>
67     </xs:sequence>
68   </xs:complexType>
69
70   <xs:complexType name="Output" final="extension restriction">
71     <xs:annotation>
72       <xs:documentation>Describe an output of the modelica world.</xs:documentation>
73     </xs:annotation>
74     <xs:sequence>
75       <xs:element name="name" type="xs:string"/>
76       <xs:element name="order" type="xs:nonNegativeInteger" minOccurs="0"/>
77       <xs:element name="dependencies">
78         <xs:complexType>
79           <xs:sequence>
80             <xs:element name="variable" type="xs:string" minOccurs="0"/>
81           </xs:sequence>
82         </xs:complexType>
83       </xs:element>
84     </xs:sequence>
85   </xs:complexType>
86
87   <xs:complexType name="Model" final="extension restriction">
88     <xs:annotation>
89       <xs:documentation>Root of the modelica tree.</xs:documentation>
90     </xs:annotation>
91     <xs:sequence>
92       <xs:element name="name" type="xs:string" minOccurs="0"/>
93       <xs:element name="model_info" type="Info" minOccurs="0"/>
94       <xs:element name="identifiers" minOccurs="0">
95         <xs:complexType>
96           <xs:annotation>
97             <xs:documentation>Describe any model identifier.</xs:documentation>
98           </xs:annotation>
99           <xs:sequence>
100             <xs:element name="parameter" type="xs:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
101             <xs:element name="explicit_variable" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
102             <xs:element name="implicit_variable" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
103             <xs:element name="input" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
104           </xs:sequence>
105         </xs:complexType>
106       </xs:element>
107       <xs:element name="implicit_relations" minOccurs="0">
108         <xs:complexType>
109           <xs:annotation>
110             <xs:documentation>Wrapper around the implicit (and inputs) variables list.</xs:documentation>
111           </xs:annotation>
112           <xs:sequence>
113             <xs:element name="implicit_relation" minOccurs="0" maxOccurs="unbounded">
114               <xs:complexType>
115                 <xs:sequence>
116                   <xs:element name="implicit_variable" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
117                   <xs:element name="input" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
118                 </xs:sequence>
119               </xs:complexType>
120             </xs:element>
121           </xs:sequence>
122         </xs:complexType>
123       </xs:element>
124       <xs:element name="explicit_relations" minOccurs="0">
125         <xs:complexType>
126           <xs:annotation>
127             <xs:documentation>Wrapper around the explicit variables list.</xs:documentation>
128           </xs:annotation>
129           <xs:sequence>
130             <xs:element name="explicit_relation" minOccurs="0" maxOccurs="unbounded">
131               <xs:complexType>
132                 <xs:sequence>
133                   <xs:element name="explicit_variable" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
134                 </xs:sequence>
135               </xs:complexType>
136             </xs:element>
137           </xs:sequence>
138         </xs:complexType>
139       </xs:element>
140       <xs:element name="outputs" minOccurs="0">
141         <xs:complexType>
142           <xs:annotation>
143             <xs:documentation>Wrapper around the {@link Output} list.</xs:documentation>
144           </xs:annotation>
145           <xs:sequence>
146             <xs:element name="output" type="Output" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
147           </xs:sequence>
148         </xs:complexType>
149       </xs:element>
150       <xs:element name="elements" minOccurs="0">
151         <xs:complexType>
152           <xs:sequence>
153             <xs:element name="struct" type="Struct" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
154           </xs:sequence>
155         </xs:complexType>
156       </xs:element>
157       <xs:element name="equations" minOccurs="0">
158         <xs:complexType>
159           <xs:sequence>
160             <xs:element name="equation" type="ModelicaValue" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
161           </xs:sequence>
162         </xs:complexType>
163       </xs:element>
164       <xs:element name="when_clauses" minOccurs="0">
165         <xs:complexType>
166           <xs:sequence>
167             <xs:element name="when_clause" type="ModelicaValue" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
168           </xs:sequence>
169         </xs:complexType>
170       </xs:element>
171     </xs:sequence>
172   </xs:complexType>
173   
174   <xs:element name="model" type="Model" />
175 </xs:schema>
176