W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2011

Re: Classroom critique of XML Schema 1.1

From: Andrew Welch <andrew.j.welch@gmail.com>
Date: Sat, 19 Mar 2011 18:59:10 +0000
Message-ID: <AANLkTi=H+APFqBthPJkCNAYMGggo4DVW5htDbPzU6+W_@mail.gmail.com>
To: "Costello, Roger L." <costello@mitre.org>
Cc: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
On 19 March 2011 17:10, Costello, Roger L. <costello@mitre.org> wrote:
> Hi Andrew,
>
>> Don't forget that XSD can stream xml to validate it, hence the 'look
>> down' restriction.  Full XPath requires the whole document in memory.
>
> That's an excellent point.
>
> However, the XML Schema language should not force a schema designer to always look down just so that implementations can support streaming. If it is important for a schema designer to make use of streaming then he will design his XML Schema <assert> elements to always look down, but if streaming is not important to him then his <assert> elements should be able to look anywhere, including across documents.
>

Streaming is a big deal, the benefits far outweigh the costs imho.

Regarding assertions looking across documents, this is getting into
the blurry area of how much of the logic goes into the XSD, and how
much goes into the application that parses the xml.  With assertions
you can really load the XSD with all sorts of "business rules" that
could/should be left for the application to check, and then provide
suitable failure messages rather than the typical cryptic xsd error
messages.



-- 
Andrew Welch
http://andrewjwelch.com
Received on Saturday, 19 March 2011 18:59:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 19 March 2011 18:59:43 GMT