users@jaxb.java.net

Re: Need a small help

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Thu, 15 Jun 2006 09:12:44 -0700

Kishore G wrote:
> 1. I have two xsd that needs to be compiled by jaxb 2.0. But both the
> xsd's are having a common namespace, I compile these schemas dynamically
> (sequentially) in my code(using ant task) and because of this objectfatory
> is getting over ridden when I am compiling the second schema. Is there any
> nice way to over come this or I have make sure that xsd name spaces are
> unique.

Even if they share the same namespace, unless they define duplicates you
should be able to compile them at one.

Alternatively, you can also compile them separately and put them into
different packages.

> 2. I am looking for a xsd parser. Searched on net could not find one.
> Basically I want to see the xsd in a xml format( the only thing is it has to
> understand xs:import and xs:include). Please point me to the correct Java
> library to use for this.

Have you looked at http://xsom.dev.java.net/ ?


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com