...here's the specific url that Keith is referring to:
http://castor.exolab.org/sourcegen.html#The-'type'-method
> -----Original Message-----
> From: Keith Visco [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 26, 2003 2:47 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] Why does SourceGenerator
> generate two classes for each element?
>
>
>
>
> It's not generating two classes for each element, it's
> generating one
> class for the element definition and one class for the
> type (more than
> one element can use the same type).
>
> If you only want the one class for the type to be
> generated, then you
> can modify the castorbuilder.properties file and change the
> javaclassmapping option to "type" instead of the
> default "element"
> method. The differences between the two options are
> explained on the
> website.
>
> --Keith
>
>
> [EMAIL PROTECTED] wrote:
> >
> > When I generate source code using the
> SourceGenerator, I get TWO classes for the
> > extraData element:
> >
> > ExtraData and ExtraDataType
> >
> > ExtraData is a subclass of ExtraDataType.
> >
> > Why is it generating two classes instead of just one?
> There doesn't seem to be
> > any reason. ExtraData doesn't have any new methods
> or fields. The methods
> > that it does have for marshalling are identical to
> the ones in the super or
> > parent class. Is this a bug in the SourceGenerator,
> a design problem with our
> > schema or a workaround for some Java language limitation?
> >
> > Here's a snippet of the schema that has been sanitized a bit:
> >
> > <xsd:complexType name="listType">
> > <xsd:sequence>
> > <xsd:element name="item" minOccurs="1"
> maxOccurs="unbounded">
> > <xsd:complexType>
> > <xsd:sequence>
> > <xsd:element name="extraData"
> type="extraDataType" minOccurs="1"
> > maxOccurs="1"/>
> > </xsd:sequence>
> > <xsd:attribute name="itemID" type="xsd:ID" use="required"/>
> > <xsd:attribute name="label" type="xsd:string"
> use="optional"/>
> > </xsd:complexType>
> > </xsd:element>
> > </xsd:sequence>
> > </xsd:complexType>
> >
> > <xsd:complexType name="extraDataType">
> > <xsd:sequence>
> > <xsd:element name="company" type="xsd:string" minOccurs="1"
> > maxOccurs="unbounded"/>
> > <xsd:element name="person" type="xsd:string" minOccurs="1"
> > maxOccurs="unbounded"/>
> > </xsd:sequence>
> > <xsd:attribute name="ID" type="xsd:ID" use="required"/>
> > </xsd:complexType>
> >
> > -----------------------------------------------------------
> > 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
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev