The -u (--schema-location) and -m (--module) parameters need to come in
pairs, since the -m argument names the Python module that should be used
to store the XML structures associated with the namespace that is the
target of the -u schema. I expect that's the cause of the error. You
can make this work with:
pyxbgen \
-u
http://www.aixm.aero/gallery/content/public/schema/5.0/AIXM_Features.xsd \
-m test
Just drop the second parameter; PyXB can find the other schemas by
itself. This successfully builds a module; I haven't tested it in any way.
The error is misleading, and there should be a bug filed to make sure
something more useful gets printed. Also, it should be possible to
re-use the xlink and gml bindings that are part of the opengis bundle,
instead of creating local private modules.
Peter
On 1/26/2010 2:09 PM, Wendell Turner wrote:
> I'm new to PyXM and am trying to generate parsers from some
> .xsd files. The command I'm using is this:
>
> pyxbgen -u
> http://www.aixm.aero/gallery/content/public/schema/5.0/AIXM_Features.xsd \
> -u
> http://www.aixm.aero/gallery/content/public/schema/5.0/ISO_19136_Schemas/ \
> -m test
>
> However, it ends with this assertion error:
> assert tns is not None
>
> Is the above the correct command to use to generate the
> parser? Is the schema valid? What is the namespace that
> pyxb is complaining about?
>
> (I think the schema files were generated with Rational Rose,
> and seem to reference xmlbeans. Does that matter?)
>
> Thanks,
>
> Wendell
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> pyxb-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pyxb-users
>
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
pyxb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyxb-users