[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: DTD vs XSD: No Duplicate Types in (Mixed) ContentModels
Hello Maik, I think XSD processors make a difference because of the Unique Particle Attribution Constraint, mentioned in the XML Schema specification: http://www.w3.org/TR/xmlschema-1/#cos-nonambig "A content model must be formed such that [...] the particle component contained [...] therein with which to attempt to validate each item in the sequence in turn can be uniquely determined [...] without any information about the items in the remainder of the sequence." Your example corresponds to what is said in the non-normative part H: http://www.w3.org/TR/xmlschema-1/#non-ambig "A content model will violate the unique attribution constraint if it contains two particles which overlap and which [...] may validate adjacent information items and the first has {min occurs} less than {max occurs}." The last two xs:element particles in your first example (below) seem to fulfill this criterion. I hope this helps? Kind regards, Ghislain On Jan 31, 2011, at 3:27 PM, Maik Stührenberg wrote: > It would be interesting to know why XSD processors do make a difference > between > > <xs:element name="a"> > <xs:complexType> > <xs:sequence> > <xs:element ref="b"/> > <xs:element ref="b"/> > <xs:element ref="b"/> > <xs:element ref="b" minOccurs="0" maxOccurs="1"/> > <xs:element ref="b" minOccurs="0" maxOccurs="1"/> > </xs:sequence> > </xs:complexType> > </xs:element> > > and > > <xs:element name="a"> > <xs:complexType> > <xs:sequence> > <xs:element ref="b" minOccurs="3" maxOccurs="5"/> > </xs:sequence> > </xs:complexType> > </xs:element>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|