Take a look at http://pyxb.sourceforge.net/userref_pyxbgen.html,
specifically the section on multi-document schema and sharing namespace
bindings. You probably need to generate modules for SimpleTypes and
ComplexTypes, then reference those in the modules for Model1 and Model2.
If that doesn't get you anywhere, please create a new ticket on
https://sourceforge.net/apps/trac/pyxb/ and attach to that ticket a tar or
zip file containing the schema you are using.
Peter
On Fri, Oct 1, 2010 at 11:15 AM, Eduard Carreras <ecarre...@gisce.net>wrote:
> Hello,
> I get this exception when importing generated models. Firstly I remark that
> I'm only the consumer of this XSDs, I can't modify its structure...
>
> Example:
> SimpleTypes.xsd
> ComplexTypes.xsd
> Model1.xsd
> Model2.xsd
>
> Model1.xsd and Model2.xsd both have a <xs:include
> schemaLocation="SimpleTypes.xsd"/> and <xs:include
> schemaLocation="ComplexTypes.xsd"/> inside.
>
> I use pyxbgen to generate python modules as following:
> $ pyxbgen -u Model1.xsd -m Model1
> $ pyxbgen -u Model2.xsd -m Model2
>
> Then using ipython in the same directory:
>
> import Model1 (ok, no exception raised)
>
> import Model2 (NamespaceUniquenessError used for multiple values in
> typeBinding)
>
> I can attach original xsd files if you want to reproduce this problem.
>
> Cheers,
>
> --
> Eduard Carreras i Nadal <ecarre...@gisce.net>
> Tel. 972 911 566 - Fax 972 217 384
> GISCE-ENGINYERIA S.L.
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> pyxb-users mailing list
> pyxb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyxb-users
>
>
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
pyxb-users mailing list
pyxb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyxb-users