From: "James Clark" <jjc@jclark.com>
> To summarize, I think what you are proposing needs a hook in RELAX NG to
> accomodate it.
Since DSDL is adopting the XML->XML approach which is recently being
called "annotation" rather than "augmentation", I wonder if there is some need to give it first-class support.
In particular, I am wondering if validators in DSDL should support some kind of namespace-based global exclusions.
The use-case is this:
Grammar-based schemas are usually written fairly closed. The languages make
this easier than being open, and users want applications to reject any funnies.
However, inside a transformation-based XML->XML validation framework,
one transformation may well want to annotate the data with some information.
For example, the tranformation might be Francis Norton's type-tagger, which
applies XSD's type assignment rules to elements, and annotates the
elements with an xsd:type attribute. Or the transformation might be to
add extra elements or attributes during one validation to park the results of
validation.
One reason we give against the PSVI is that it disrupts the relationships of the
document. However, if RELAX NG (etc) implementations had a facility to
ignore (completely) elements or attributes in some specified namespaces,
different to the ones used in the schema, then it would make tees connections
more useful. Say we have
input
|
\ /
transformer
|--------------------------
\ / \ /
transformer2 validator1
|
\ /
validator2
Where all transformer2 does is annotate the XML with attributes and
elements in a namespace used for annotations, and validator1 uses
those annotations, and validator2 is a RELAX NG schema.
If schema language implementations supported some kind of global exclusion
capability, this flow could be simplified to
input
|
\ /
transformer (1 & 2 combined)
|--------------------------
\ / \ /
validator2 validator1
I am not asking for this to be added to the RELAX NG language.
It could be done either by the schema implementation (& therefore
efficient) by simply ignoring information items in excluded namespaces,
or as a transformation by the framework (and therefore inefficient in
DOM but efficient in SAX) by stripping out elements and attributes
in the excluded namespace.
The framework would have something like
<validate engine="namespace for RELAXNG"
schema="URI for schema">
<ignore namespace="exclusion namespace" />
<ignore namespace="another exclusion namespace" />
<param ....
The kind of flexibility this would give is basically that it simplifies
the specification of DSDL schemas for users: a document with
a RELAX NG (or whatever) can be passed around and
augmented all over the place, and still be validatable at the
end of a chain by the same RELAX NG schema, without
requiring a special open version of the RELAX NG schema.
(And, being something that the framework could do, it can be
on every engine without requiring the engine to have been
written to cope with it.)
Is that a dumb idea? I guess it allows more in-band signalling
between stages of the pipeline too.
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 Thu Jun 20 09:47:08 2002
This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:00:27 UTC