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

RE: [XML Schema 1.1] I respectfully recommend these changes to <assert> and <alternative>

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Tue, 12 May 2009 10:03:57 -0400
Message-Id: <>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
At 2009-05-12 09:51 -0400, Costello, Roger L. wrote:
>Wouldn't it be easier

For the implementation?  I doubt it.  It would add a big burden for 
all validation if some validation needed access to the tree and not 
just the node.

>and better

For the user?  Perhaps, but there are other processes already geared 
for tree access.

>if the XPath was not restricted and allowed us to factor in 
>information, regardless of where it is located in the tree?

That's the problem:  "located in the [entire] tree"

Why burden all schema validation with a requirement to have access to 
the entire tree?

As I understand the way it is currently proposed the validator need 
only look at the element being validated.

Think of the performance impact and the capacities impact of what you 
are suggesting.

A validation algorithm is based on patterns, not on the entire 
tree.  The validator can successfully validate the document by 
tracking where it is amongst the patterns.  The current proposals for 
assertions can be implemented while dealing with patterns and not the 
document tree.  Going beyond that would, I imagine, introduce a 
*fundamental* difference in validation processing that members of the 
committee would outright refuse to support.

Think of validating a 20Gb document made up of:

     <log .... />
     <log .... />
     <log .... />

Very simple to validate as a pattern.  A *big* burden to support 
assertions for the entire tree.

I'm not on the committee, but I suspect the requirement to keep an 
entire document tree in memory for validation is a 
non-starter.  Whereas dealing with all of the information about an 
element and its attributes can be done easily because that is where 
the validator is at the time.

. . . . . . . . . . . Ken

XQuery/XSLT/XSL-FO hands-on training - Los Angeles, USA 2009-06-08
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/x/
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/x/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal
Received on Tuesday, 12 May 2009 14:04:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:51 UTC