Mega Code Archive

 
Categories / XML / XML Schema
 

ComplexType with empty sequence

File: Schema.xsd <?xml version="1.0" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"   targetNamespace="http://www.rntsoft.com/statement"   xmlns="http://www.rntsoft.com/statement">        <xs:attribute name="number" type="xs:ID" />   <xs:attribute name="name"   type="xs:string" />   <xs:attribute name="type"   type="xs:string" />   <xs:element name="statement">     <xs:complexType>       <xs:sequence>         <xs:element ref="customer" />       </xs:sequence>     </xs:complexType>   </xs:element>   <xs:element name="customer">     <xs:complexType>       <xs:sequence />       <xs:attribute ref="number" />       <xs:attribute ref="name"  />       <xs:attribute ref="type" use="optional" default="normal" />     </xs:complexType>   </xs:element> </xs:schema>