I've noticed that getContentModel() on a SchemaParticle with only one child
will return a SchemaLocalElement instead of a sequence containing one child. 
For example, consider:

        <xs:complexType name="MyComponentType">
                <xs:complexContent>
                        <xs:extension base="base:ComponentType">
                                <xs:sequence>
                                        <xs:element name="childElement" 
type="domain:ChildType" nillable="true"
maxOccurs="unbounded"/>
                                </xs:sequence>
                        </xs:extension>
                </xs:complexContent>
        </xs:complexType>
        
If myComponentType represents the SchemaType for MyComponentType, then
myComponentType.getContentModel() returns a SchemaLocalElement named
childElement.  I would expect the content model to be a SchemaParticleImpl
with a particle type of SEQUENCE.

Doesn't this alter the semantics of the XML structure?  If I have some code
that expects to treat sequences differently from elements, this would break
it.
-- 
View this message in context: 
http://www.nabble.com/SchemaParticle-content-model-for-single-children-tp18756901p18756901.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to