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 UTC