[dsdl-discuss] Namespace processing

From: Rick Jelliffe <ricko@topologi.com>
Date: Wed Apr 23 2003 - 07:14:55 UTC

As an approach perhaps more related to NMS, I wonder whether there is also another
approach to thinking about namespace processing and our framework. It is based on
the idea of formalizing that we are validating a view of the document rather than the
document itself: so we are expecting our validators will be smarter, rather than
merely the candidate selection language being some kind of distinct pre-processing
stage.

Maybe we define validation (i.e. what happens after any branch extraction) as

    validate( document, namespaceOps, candidates, schema, transparent, opaque, errorfilter, params)

where

    document is the instance to be validated
    namespaceOps are namespace renaming functions
    candidates is an xpath or set of nodes to be validated (by default, all in the document)
    schema is the schema to be used
    transparent is an xpath or set of nodes which will be invisible to the validator:
        e.g. <x><y><z/></y></x> with transparent y's will be seen to the validator as <x><z/></x>
    opaque is an xpath or set of nodes which view as if empty to the validator
    errorfilter is an xpath or set of nodes whose errors we are not interested in
    params is any other name/value pairs that an implementation might need

e.g.

<validate>
    <candidates>//xhtml::*</candidates>
    <schema>xhtml.rnc</schema>
    <transparent>//xslt::*</transparent>
    <opaque>//xhtml::meta</opaque>
    <errorfilter>//html::a</errorfilter>
</validate>

Which says,
 * mark every xhtml element as a validation candidate
 * strip out every xslt: element and promote its children
 * strip out the content of the xhtml:meta element
 * validate the candidates using that view with the schema xhtml.rnc
 * filter out any error messages concerning html:a elements

(Namespace renaming, etc is not included here, but still needed.)

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 Wed Apr 23 09:11:07 2003

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