Menu

PyXB: Python XML Schema Bindings

Help
2017-10-12
2017-10-12
  • Sanjay Maurya

    Sanjay Maurya - 2017-10-12

    Hi,
    I have two schema command.xsd and reply.xsd , both of them importing three other schema internally. I am able to successfully generate python module out of these schema but when I import these module in my python program I got following error:

    NamespaceUniquenessError: urn:epcglobal:xsd:1: name Document used for multiple values in typeBinding

    P.S:- command.xsd and reply.xsd are using same name space.
    How solve this problem

     
  • Peter A. Bigot

    Peter A. Bigot - 2017-10-12

    Read this page of the manual. You need to generate the bindings for the imported schema first, then generate the bindings for all schema files that define the content of your namespace simutaneously and referencing the bindings for the imported schema. This could be done by generating with schema the includes both command and reply or doing something like:

    pyxbgen \
       -u command.xsd -m command \
       -u reply.xsd -m reply \
       --archive-path .:+
    
     

Log in to post a comment.