[dsdl-discuss] Re: Validating include statements

From: Rick Jelliffe <ricko@topologi.com>
Date: Mon Jun 30 2003 - 13:09:23 UTC

From: "Martin Bryan" <martin@is-thought.co.uk>

> Could it not be part of the Path-based constraints definition, rather than a
> separate part?

Well, anything can go almost anywhere!

I don't like making it part of Schematron because:

1) It is a special case, and therefore represents a failure in our architecture.
RELAX NG is not powerful enough to validate a Schematron schema with
<includes> (except as a kind of feasible thing), and it would cause some kind of
explosion to validate RELAX NG with <includes> using Schematron (probably
doable --in the absense of nested <include>s-- but ugly).

2) Why are schema languages special cases? Inclusions are a general
issue, especially for people wanting to move on from file entities: we
have four clear use cases to draw on:
  * Xinclude
  * RELAX NG include
  * WXS include

3) WXS does not support this kind of thing either. This gives us an opportunity
to show how modularity is beneficial. And, as Murata-san has pointed out, there
are also XPointers lurking out there too: people will/may easily expect to be able to
use those in the future too.

4) If we implemented it inside a Schematron validator by an XSLT pre-processor
performing a macro expansion of <includes> in the document being validated,
then it would require one or two more passes (i.e. one to perform the
macro expansion, another to generate a remapping stylesheet so that diagnostics
refer to the original document structures not the combined ones...XSLT does
not allow writing to multiple output ports). Already some users are stroppy about
the extra pre-processing stage for abstract patterns.

5) If Schematron implements it, we then need to pass to Schematron a flag
(i.e. a command line parameter or VCSL parameter) saying "don't perform
this expansion" to cover the majority of cases where it is not needed, or to
jsut enable it when validating Schematron schemas only.

6) I think there is an architectural incongruity too: we get the situation where
(when validating a Schematron schema, say, embedded in a DSDL document)
VCSL can select the Schematron elements to validate, filtering out other
elements, but if we are validating a Schematron inclusion then elements from
other namespaces are not filtered.

Maybe it is not incongruous, and is just a ramification of XML-in/XML-out,
but it seems strange to me.
 
One of the mantras of XML Schemas was "we must eat our own dogfood",
meaning that WXS should be powerful enough to validate WXS. They could
get away with not performing inclusions, etc, because they only allow
<includes> (etc) at the top-level. It makes me really uncomfortable to
add features that may need special casing. I don't really consider it
a good showcase that Schematron can be used to validate <includes>
with baroque XPaths.

Am I being silly?

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 Mon Jun 30 15:03:00 2003

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