W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2009

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>
> 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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:15:11 GMT