You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by ps...@telecom.ntua.gr on 2007/04/04 14:19:30 UTC

Information about the elements included in a "sequence"

Hi all,

assuming that the following code is a part of a schema,
is there any way to find out, through the XMLBeans API, information
about the elements included in a "sequence"?

For example, that the element named "date":
-> belongs to a "sequence" of elements
-> precedes to the element named "line-item"
-> comes after to element named "customer"
and the sequence includes the elements "customer", "date" and "item-line"


code:
~~~~
<xs:complexType>
            <xs:sequence>
                <xs:element name="customer" type="po:customer"/>
                <xs:element name="date" type="xs:dateTime"/>
                <xs:element name="line-item" type="po:line-item"
minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="shipper" type="po:shipper" minOccurs="0"
maxOccurs="1"/>
            </xs:sequence>
</xs:complexType>



Regards,

John Psoroulas






---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


RE: Information about the elements included in a 'sequence'

Posted by ps...@telecom.ntua.gr.
Cezar,

I really appreciate your help,

thanks a lot,

John

On Wed, April 4, 2007 17:44, Cezar Andrei wrote:
> Hi John,
>
>
> You are looking for getContentModel() on SchemaType which returns a
> SchemaParticle. Sequence, all, choice along with element and wildcard
> are all SchemaParticles. The order in a sequence, like in your example, is
> provided by getParticleChildren() on the sequence SchemaParticle.
>
> Cezar
>
>
>> -----Original Message-----
>> From: psoroulas@telecom.ntua.gr [mailto:psoroulas@telecom.ntua.gr]
>> Sent: Wednesday, April 04, 2007 7:20 AM
>> To: user@xmlbeans.apache.org
>> Subject: Information about the elements included in a "sequence"
>>
>>
>> Hi all,
>>
>>
>> assuming that the following code is a part of a schema, is there any way
>> to find out, through the XMLBeans API, information about the elements
>> included in a "sequence"?
>>
>> For example, that the element named "date":
>> -> belongs to a "sequence" of elements
>> -> precedes to the element named "line-item"
>> -> comes after to element named "customer"
>> and the sequence includes the elements "customer", "date" and
> "item-line"
>
>>
>>
>> code:
>> ~~~~
>> <xs:complexType>
>> <xs:sequence>
>> <xs:element name="customer" type="po:customer"/>
>> <xs:element name="date" type="xs:dateTime"/>
>> <xs:element name="line-item" type="po:line-item"
>> minOccurs="0" maxOccurs="unbounded"/> <xs:element name="shipper"
>> type="po:shipper"
>>
> minOccurs="0"
>> maxOccurs="1"/> </xs:sequence>
>> </xs:complexType>
>>
>>
>>
>>
>> Regards,
>>
>>
>> John Psoroulas
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
>> For additional commands, e-mail: user-help@xmlbeans.apache.org
>>
>
>
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


RE: Information about the elements included in a "sequence"

Posted by Cezar Andrei <ce...@bea.com>.
Hi John,

You are looking for getContentModel() on SchemaType which returns a
SchemaParticle. Sequence, all, choice along with element and wildcard
are all SchemaParticles. The order in a sequence, like in your example,
is provided by getParticleChildren() on the sequence SchemaParticle.

Cezar

> -----Original Message-----
> From: psoroulas@telecom.ntua.gr [mailto:psoroulas@telecom.ntua.gr]
> Sent: Wednesday, April 04, 2007 7:20 AM
> To: user@xmlbeans.apache.org
> Subject: Information about the elements included in a "sequence"
> 
> Hi all,
> 
> assuming that the following code is a part of a schema,
> is there any way to find out, through the XMLBeans API, information
> about the elements included in a "sequence"?
> 
> For example, that the element named "date":
> -> belongs to a "sequence" of elements
> -> precedes to the element named "line-item"
> -> comes after to element named "customer"
> and the sequence includes the elements "customer", "date" and
"item-line"
> 
> 
> code:
> ~~~~
> <xs:complexType>
>             <xs:sequence>
>                 <xs:element name="customer" type="po:customer"/>
>                 <xs:element name="date" type="xs:dateTime"/>
>                 <xs:element name="line-item" type="po:line-item"
> minOccurs="0" maxOccurs="unbounded"/>
>                 <xs:element name="shipper" type="po:shipper"
minOccurs="0"
> maxOccurs="1"/>
>             </xs:sequence>
> </xs:complexType>
> 
> 
> 
> Regards,
> 
> John Psoroulas
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org


Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org