Xcos modelica init: fix the XSD Schema
[scilab.git] / scilab / modules / xcos / etc / Modelica.xsd
index c1adc34..83d7b07 100644 (file)
@@ -1,8 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
-  <xs:element name="model" type="Model"/>
-
   <xs:complexType name="Info" final="extension restriction">
     <xs:annotation>
       <xs:documentation>Specify the size of all the parameters, state, inputs or outputs.</xs:documentation>
@@ -24,9 +21,9 @@
 
   <xs:complexType name="ModelicaValue" final="extension restriction">
     <xs:annotation>
-      <xs:documentation>Modelica String assignation.</xs:documentation>
+      <xs:documentation>Modelica String assignation. The default value is specified to ease serialization.</xs:documentation>
     </xs:annotation>
-    <xs:attribute name="value" type="xs:string"/>
+    <xs:attribute name="value" type="xs:string" use="required" />
   </xs:complexType>
 
   <xs:complexType name="Struct" final="extension restriction">
@@ -64,7 +61,9 @@
       <xs:element name="nominal_value" type="ModelicaValue" minOccurs="0"/>
       <xs:element name="comment" type="ModelicaValue" minOccurs="0"/>
       <xs:element name="selected" type="ModelicaValue" minOccurs="0"/>
-      <xs:element name="output" type="xs:string" nillable="true" minOccurs="0"/>
+      <xs:element name="output" minOccurs="0" maxOccurs="1">
+        <xs:complexType />
+      </xs:element>
     </xs:sequence>
   </xs:complexType>
 
             <xs:documentation>Wrapper around the {@link Output} list.</xs:documentation>
           </xs:annotation>
           <xs:sequence>
-            <xs:element name="output" type="Output" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="output" type="Output" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
         </xs:complexType>
       </xs:element>
       <xs:element name="when_clauses" minOccurs="0">
-        <xs:simpleType>
-          <xs:restriction base="xs:string"/>
-        </xs:simpleType>
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="when_clause" type="ModelicaValue" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
       </xs:element>
     </xs:sequence>
   </xs:complexType>
+  
+  <xs:element name="model" type="Model" />
 </xs:schema>