E derivation-ok-restriction.5.4.2
Posted: Wed Jan 25, 2006 5:55 pm
Hi,
I'm having the subsequent XSD, where I try to apply a restriction to the complex type AUPriceType:
When trying to validate I receive the error messages:
Regards
Alex
I'm having the subsequent XSD, where I try to apply a restriction to the complex type AUPriceType:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:complexType name="AUPriceType">
<xs:sequence>
<xs:element name="Carrier" minOccurs="0">
<xs:complexType>
<xs:attribute name="Code" type="xs:string" use="optional"/>
<xs:attribute name="Original" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="AdultAbsoluteValue" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="TotalDuration" type="xs:short" use="optional"/>
<xs:attribute name="NightsOfStay" type="xs:short" use="optional"/>
<xs:attribute name="Amount" type="xs:positiveInteger" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="SeasonChar" type="xs:string" use="optional"/>
<xs:attribute name="SeasonCharRef" type="xs:string" use="optional"/>
</xs:complexType>
<xs:complexType name="PricesType">
<xs:sequence>
<xs:element name="Price" maxOccurs="unbounded">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="AUPriceType">
<xs:sequence>
<xs:element name="Carrier" minOccurs="0" maxOccurs="0">
<xs:complexType>
<xs:attribute name="Code" type="xs:string" use="optional"/>
<xs:attribute name="Original" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="AdultAbsoluteValue" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="TotalDuration" type="xs:short" use="prohibited"/>
<xs:attribute name="NightsOfStay" type="xs:short" use="optional"/>
<xs:attribute name="Amount" type="xs:positiveInteger" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="SeasonChar" type="xs:string" use="prohibited"/>
<xs:attribute name="SeasonCharRef" type="xs:string" use="optional"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
Any help on the problem is truly appreciated. Tanks in advance for your help!!Position: 25:21
E rcase-Recurse.2: There is not a complete functional mapping between the particles.
URL: http://www.w3.org/TR/xmlschema-1/#rcase-Recurse
Position: 25:21
E derivation-ok-restriction.5.4.2: Error for type '#AnonType_PricePricesType'. The particle of the type is not a valid restriction of the particle of the base.
URL: http://www.w3.org/TR/xmlschema-1/#deriv ... estriction
Regards
Alex