Quantcast

problem in xml schema validation

Previous Topic
 
classic Classic list List threaded Threaded
1 message Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

problem in xml schema validation

nandana
hi,

while creating the below part of the xsd, I'm getting errors:

<xs:element name="HealthState"> 
<xs:complexType> 
<xs:simpleContent> 
<xs:restriction base="cim:cimUnsignedShort"> 
<xs:simpleType> 
<xs:union> 
<xs:simpleType> 
<xs:restriction base="xs:unsignedShort"> 
<xs:enumeration value="0"/> 
<xs:enumeration value="5"/> 
<xs:enumeration value="10"/> 
<xs:enumeration value="15"/> 
<xs:enumeration value="20"/> 
<xs:enumeration value="25"/> 
<xs:enumeration value="30"/> 
</xs:restriction> 
</xs:simpleType> 
<xs:simpleType> 
<xs:restriction base="xs:unsignedShort"> 
<xs:minInclusive value="31"/> 
</xs:restriction> 
</xs:simpleType> 
</xs:union> 
</xs:simpleType> 
</xs:restriction> 
</xs:simpleContent> 
</xs:complexType> 
</xs:element> 

where, the definition for cim:cimUnsignedShort is as follows in another xsd.:

<xs:complexType name="cimUnsignedShort"> 
<xs:simpleContent> 
<xs:extension base="xs:unsignedShort"> 
<xs:anyAttribute namespace="##any" processContents="lax"/> 
</xs:extension> 
</xs:simpleContent> 
</xs:complexType> 

Im getting the following error while validating:

Type '{anonymous}' is not a valid restriction of type 'cim:cimUnsignedShort'.
Error location: xs:schema / xs:element / xs:complexType / xs:simpleContent / xs:restriction / @base
derivation-ok-restriction.5.2: The simple type definition '{anonymous}' is not a valid restriction of the base type definition's content type 'xs:unsignedShort'.

Please help me understand the problem.

thanks in advance.

Nandan.
Loading...