XSD.Exe error: Error generating classes for schema 'xxxxxxx'. - Specified cast is not valid.

E

eSapient

I get the following error when I run the XML Schema Definition Tool on
a XML schema:

Error: Error generating classes for schema 'codeGeoFeatureType'.
- Specified cast is not valid.

The XSD in question is:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:element name="codeGeoFeatureType" type="codeTypeGeoFeature"
default="POLYGON">
</xsd:element>
<xsd:simpleType name="codeTypeGeoFeatureBase">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="POLYGON"/>
<xsd:enumeration value="LINE"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="codeTypeGeoFeature">
<xsd:simpleContent>
<xsd:extension base="codeTypeGeoFeatureBase"/>
</xsd:simpleContent>
</xsd:complexType>
</xsd:schema>

Can anybody help by offering suggestions or workarounds?

Thanks in advance.
 
E

eSapient

I found that if I removed 'default="POLYGON"' from the
XSD, I did not get any error.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top