[dsdl-discuss] Re: Schemas: "is" or "ought"

From: Rick Jelliffe <ricko@topologi.com>
Date: Wed Jul 03 2002 - 15:52:44 UTC

From: "G. Ken Holman" <gkholman@CraneSoftwrights.com>

> Aren't these interchangeable?
>
> >ISO DSDL, at least the visible/prospective parts of it so far (RELAX NG,
> >Schematron), really only concerned with "ought-to-be"?
> >
> >What is our story on this?

An example of the difference would be with XPath 2

When a schema is taken to be a "necessarily is", then an XPath implementation
could optimize out impossible paths, rewriting the query for efficiency. This, of
course, prevents Schematron and uses of XPath where you want to look at the
data even if it is invalid.

For example, if the schema says element a
can only appear in an element b, and an element b can only appear in
an element c, then the XPath //a can be rewritten //c/b/a which might
(in some implementation) be more efficient.

When the schema is used as an "ought-to-be", then an Xpath would not
use the schema to rewrite paths in that way.

Cheers
Rick

--
DSDL members discussion list
To unsubscribe, please send a message with the
command  "unsubscribe" to dsdl-discuss-request@dsdl.org
(mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)
Received on Wed Jul 3 11:38:53 2002

This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:00:27 UTC