OK. I looked at the test case. Sorry for taking time before getting back
to you.
I think this is an operator error.
The problem is, you are using three namespaces. One is the empty
namespace used for all the elements, another is the
http://www.w3.org/2001/XMLSchema-instance namespace, and the third is
the "ebagent" namespace.
The first namepsace is used in the schema, so the JAXB RI realizes that
it needs to be available. The latter two is requested to be declared by
your prefix mapper.
Now the JAXB RI needs to allocate prefixes to those three namespaces.
Firstly, by the XML namespace rec, the empty namespace needs to be bound
to the default prefix, so that associatation is fixed right away.
For XMLSchema-instance namespace, your prefix mapper suggests "xsi",
which is not used, so that association is also allocated as expected.
Now, with the third "ebagent" namespace, your prefix mapper suggests "",
but that's already taken for the empty namespace. So the JAXB RI can't
take that suggestion. That's why it ends up generating "ns1".
Looking at the schema, I'm not sure why you need to declare the ebagent
namespace, because it isn't used at all.
I'm sorry if I'm rude here, but I suspect you might have some
misunderstanding in the way namespaces work in XML.
regards,
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net