org.apache.xmlbeans.impl.inst2xsd
) to avoid clashes with the xmlbeans
implementation which is used in Xerces.
<persons> <person name="Peter" age="40" /> <person name="Sophie" age="20" /> <person name="Paul" age="51" /> </persons>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="persons"> <xs:complexType> <xs:sequence> <xs:element name="person" maxOccurs="unbounded" minOccurs="0"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute type="xs:string" name="name" use="optional"/> <xs:attribute type="xs:byte" name="age" use="optional"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="person"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute type="xs:string" name="name" use="optional"/> <xs:attribute type="xs:byte" name="age" use="optional"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:element name="persons"> <xs:complexType> <xs:sequence> <xs:element ref="person" maxOccurs="unbounded" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="persons" type="personsType"/> <xs:complexType name="personType"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute type="xs:string" name="name" use="optional"/> <xs:attribute type="xs:byte" name="age" use="optional"/> </xs:extension> </xs:simpleContent> </xs:complexType> <xs:complexType name="personsType"> <xs:sequence> <xs:element type="personType" name="person" maxOccurs="unbounded" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:schema>
Copyright 2006-2016 Hervé. All Rights Reserved. Documentation and source under the LGPL v2 and Apache 2.0 licences