Hi!
If you are a parser and see the element
UniqueId
what model will you choose ?
> <xs:sequence>
> <xs:element name="UniqueId" type="UniqueIdType" maxOccurs="2"/>
> <xs:element name="HotelReservations" type="HotelReservationsType"
> minOccurs="0"/>
> </xs:sequence>
or
> <xs:sequence>
> <xs:element name="UniqueId" type="UniqueIdType" minOccurs="0"
> maxOccurs="2"/>
> <xs:element name="HotelReservations"
type="HotelReservationsType"/>
> </xs:sequence>
?
You see, both models accept UniqueId as starting element.
See also http://www.w3.org/TR/xmlschema-1/#cos-nonambig and
http://www.w3.org/TR/xmlschema-1/#non-ambig for more details.
All the best,
George
-------------------------------------------------------------
George Cristian Bina mailto:[EMAIL PROTECTED]
COO - sync.ro
Phone +40-(0)251-461480, +40-(0)251-461481
Fax +40-(0)251-461482
Mobile +40-(0)723-224067
SyncRO Soft srl, Bd N. Titulescu 170, Craiova, 1100 - Romania
http://www.sync.ro
<oXygen/> XML Editor - http://www.oxygenxml.com/
----- Original Message -----
From: "Olivier LAMY" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 16, 2002 11:21 AM
Subject: Rule Unique Particle Attribution
> Hello,
> Why the fragment below is a violation of Unique Particle Attribution rule
?
> <xs:choice>
> <xs:sequence>
> <xs:element name="UniqueId" type="UniqueIdType" maxOccurs="2"/>
> <xs:element name="HotelReservations" type="HotelReservationsType"
> minOccurs="0"/>
> </xs:sequence>
> <xs:sequence>
> <xs:element name="UniqueId" type="UniqueIdType" minOccurs="0"
> maxOccurs="2"/>
> <xs:element name="HotelReservations"
type="HotelReservationsType"/>
> </xs:sequence>
> </xs:choice>
> Xerces version 2.0.2 !
> Olivier
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]