From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 15 Nov 2006 18:13:48 -0800
HeruMartinus.Salim_at_infineon.com wrote:
> Hello,
>
> Any idea how to get the defined attribute (sequence/option) inside the complexType using class XSComplexType?
> <xsd:complexType name="Block">
> <xsd:complexContent>
> <xsd:extension base="essence:SingleSourceNode">
> <xsd:sequence>
> <xsd:element maxOccurs="unbounded" minOccurs="0" name="varDef" type="essence:VarDef"/>
> </xsd:sequence>
> </xsd:extension>
> </xsd:complexContent>
> </xsd:complexType>
>
> My "Guess" is to use the method getExplicitContent() which return an object of interface XSContentType. (At least that's what I get from the explanation of this method).
Yep. XSContentType is a super interface. You'd downcast that to one of
the three. In your case you should see a XSParticle, and then XSParticle
should contain an XSTerm which is actually XSModelGroup, and that's the
sequence.