[xsd-users] xsd falls with exception bad_cast (Ubuntu 10.04)

Boris Kolpackov boris at codesynthesis.com
Mon Jul 30 04:54:48 EDT 2012


Hi Max,

Max Agupov <maxagupov at gmail.com> writes:

> Trying to convert attached shemas I run into a problem.

I looked into this and the crash is caused by the global element and
attribute in your schema that have the same name:

<xs:attribute name="ref" type="types:TUUID"/>
<xs:element name="ref" type="types:TUUID"/>

While this is quite unusual, apparently it is valid XML Schema. I've
fixed this bug for the next release of XSD. If you would like, I can
build you a pre-release binary with the fix (it won't be the .deb
package though, just a .tar.bz2).

Alternatively, there is a fairly easy workaround: use different names
for the attribute and element.

Thanks for reporting this!

Boris



More information about the xsd-users mailing list