Re: Attributes ordering

Does the same hold good, if wildcard is used? 

In the same mentioned example, instead of b, let's assume that a wildcard 
appears. 
=========================================================================
<xs:complexType name="test">
        <xs:sequence>
                <xs:element name="a" type="xs:string"/>
                    <xs:any namespace="##other" processContents="lax" 
minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="c" type="xs:string"/>
        </xs:sequence>
</xs:complexType>

<xs:element name="test" type="test"/>
====================================================================================
In this case, can there be instances of following possibilities,
a,b,c 
a,c,b 
b,a,c 
a,c, b, b       where b is an element of some other namespace.

I see that in some of the IETF protocols, only whenever wildcard is used, 
the order of elements inside a sequence seems strange. It simply allows 
any possibilities, almost breaking the expected sequence behavior. 
COuld this be clarified?

Kind Regards,
Nataraj.





"Pete Cordell" <petexmldev@tech-know-ware.com> 
Sent by: xmlschema-dev-request@w3.org
03/22/2007 11:27 PM


To
Nataraj Ramalingam/CHE/HSS@HSS
cc
<xmlschema-dev@w3.org>
Subject
Re: Attributes ordering







Original Message From: "Nataraj Ramalingam" <Nataraj.Ramalingam@...>

>. I have one more doubt w.r.t ordering of elements.
> consider the following example.
> =====================================================
> <xs:complexType name="test">
>        <xs:sequence>
>                <xs:element name="a" type="xs:string"/>
>                <xs:element name="b" type="xs:string" minOccurs="0"/>
>                <xs:element name="c" type="xs:string"/>
>        </xs:sequence>
> </xs:complexType>
>
> <xs:element name="test" type="test"/>
> =====================================================
>
> Eventhough we use a sequence type here, does this mandate the order of
> elements in the instance to be only a,b,c.
> Or, since "b" is optional ( minOccurs=0 ), can it (should it, by any 
means
> )come after "c" in the instance? for example, can the ordering be a,c,b?


As it's a sequence, if b is present, then it must appear between a and c 
(i.e. the same order as specified in the definition).  (so a, b, c or just 

a, c.)

The xs:all construct for the order to be changed, but there are currently 
numerous restrictions on that.

HTH,

Pete.
--
=============================================
Pete Cordell
Tech-Know-Ware Ltd
for XML to C++ data binding visit
http://www.tech-know-ware.com/lmx/

http://www.codalogic.com/lmx/

=============================================






***********************  Aricent-Private   ***********************
"DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of 
the individual to whom it is addressed. It may contain privileged or confidential information and should not be 
circulated or used for any purpose other than for what it is intended. If you have received this message in error, 
please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly
prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility for 
loss or damage arising from the use of the information transmitted by this email including damage from virus."

Received on Thursday, 22 March 2007 18:48:57 UTC