Application data has choice of data or dataRef
[vamsas.git] / schemas / vamsas.xsd
index e02b96c..26b9bd1 100644 (file)
        </xs:complexType>
        <xs:element name="ApplicationData">
                <xs:complexType>
-                       <xs:sequence>
-                               <xs:element name="Application" minOccurs="0" maxOccurs="unbounded">
-                                       <xs:complexType>
-                                               <xs:sequence>
-                                                       <xs:element name="User" maxOccurs="unbounded">
-                                                               <xs:complexType>
-                                                                       <xs:attribute name="fullname" type="xs:string"/>
-                                                                       <xs:attribute name="organization" type="xs:string"/>
-                                                                       <xs:attribute name="data" type="xs:string"/>
-                                                               </xs:complexType>
-                                                       </xs:element>
-                                               </xs:sequence>
-                                               <xs:attribute name="version" type="xs:string" use="required"/>
-                                               <xs:attribute name="name" type="xs:string" use="required"/>
-                                               <xs:attribute name="urn" type="xs:string" use="required"/>
-                                               <xs:attribute name="data" type="xs:string" use="required"/>
-                                       </xs:complexType>
-                               </xs:element>
-                       </xs:sequence>
+                       <xs:complexContent>
+                               <xs:extension base="vamsas:appData">
+                                       <xs:attribute name="version" type="xs:string" use="required"/>
+                                       <xs:attribute name="name" type="xs:string" use="required"/>
+                                       <xs:attribute name="urn" type="xs:string" use="required"/>
+                               </xs:extension>
+                       </xs:complexContent>
                </xs:complexType>
        </xs:element>
+       <xs:complexType name="appData">
+               <xs:sequence>
+                       <xs:choice>
+                               <xs:element name="data" type="xs:string"/>
+                               <xs:element name="dataReference" type="xs:base64Binary"/>
+                       </xs:choice>
+                       <xs:element name="User" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:complexContent>
+                                               <xs:extension base="vamsas:appData">
+                                                       <xs:attribute name="fullname" type="xs:string" use="required"/>
+                                                       <xs:attribute name="organization" type="xs:string" use="required"/>
+                                               </xs:extension>
+                                       </xs:complexContent>
+                               </xs:complexType>
+                       </xs:element>
+               </xs:sequence>
+       </xs:complexType>
 </xs:schema>