users@jaxb.java.net

Re: Namespaces in marshalled Node

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 29 Jul 2003 08:27:08 -0700

Jeroen Breedveld <jeroenb_at_x-hive.com> wrote:
> For some reason on the newly created nodes a namespace is set but it is
> not set to the 'targetNamespace' (only the root-element). Of course when
> all subelements wouldn't have the default namespace attributes xmlns
> everything would be in the correct namespace
> 'http://www.mycomp.com/user'.
> I suspect this could be a incompatibilty between the DOM implementation
> I use (from X-Hive/DB) and the one (I think) most use namely Xerces.
> Could somebody confirm this or tell me what I doing wrong?

Well, it's actually just another XML Schema question. Add
elementFormDefault="qualified" to the <xs:schema> element.

This is just one of many reasons I don't like XML Schema...

regards,
--
Kohsuke Kawaguchi                  408-276-7063 (x17063)
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com