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

RE: [XML Schema 1.1] Conflicting <assert> elements ... who wins?

From: Michael Kay <mike@saxonica.com>
Date: Tue, 30 Jun 2009 14:13:09 +0100
To: "'Costello, Roger L.'" <costello@mitre.org>, <xmlschema-dev@w3.org>
Message-ID: <537016F3BE6D456B8864FD527172813B@Sealion>
RE: [XML Schema 1.1] Conflicting <assert> elements ... who wins?
> 
> Suppose one <assert> element says "The value of <Publisher> 
> must be a string no longer than 140 characters." 
> 
> Another <assert> element says "The value of <Publisher> must 
> be a string no longer than 70 characters."
> 

The assertions are "anded" together: the value must satisfy all of them. In
this case it means the value must be no longer than 70.

It's quite possible to have assertions that really conflict, e.g
test="string-length() > 100" and test="string-length() < 3". In that case
there are no valid instances. Indeed, it's possible to have a single
assertion that can never be satisfied, e.g. "string-length() < 0" or more
simply, test="false()"

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 
Received on Tuesday, 30 June 2009 13:13:48 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.