I'm interested in Python XML binding for reading input files matching this scheme: http://ddex.net/xml/ern/341/release-notification.xsd
This XSD depends on a number of others, though, most importantly: http://ddex.net/xml/20120404/ddexC.xsd and http://ddex.net/xml/20120404/ddex.xsd
My first attempt is to use generateDS . I can successfully generate a binding for release-notification.xsd if I use -no-process-includes with:
./generateDS.py --no-process-includes -o release-notification.py release-notification.xsd
However, this leaves me with a Python object, which is mostly useless, since most ComplexTypes are defined in ddexC.xsd .
If I try this without -no-process-includes, I get:
RuntimeError: Extension/restriction recursion detected. Suggest you check definitions of types ArtistRole and ArtistRole.
The definition in question is as follows:
<xs:element name="ArtistRole" maxOccurs="unbounded" type="ddexC:ArtistRole"> .... <xs:complexType name="ArtistRole"> <xs:simpleContent> <xs:extension base="ddex:ArtistRole"> ....
So it seems that the ddex and ddexC namespaces are somehow mixed up and a circular reference is created.
Any advice here?
source share