Thank you very much Keith.
This was really helpful.
This castor schema implementation is great, and it's a pity
there is so little documentation on it (or maybe I just couldn't find one?).

I still don't really understand few moments of this implementation and I
would really like
to make them clear to myself. Sorry if I am being boring with this.

If you or anybody else could explain in short, or point me to a resource
explaining this,
it would be really great.

* Given an element name, can I get list of element names that can contain
this element as a child?
* Given an attribute name, can I get list of element names that can contain
this attribute?
* If an element or an attribute has simple type with enumeration, how can I
get values allowed in element/attribute?
* Can I find out which element is the root element for the xml defined by
the schema? And which elements can appear
   only once in the xml, or are required to appear?

I apologise for the amount of questions. I just try to sort it all out for
myself.
I could probably find answers by myself, if there would be some kind of a
tutorial or some examples
of how to use castor's schema package, but as I said, I can't find anything.

I appreciate your help and effort.

Thank you very much

Anna

----- Original Message ----- 
From: "Keith Visco" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 16, 2004 15:50
Subject: Re: [castor-user] [XML] Schema complexContent extension


>
>
> Anna,
>
> Just get the base type and call the #enumerate method.
>
> XMLType base = complexType.getBaseType().
>
> if (XMLType.isComplexType()) {
>     ComplexType ctBase = (ComplexType);
>     Enumeration enum = ctBase.enumerate();
>     while (enum.hasMoreElements()) {
>        Structure struct = (Structure) enum.nextElement();
>        ...
>     }
> }
>
> --Keith
>
> > Anna Afonchenko wrote:
> >
> > Is there a way to get the elements defined in the extension of the
> > complexContent for a complexType element?
> > E.g., given following schema snippet if I have ElementDecl holding the
> > div element, can I get the extension elements?
> > I can't find anything like this in the API.
> >
> > <xs:element name="div">
> >
> > <xs:annotation>
> >
> > <xs:documentation>
> >
> > generic language/style container
> >
> > </xs:documentation>
> >
> > </xs:annotation>
> >
> > <xs:complexType mixed="true">
> >
> > <xs:complexContent mixed="true">
> >
> > <xs:extension base="Flow">
> >
> > <xs:attributeGroup ref="attrs"/>
> >
> > </xs:extension>
> >
> > </xs:complexContent>
> >
> > </xs:complexType>
> >
> > </xs:element>
> >
> > Thank you very much for help.
> >
> > Anna
> >
> >     ---------------------------------------------------------------
> > -----------------------------------------------------------
> > If you wish to unsubscribe from this mailing, send mail to
> > [EMAIL PROTECTED] with a subject of:
> >         unsubscribe castor-user
>
>
>
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-user
>



----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to