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: Rick Jelliffe <rjelliffe@allette.com.au>
Date: Tue, 28 Apr 2009 17:55:18 +1000
Message-ID: <49F6B666.6030703@allette.com.au>
To: xmlschema-dev@w3.org
Michael Kay wrote:

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

So they actually had no reason? Just some vague possibility. (This used to 
drive me bananas years ago on the XSD working group, and something I've never 
found on any other group: usually fictitious problems are not given much 
credence...  Or is it a sign that XSD is so complex that the ramifications
of change cannot be thought through?...)

I apologize for harping and sniping so much, but that approach may seem
conservative and prudent, but it is neither. Conservatism would say "Lets 
see what other schema languages do, and follow approaches that are proven." 

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

Fortunately, you don't need to imagine. Schematron came out *before* XSD 
1.0. There is 9+ years
experience in using document(). There has never been a single reported 
problem. Document() is widely used and approved of.

XSD needs to be solving the problems of 2010. I think the new changes 
don't even address the problems that were clear to me in 1999. To be 
talking of external codelists as if they were something novel or strange 
is startling to me.

The WG should be aware the trend is to move beyond fixed external 
codelists, to keyed external
code lists. A good example are some Geospatial standards, which link to 
codepoints with a URL fragment, e.g.
    http://www.eg.com/codelist/countries.xml#AUS
where the AUS is an IDREF to some fragment in the countries.xml, which 
then has some field values used for testing.

Cheers
Rick Jelliffe
Received on Tuesday, 28 April 2009 07:56:03 GMT

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