Mark-
I know I've looked into this before, but I can't remember the correct
way to go about it. The two options I think I looked into were a) use
the namespace prefix in the name attribute, i.e. <bind-xml
name="a:foo" /> and b) use the QName-prefix attribute, i.e. <bind-xml
name="foo" QName-prefix="a" />. For both of these options you need to
define the namespace prefix in the mapping file (at least if you are
doing validation you must).
Sorry I can't be of more help, but I may be able to dig up an old
example. Let me know if you have more questions.
Stephen
On 3/2/06, Mark Hansen <[EMAIL PROTECTED]> wrote:
> In a mapping file, why doesn't <bind-xml> have a namespace attribute?
>
> Suppose I have this class:
>
> public class Foo {
>
> public Bar fooBar;
>
> }
>
> And I want to map it to:
>
> <foo xmlns="urn:fooSpace">
> <b:fooBar xmlns:b="urn:barSpace"/>
> </foo>
>
> My mapping file looks like this:
>
> <class name="Foo">
> <map-to xml="foo" ns-uri="urn:fooSpace"/>
> <field name="fooBar" type="Bar">
> <bind-xml name="fooBar" node="element"/>
> </field>
> </class>
>
> <class name="Bar">
> <map-to xml="bar" ns-uri="urn:someOtherSpace"/>
> ....
> </class>
>
> -------------------------------------------------
> If you wish to unsubscribe from this list, please
> send an empty message to the following address:
>
> [EMAIL PROTECTED]
> -------------------------------------------------
>
>