Hi Peter,
On Wed, Nov 25, 2009 at 3:01 PM, Peter A. Bigot <big...@acm.org> wrote:
> I can't think of a way to do that restricted to specific namespaces, but it
> might be a worthwhile enhancement. You can set global defaults:
>
>
>
> pyxb.utils.domutils.BindingDOMSupport.SetDefaultNamespace(container.Namespace,)
> pyxb.utils.domutils.BindingDOMSupport.DeclareNamespace(cdb.Namespace,
> 'cdb')
>
> which should produce the output you want, assuming that the bindings for
> the relevant namespaces are imported as modules called container and cdb.
> Whether this might impact your users' desires for a different default
> namespace is something to consider; you might want to provide a default
> declaration for your default namespace in case the user overrides it and a
> prefix is required.
>
>
> http://pyxb.sourceforge.net/userref_usebind.html#creating-xml-documents-from-binding-instances
>
> Peter
>
I thought about setting the globals as described in the link. While that
would work for this particular case, I can envision a situation where a
user might be working with several schemata, each having its own default
namespace. I think setting globals in that case would create confusion and
more trouble.
Should I file a ticket in Trac about this enhancement?
Regards,
Arne
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
pyxb-users mailing list
pyxb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyxb-users