Thanks a lot for your reply, Robert.
Since you mentioned imported schemas, I have more
questions about this. I have two simple schemas:
info.xsd:
......
<xs:complexType name="auditInfo">
<xs:all>
<xs:element name="createdBy" type="xs:string"/>
</xs:all>
</xs:complexType>
......
message.xsd:
<xs:import schemaLocation="info.xsd"
namespace="http://www.w3.org/2001/XMLSchema"/>
<xs:complexType name="auditMessage">
<xs:all>
<xs:element name="id" type="xs:string"/>
<xs:element name="info"
type="wo:info" minOccurs="1" maxOccurs="1" />
</xs:all>
</xs:complexType>
My intention is to have Message class include a
Info object, that is, Message has a uni-directional
association with Info.
After I generated source for these two schemas, I
found Message class include a Object, but not Info
object.
Can Castor do this type of thing?
regards,
--- [EMAIL PROTECTED] wrote:
>
> Just repeat the <java></java> section for the 2nd
> schema but change the xsd name and possibly the
> package name if it is different. If you are
> importing one schema into another, you can just
> generate the main schema and add the option
> "generateImportedSchemas" to the SourceGenerator.
>
> Robert
> >
> > Hello, guys,
> >
> > I have looked through samples generating source
> using
> > ant task, all samples seem to only generate java
> > source for one xsd file, such as the following:
> > <target name="srcgen" depends="clean"
> > description="srcgen">
> > <java classpathref="base.path"
> >
>
classname="org.exolab.castor.builder.SourceGenerator"
> > fork="true">
> > <arg value="-i" />
> > <arg value="ship.xsd" />
> > <arg value="-package" />
> > <arg value="com.u2d.shipgen" />
> > <arg value="-types" />
> > <arg value="j2" />
> > <arg value="-dest" />
> > <arg value="src" />
> > </java>
> > </target>
> >
> > Could anyne who has done this advise me on how I
> > generate java source with multiple xsd files?
> >
> > thanks
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail SpamGuard - Read only the mail you
> want.
> > http://antispam.yahoo.com/tools
> >
> >
>
-----------------------------------------------------------
>
> > If you wish to unsubscribe from this mailing, send
> mail to
> > [EMAIL PROTECTED] with a subject of:
> > unsubscribe castor-dev
> >
>
>
-----------------------------------------------------------
>
> If you wish to unsubscribe from this mailing, send
> mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev