I have several XSD files from which we have generated python bindings with pyxb
(1.2.6). Each of these XSD files use the same namespace. Some of them define elements that have the same name (MyNamedElement
). As a result, importing two of such bindings at once yields the following error:
pyxb.exceptions_.NamespaceUniquenessError: my:NAMESPACE: name MyNamedElement used for multiple values in elementBinding
I do not have to use two bindings at the same time, so it would suffice to simply clear pyxb
's internal namespace cache if thats possible.
Is there a way to do that, or some other python-magic to circumvent this problem? At the moment, my best idea is to use subprocesses, which perform the import and hopefully loose those again after finishing, s.t. pyxb
will not complain.
Another question here on SO has the same error, but it turned out to be caused by a different problem: PyXB: two versions of XSDs with same namespace