You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlbeans-user@xml.apache.org by "Yogesh L. Simmhan" <ys...@cs.indiana.edu> on 2004/02/11 21:58:08 UTC

Retaining objects in schema imports

I have a schema (say target NS='foo') in file foo.xsd that imports elements from
another namespace (say NS='bar') in file bar.xsd. I have already generated Xml
Bean objects for the schema 'bar' using an ant script on the bar.xsd file and
the compiled class files are available in a jar file, say bar_xbeans.jar. 

Is it possible to retain the java files already generated for NS 'bar' and only
generate new xml bean objects for the 'foo' NS? Is there any way I can tell
xmlbeans of the existence of bar_xbeans.jar through the ant task so that the
class files already present it it are not regenerated?

I want to be able to distribute bar_xbeans.jar without it having to be modified
and allow users to extend elements in the bar schema in their own foo schema and
generate bean objects only for elements in their foo schema.

Regards,
--Yogesh



- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Retaining objects in schema imports

Posted by David Bau <da...@hotmail.com>.
Yogesh, you should be able to put bar_xbeans.jar on the "classpath" argument
for the xmlbeans ant task to tell the ant task about the preexisting
compiled XSDs.  The compiled bar_xbeans.jar contains not only the compiled
Java binaries, but a linkable compiled schema binary for bar.xsd.

So when you put bar_xbeans.jar on your classpath, you won't need to include
bar.xsd in your sources when you compile.  You should be able to just have
foo.xsd inherit from (or reference) schema types in bar.xsd, and things
should work just as you'd expect (the Java classes should inherit from the
java classes in bar_xbeans.jar etc).

David
----- Original Message ----- 
From: "Yogesh L. Simmhan" <ys...@cs.indiana.edu>
To: <xm...@xml.apache.org>
Sent: Wednesday, February 11, 2004 3:58 PM
Subject: Retaining objects in schema imports


> I have a schema (say target NS='foo') in file foo.xsd that imports
elements from
> another namespace (say NS='bar') in file bar.xsd. I have already generated
Xml
> Bean objects for the schema 'bar' using an ant script on the bar.xsd file
and
> the compiled class files are available in a jar file, say bar_xbeans.jar.
>
> Is it possible to retain the java files already generated for NS 'bar' and
only
> generate new xml bean objects for the 'foo' NS? Is there any way I can
tell
> xmlbeans of the existence of bar_xbeans.jar through the ant task so that
the
> class files already present it it are not regenerated?
>
> I want to be able to distribute bar_xbeans.jar without it having to be
modified
> and allow users to extend elements in the bar schema in their own foo
schema and
> generate bean objects only for elements in their foo schema.
>
> Regards,
> --Yogesh
>
>
>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
> Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
>
>
>


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Retaining objects in schema imports

Posted by David Bau <da...@hotmail.com>.
Yogesh, you should be able to put bar_xbeans.jar on the "classpath" argument
for the xmlbeans ant task to tell the ant task about the preexisting
compiled XSDs.  The compiled bar_xbeans.jar contains not only the compiled
Java binaries, but a linkable compiled schema binary for bar.xsd.

So when you put bar_xbeans.jar on your classpath, you won't need to include
bar.xsd in your sources when you compile.  You should be able to just have
foo.xsd inherit from (or reference) schema types in bar.xsd, and things
should work just as you'd expect (the Java classes should inherit from the
java classes in bar_xbeans.jar etc).

David
----- Original Message ----- 
From: "Yogesh L. Simmhan" <ys...@cs.indiana.edu>
To: <xm...@xml.apache.org>
Sent: Wednesday, February 11, 2004 3:58 PM
Subject: Retaining objects in schema imports


> I have a schema (say target NS='foo') in file foo.xsd that imports
elements from
> another namespace (say NS='bar') in file bar.xsd. I have already generated
Xml
> Bean objects for the schema 'bar' using an ant script on the bar.xsd file
and
> the compiled class files are available in a jar file, say bar_xbeans.jar.
>
> Is it possible to retain the java files already generated for NS 'bar' and
only
> generate new xml bean objects for the 'foo' NS? Is there any way I can
tell
> xmlbeans of the existence of bar_xbeans.jar through the ant task so that
the
> class files already present it it are not regenerated?
>
> I want to be able to distribute bar_xbeans.jar without it having to be
modified
> and allow users to extend elements in the bar schema in their own foo
schema and
> generate bean objects only for elements in their foo schema.
>
> Regards,
> --Yogesh
>
>
>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
> Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
>
>
>


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/