[dsdl-discuss] Re: Namespace processing

From: MURATA Makoto <murata@hokkaido.email.ne.jp>
Date: Fri Apr 25 2003 - 14:00:03 UTC

> What does James think?

I do not know. James, are you following this thread?

> It is not that it cannot play, it is just that it is probably irrelevant, because it
> does not offer much expressive power that I can see.

You probably mean that in Schematron schemas, users specify what they
are interested in without specifying what they are not interested in.
Even if Part 4 allows individual schemas to focus on some validation
candidates, Schematron users are already able to focus on what they are
interested in. True. But this does not mean Part 4 causes any problems
or cannot coexist with Schematron. This just means that Part 4 and Schematron
address different problems. Moreover, I do see some advantages in using
Schematron together with Part 4 (see below).

>So I suspect Part 4
> should be more RELAX-specific, or specify configurations to be sent to validators
> to select the view they use, or provide the kinds of things in Namespace
> Switchboard more.

DTDs, RDF Schema, and Topic Map Constraint Language can also take advantage
of Part 4. Part 4 is not RELAX-specific.

> Schematron uses the context mechanism to select which elements to
> validate. So a prior mechanism of candidate selection is not strictly
> needed.

It is not strictly needed. However, schema authors can use Schematron and
RELAX NG to control different fragments. Since Schematron requires a tree in
the main memory, small fragments are easier to handle. In other words, Part 4
sometimes allows the use of Schematron even when an XML document is significantly
large.

>Schematron allows paths in contexts, so the mode mechansim
> is not strictly needed.

Right. However, again, modes help Schematron schemas to focus on small fragments.

> Schematron has never made any assumption
> of 1 schema per namespace (in fact, I have always found this assumption
> to be perverse), so an extra mechanism to select schemas based on
> namespaces is not strictly needed either.

RELAX NG does not have this assumption either and selection of validation
candidates is not strictly needed by RELAX NG. However, the use of Part 4
together with RELAX NG makes schema authoring easier. I think that the same
thing applies to Schematron. At the very least, nothing in Part 4 causes
any problems to Schematron.

> So, from that POV, the need for being able to select candidates
> to validate is to promote efficiency and to be able to abort
> before expensive further validation passes are attempted.

Yes. Part 4 promotes efficiency, since each validator can focus on
small fragments. Moreover, "efficiency" for schema authors is easy
of schema authoring. As for the ability to abort, I think that
this is up to the error handler implementation.

> Furthermore, assuming that Schematron schemas are used as the "second line
> of defense" after RELAX NG, I have a feeling that the kinds of constraints
> that Schematron schemas would be used for would tend to be
> those that are left over *after* Part 2+Part 4 validation occurs.
>
> I expect Schematron would be used for constraints which require
> random access and document scope, such as looking for //*[@id];
> divide-and-conquer is obviously not appropriate for that.

How about //foo:*[@id]? If you use Part 4, you can easily focus on
the namespace for the prefix "foo". Then, Schematron becomes away
more efficient.

Cheers,

-- 
MURATA Makoto <murata@hokkaido.email.ne.jp>
--
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 Fri Apr 25 16:00:43 2003

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