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

RE: [XML Schema 1.1] Using doc() in xs:assert ... the referenced document needs a schema?

From: Michael Kay <mike@saxonica.com>
Date: Mon, 27 Apr 2009 17:16:42 +0100
To: "'Costello, Roger L.'" <costello@mitre.org>, <xmlschema-dev@w3.org>
Message-ID: <ED5259A0FF7643B688B5128E4BB2CB76@Sealion>
RE: [XML Schema 1.1] Using doc() in xs:assert ...  the referenced   document needs a schema?
> I'm not clear on (b) but (a) certainly sounds like the 
> decision to disallow doc() for cross-document validation was 
> done to make it easier to implement 1.1 schema validators. 

No, I don't think that's the case. I think the working group felt that
introducing context-dependent validation (where the validity of a document
depends on factors other than the schema and the instance document) was a
risky architectural innovation, and possibly a step that would be later
regretted. I don't think implementation factors came into it once the
decision was made to support the full XPath syntax and function library. I
discovered when I tried to do it that implementation was trickier than I
thought, but it's not difficult, and certainly I don't think the WG avoided
it for that reason.

Personally, I would like to experiment/innovate with context-dependent
validation, for example by allowing assertions to reference XPath variables
supplied when the validation is invoked; perhaps even variables that can be
bound while validating an ancestor element. I think it could be a very
powerful feature - though I'm sure users would use it in ways I can't
currently imagine.

Michael Kay
http://www.saxonica.com/
Received on Monday, 27 April 2009 16:21:02 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.