[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
RE: [xml-dev] A single, all-encompassing data validation language -good or bad for the marketplace?
- From: Michael Kay <mike@saxonica.com>
- To: 'Chris Scott' <scott.chris@gmail.com>
- Date: Tue, 07 Aug 2007 14:09:11 +0100
> 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/
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]