users@jaxb.java.net

XSComplexType

From: <HeruMartinus.Salim_at_infineon.com>
Date: Wed, 15 Nov 2006 11:05:31 +0100

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).

But when I go inside Javadoc of XSContentType there are only these methods exist, inbetween none represent what I'm looking for. (I'm going to get the types of those sequence/option):
apply <https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSContentType.html#apply%28com.sun.xml.xsom.visitor.XSContentTypeFunction%29> (XSContentTypeFunction <https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/visitor/XSContentTypeFunction.html> <T> function)
                    
 XSContentType <https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSContentType.html> asEmpty <https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSContentType.html#asEmpty%28%29> ()
          If this content type represents the empty content, return this, otherwise null.
 XSParticle <https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSParticle.html> asParticle <https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSContentType.html#asParticle%28%29> ()
          Equivalent of (this instanceof XSParticle)?this:null
 XSSimpleType <https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSSimpleType.html> asSimpleType <https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSContentType.html#asSimpleType%28%29> ()
          Equivalent of (this instanceof XSSimpleType)?this:null
 void visit <https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSContentType.html#visit%28com.sun.xml.xsom.visitor.XSContentTypeVisitor%29> (XSContentTypeVisitor <https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/visitor/XSContentTypeVisitor.html> visitor)
                   
Any guidance?
Thanks
Best regards,
Heru