RE: [xml-dev] A single, all-encompassing data validation language - good or bad for the marketplace?

From
Michael Kay <>
To
'Chris Scott' <>
Date
2007-08-07T13:09:11Z
ID
<015101c7d8f4$2591cb00$313410ac@turtle>
Thread
RE: [xml-dev] A single, all-encompassing data validation language - good or bad for the marketplace?
> What if we have, however, a rule like
> 
> //@bodyType='Regular'/descendant::node()/@color = 
> /Factory/Chasis[@bodyType='Regular']/Colors/Color
> 
> under which node would we place the assertion declaration?  

You ask the question "what is the smallest subtree that can be considered
valid or not valid under this constraint, independently of its context?",
and you put the assertion on the complex type that defines that subtree. In
this case, because your assertion uses leading "/", that's the document as a
whole - though I would argue that it should really be a constraint on the
type of the outermost element.

Michael Kay
http://www.saxonica.com/