users@jaxb.java.net

Re: Namespace problems with imported schemas

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Thu, 03 Apr 2003 08:00:58 -0800

> How can I get rid of the multiple xmlns:rfc namespace settings and set
> it once in NEW_MODIFY (xmlns:rfc="urn:test:rfc")?

I think Megginson's XMLWriter has an option to force you to declare a
binding at the root node. I think the method name is something like
"forceDecl" but forgot the exact name.

Or perhaps Xerces XMLSerializer might have one. Or you can even write
your own XMLFilter that adds this declaration.

> Newbie question: Any hints about documentation describing the urn:*
> -Syntax (I guess there is one)? Why does xjb create a test/rfc directory
> and not urn/test/rfc?

See the spec appendix C.5.

But don't expect a computer program to magically figure out the exact package
name you want. You can always override it by a customization and you
should.


> URN=Uniform Resource Name???

Yes.

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