Hi Tina,
In your example the complexType name is null indeed even though the
complexType itself is not null:
<xs:complexType>
<xs:complexContent>
<xs:extension base="vdexType"/>
</xs:complexContent>
</xs:complexType>
If I understood correcly you are interested in retrieving the name of
the base right? What you can do is use the getBaseType() method from the
ComplexType class to retrieve the base type and then you can get its
name using getName()
Does it solve your problem?
Arnaud
> -----Original Message-----
> From: Tina Manoharan [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 27, 2003 12:15 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] Element -> ComplexContent -> Extension
>
>
>
> Hi Arnaud,
>
> Thanks for you help.
>
> Here is a simple example of my problem (sorry I dont think
> that I expressed my problem well in words before, but hope
> these files and output will make more sense). Ok, these are
> the attachments:
>
> 1) ReadSchema.java
> 2) TestSchema.java
> 3) 2 schema versions (imsvdex_1.xsd, imsvdex_2.xsd)
> 4) output.txt
>
> * I am sure you know this*, but I thought I will
> mention that you
> will also require "xercesImpl.jar" when running the program.
>
> The "output.txt" shows the outputs when using the 2 different
> versions of the same schema.
>
> Thank you,
> Tina
>
>
>
> > Hi Tyna,
> >
> > I've just tried the example with the CVS version of Castor
> and it is
> > working fine for me. Can you please post the code you are using?
> >
> > Arnaud
> > > -----Original Message-----
> > > From: Tina Manoharan [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, August 26, 2003 3:18 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [castor-dev] Element -> ComplexContent -> Extension
> > >
> > >
> > >
> > > Hello All,
> > >
> > > There is an element "elem1" with complexType "type1" in
> > > my schema as shown below:
> > >
> > > 1)
> > > <xs:element name="elem1" block="#all">
> > > <xs:complexType>
> > > <xs:complexContent>
> > > <xs:extension base="type1"/>
> > > </xs:complexContent>
> > > </xs:complexType>
> > > </xs:element>
> > >
> > >
> > > 2)
> > > <xs:complexType name="type1">
> > > <xs:sequence>
> > > <-----elements & attributes---->
> > > </xs:sequence>
> > > </xs:complexType>
> > >
> > >
> > >
> > > Now, when I do
> > >
> > > XMLType xmlType = elementDecl.getType();
> > >
> > >
> > > The xmlType is "null".
> > >
> > >
> > > However, if the schema is changed to:
> > >
> > > 1) <xs:element name="elem1" type="type1" block="#all"/>
> > >
> > > Then it works fine, I get the xmlType and it also identifies
> > > as ComplexType.
> > >
> > > But, I would like to know if there is a way I can get
> > > the complexType from the original schema. Please help
> > > me with this problem.
> > >
> > > Thank you,
> > > Tina
> > >
> > > -----------------------------------------------------------
> > > 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
> >
> >
>
> --
> -----------------------------------------------
> Dr. Tina Manoharan
> Research Associate, ICBL, Rm. G41,
> Heriot Watt University, Edinburgh EH14 4AS, UK.
> Tel: (+44) 131 451 3280, (+44) 7740 959483
> Web: http://www.macs.hw.ac.uk/~ceetm2
> -----------------------------------------------
>
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev