users@jaxb.java.net

how to use xsom to detect the presence of xsd:choice

From: Art <ainfo_at_patteran.com>
Date: Mon, 12 Mar 2007 06:19:56 -0700

In general:

Is there any reference for xsom besides the javadoc?

On particular:

When using xsom and XSComplexType how do I determine the content?

According to the w3c the content of a ComplexType can be:

/Content: /(annotation
<http://www.w3.org/TR/xmlschema-1/#element-annotation>?, (simpleContent
<http://www.w3.org/TR/xmlschema-1/#element-simpleContent> |
complexContent
<http://www.w3.org/TR/xmlschema-1/#element-complexContent> | ((group
<http://www.w3.org/TR/xmlschema-1/#element-group> | all
<http://www.w3.org/TR/xmlschema-1/#element-all> | choice
<http://www.w3.org/TR/xmlschema-1/#element-choice> | sequence
<http://www.w3.org/TR/xmlschema-1/#element-sequence>)?, ((attribute
<http://www.w3.org/TR/xmlschema-1/#element-attribute> | attributeGroup
<http://www.w3.org/TR/xmlschema-1/#element-attributeGroup>)*,
anyAttribute <http://www.w3.org/TR/xmlschema-1/#element-anyAttribute>?))))

so for

    <xsd:complexType name="test">
        <xsd:choice>
            <xsd:element name="one" type="tns:one-type"/>
            <xsd:element name="two" type="tns:two-type"/>
        </xsd:choice>
    </xsd:complexType>

How do I tell with xsom that the elements are wrapped in a xsd:choice?

XSComplexType* getContentType*() returns XSParticle and I don't see how
to determine the presence of the xsd:choice.