I have xsd file:
<?xml version="1.0" encoding="UTF-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="triptype"> <xs:complexType> <xs:sequence> <!--definition of simple elements --> <xs:element name="country" type="xs:string"/> <xs:element name="days" type="xs:integer"/> <!--definition of attributes --> <xs:extension base="xs:string"> <xs:attribute name="tripid" use="required" type="xs:ID"/> </xs:extension> <!-- definition of complex elements --> <xs:simpleType name="type" final="restriction"> <xs:restriction base="xs:string"> <xs:enumeration value="day_off" /> <xs:enumeration value="excursion" /> <xs:enumeration value="rest" /> <xs:enumeration value="pilgrimage" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="transport" final="restriction"> <xs:restriction base="xs:string"> <xs:enumeration value="avia" /> <xs:enumeration value="railway" /> <xs:enumeration value="auto" /> <xs:enumeration value="liner" /> </xs:restriction> </xs:simpleType> <xs:element name="cost"> <xs:complexType> <xs:sequence> <xs:element name="service" type="xs:decimal" /> <xs:element name="road" type="xs:decimal" /> <xs:element name="food" type="xs:decimal" /> <xs:element name="excursion" type="xs:decimal" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> When i validate it i get errors: Not valid. Error - Line 11, 35: org.xml.sax.SAXParseException; lineNumber: 11; columnNumber: 35; s4s-elt-must-match.1: The content of 'sequence' must match (annotation?, (element | group | choice | sequence | any)). A problem was found starting at: extension. Error - Line 17, 51: org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 51; s4s-elt-must-match.1: The content of 'sequence' must match (annotation?, (element | group | choice | sequence | any)). A problem was found starting at: simpleType. Error - Line 25, 56: org.xml.sax.SAXParseException; lineNumber: 25; columnNumber: 56; s4s-elt-must-match.1: The content of 'sequence' must match (annotation?, (element | group | choice | sequence | any)). A problem was found starting at: simpleType.*
What is the problem?
No comments:
Post a Comment