Altova Mailing List Archives>Archive Index >xml-dev Archive Home >Recent entries >Thread Prev - A single, all-encompassing data validation language - good or bad for the marketplace? [Thread Next] RE: [xml-dev] A single, all-encompassing data validation language -good or bad for the marketplace?To: 'Chris Scott' <scott.chris@-----.---> Date: 8/7/2007 1:09:00 PM > 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/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
