Hi

I'm trying to understand how Castor processes namespace mappings declared
in a mapping file. It seems the documentation is incomplete.

What I would like to know is:
1) under what circumstances Castor will add a ns1:, ns2:, etc. on its own

2) why does Castor ignore a ns-prefix assignment on a map-to for nested
objects?

3) when will Castor default to using the ns-uri for exolab? i am seeing
this happen

I can upload a sample if you need more detail.

What is happening is, depending on whether or not I include an ns-prefix,
Castor is a) adding a nsx: namespace for nested objects, elements,
attributes and b) using the castor/exolab URI even if I specify my own in
map-to, again for nested objects.

I did find a reference to this on the Castor mailing list archives.

What I would like:
namespace only applied for top/root element
no nsx: namespaces anywhere

It seems from just reading the mailing list that one option is to declare
the namespace for each class mapping, xmlns:zoo="myuri", then to
explicitly state the namespace for each bind-xml element (for attributes
and elements).

>From the documentation, I had thought I only needed to do this in each
map-to element.

One problem is that I will sometimes marshall from different points in my
graph of objects, e.g.

Zoo contains Habitats which contain Animals

I may marshall an entire Zoo, a single Habitat (with animals) or an Animal.


If I can pull together enough information on this, I would be glad to add
it to the FAQ.


Many thanks--Castor is a great tool.
Patrick

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to