users@jaxb.java.net

Re: Schema creation: telling JAXB a schema has already been generated

From: Tina_C <colemanserious_at_gmail.com>
Date: Fri, 21 Mar 2008 13:02:47 -0700 (PDT)

Similar to Eric's question, I'd like to extend his CLASS A, such that I now
have a Class C extending Class A. From a schema perspective, I'm able to do
that through an import of SCHEMA A, and then a xs:extension whose base is A.
However, generating my Class C, my generator tries to generate ALL code
rather than reference the classes in the jar.

Has anyone found a way to reference an XSD in a jar via schemaLocation
without extracting the files from the jar? (I'm using the Sun JAXB
reference implementation: thought I saw a schemaLocation="classpath://" in
some postings online, but doesn't seem to work for Xerces.)


boldra wrote:
>
> Hello,
>
> I have written a schema ("SCHEMA A") and generated the corresponding
> classes
> ("CLASSES A1,A2"). Then I created a jar of the classes and published the
> schema, all o.k..
> Now I am writing a new class ("CLASS B") which has a field of type "CLASS
> A1". I would like to generate the schema "SCHEMA B" from "CLASS B" and
> would
> like the schema to import the definitions from "SCHEMA A" without having
> to
> regenerate them. Is it possible?
>
> Thanks in advance, great work!
>
> Enrico Boldrini
>
>

-- 
View this message in context: http://www.nabble.com/Schema-creation%3A-telling-JAXB-a-schema-has-already-been-generated-tp15457371p16206913.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.