[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Determinization in case of ambiguity or Should XML validators report on schemas that violate the UPA constraint?

From: Michael Kay <mike@saxonica.com>
Date: Tue, 17 Apr 2007 12:11:18 +0100
To: "'Shlomo Yona'" <S.Yona@F5.com>, "'Henry S. Thompson'" <ht@inf.ed.ac.uk>
Cc: <xmlschema-dev@w3.org>
Message-ID: <006a01c780e1$265833a0$a30f210a@turtle>
RE: Determinization in case of ambiguity or Should XML validators report on schemas that violate the UPA constraint?

> 
> I had another example where an xsd:sequence with an implied 
> minOccurs="1" and maxOccurs="1" contains particles with minOccurs="0".
> What is the expected behavior when none of these particles 
> appear in an XML instance?

It's quite valid to have a sequence with minOccurs="1" that contains an
element with minOccurs="0". Conceptually it means that the sequence must
occur, but if all the elements within the sequence are optional, then the
sequence is allowed to be empty. Of course in an instance document you can't
tell the difference between an empty sequence and an absent sequence, so you
might as well have written minOccurs="0" on the whole sequence, but in the
grammar they are subtly different.

Michael Kay
http://www.saxonica.com/
Received on Tuesday, 17 April 2007 11:11:52 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.