469,331 Members | 4,501 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,331 developers. It's quick & easy.

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

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.
Nov 16 '05 #1
1 2223
I found that if I removed 'default="POLYGON"' from the
XSD, I did not get any error.
Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Pavan | last post: by
13 posts views Thread by ScottM | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by haryvincent176 | last post: by
reply views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.