[dsdl-discuss] Re: Interoperability framework: getting started again

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Tue Mar 11 2003 - 17:44:35 UTC

I'd like your feedback on what I have called the virtual XML document
(see below).

When a rule is being evaluated, we can either use this concept and allow
expressions such as "document('schema.rng')", "instance",
"/framework/instance", "instance[2]", "$myVariable" but also
"instance/xhtml:html/xhtml:head".

A simpler alternative if we don't need to address nodes within the
documents is to define a couple of predefined variables for the current
and original instances. We could then just use:

      * schema.rng to refer to external schema "schema.rng".
      * $original-instance to refer to the original instance.
      * $current-instance to refer to the current instance.
      * $current-instance[2] to refer to the 2nd instance after a split.
      * $myVariable to refer to a global variable (or parameter).

If that's enough, that'd be easier to explain (and implement).

Eric

On Tue, 2003-03-11 at 12:45, Eric van der Vlist wrote:

> My assumption is that we need to be able to refer to:
>
> - the instance document for the current rule,
> - the results of a split of the instance document for the current rule,
> - external schemas,
> - global variables,
> - the original instance document (?)
> - maybe more (?) ...
>
> I think that instead of reinventing a syntax to do so we could use XPath
> (or a subset of XPath) expression over the context expressed as a
> virtual XML document.
>
> The model of this document could be:
>
> <framework>
> <instance> ... original instance ... </instance>
> <rule> <!-- Current rule, also the context node -->
> <instance> ... instance for the current rule ... </instance>
> </rule>
> </framework>
>
> When the transformation performs a split (like Relax Namespaces), there
> are as many instance for the rule as needed.
>
> This means that:
>
> * /framework/instance refers to the original instance
> * instance refers to the instances for the current rule as defined
> in the instance element for the rule (which is by default the
> original instance).
> * instance[1] refers to the first of these instances.
> * $myVariable refers to the variable "myVariable".
> * document('schema.rnc') refers to the external document
> 'schema.rnc'.
> * we may also want to give access to content of the instance and
> write stuff such as:
>
> <framework>
> <rule>
> <assert>
> <isValid schema="document('schema-head.rng')" instance="instance/xhtml:html/xhtml:head"/>
> <isValid schema="document('schema-body.rng')" instance="instance/xhtml:html/xhtml:body"/>
> </assert>
> </rule>
> </framework>

-- 
If you have a XML document, you have its schema.
                                                  http://examplotron.org
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
--
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 Tue Mar 11 18:44:36 2003

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