[dsdl-discuss] Re: Comments on Schematron

From: Rick Jelliffe <rjelliffe@allette.com.au>
Date: Sun Jan 21 2007 - 08:36:52 UTC

MURATA Makoto said:
> Sorry for making commnets at this stage.

No, it is wonderful to have! Ken & I have been talking about the
possibility of a revision of some kind, based on new requirements and
issues arising from the beta implementation. (I don't see it for 1Q 2007,
however.)

 * Query language bindings for xpath, xslt2 and exslt.
 * Datatypes binding, similar to RELAX NG's perhaps
 * Corrections, such as the ones coming out of your issues

I suppose you are working on a translation or some background material.
Here are a few points that may be helpful.

1) On the general issue of conformance, the design is that, as far as
possible, the main standard body cannot be concerned with the particular
syntax or details of the query language. Those kinds of things have to be
in the particular query language binding.

And ISO Schematron cannot require that an implementation must be able to
determine (staticly) any flaws that are only detectable at runtime. Worse
still, Schematron does not even require that a schema is not
contradictory! Validity is defined as a failure of any assertion, not that
the assertions themselves make any sense: one assertion could say "An X
should have a Y" and another assertion could say that "An should not have
a Y" (with the appropriate XPaths) in which case every document will fail
validation!

Implementation checks relating to making sure that a schema is
non-contradictory, or will not fail at runtime, or will terminate, belong
to some future conformance level and may only be practical with particular
query language bindings. I don't think we can standardize beyond the state
of the art! I certainly expect that XPath1 and Schematron can be reduced
to logic, and that this would allow consistency checking (and checking
against schemas such as RELAX NG) but that is the future; and XPath2 has
complicated things so that it will be very hard. (One possible approach
would be simply to create XML versions of the XPaths, and then use schemas
to perform smarter static checks.)

2) Also, there is a difference between a *schema* that fully conforms to
the standard and a "full conformance" *implementation*. For example, a
query language binding could add extra conformance requirements (such as
that sch:name/@path should locate a node with a name) that a schema should
conform to, but a "fully conforming" implementation is not required to
detect this. (It might have been better to talk of "Conformance Level A"
and "Conformance Level B".) Of course, implementations may indeed detect
far more, depending on the query language binding, but this is a matter for
local profiles and competition.

3) I struggled over whether to use the term "node", because Schematron can
be used with a non-XML query language binding; for example, Libby Miller's
Schemarama which uses the Squish query language that operates over RDF.
Similarly, the report element allows lots of non-validation functionality
for Schematron; for example, a schema for reporting what flags are present
in an SVRL document, to automatically grade the results of validation.
(E.g., was anything flagged "urgent" or "fatal"?)

So Schematron as a technology is a language for making assertions about
the presence or absence of patterns in data sets. But ISO Schematron is a
standard for one particular aspect of this: validating XML documents.

Cheers
Rick Jelliffe

--
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 Sun Jan 21 09:41:58 2007

This archive was generated by hypermail 2.1.8 : Sun Jan 21 2007 - 10:23:02 UTC