Hi,
I have resumed working on the Interoperability Framework and I'd like to
submit to your comments my first thoughts on a new version which is both
non intrusive (ie doesn't require any change on the schema processors
used to validate a document) and less procedural (that was one of the
main comments in Baltimore).
To be less procedural (than the Schemachine), I'd like to propose to
define rules (ala Schematron) instead of pipes. Each rule would be
composed of a set of assertions made on an instance document
For instance, to express that my documents are valid if they pass
validations by "schema.rng" and "schema.sch", I could write:
<framework>
<rule>
<assert>
<isValid schema="document('schema.rng')"/>
<isValid schema="document('schema.sch')"/>
</assert>
</rule>
</framework>
By default, a rule is evaluated against the instance document presented
to the framework, and this may be overidden by adding an "instance"
element, for instance to normalize the document before these
validations:
<framework>
<rule>
<instance>
<transform transformation="document('normalize.xslt')"/>
</instance>
<assert>
<isValid schema="document('schema.rng')"/>
<isValid schema="document('schema.sch')"/>
</assert>
</rule>
</framework>
The way to generalize this to transformations giving multiple outputs
needs to be defined. One idea would be something such as:
<framework>
<rule>
<instance>
<split split="document('split.xxx')"/>
</instance>
<assert>
<isValid schema="document('schema1.rng')" instance="instance[1]"/>
<isValid schema="document('schema1.rng')" instance="instance[2]"/>
</assert>
</rule>
</framework>
Schemas can themselves be the result of transformations. For instance,
to apply Bob DuCharme schema pipeline transformation:
<framework>
<rule>
<assert>
<isValid>
<schema>
<transform instance="document('master.rng')"
transformation="document('getstage.xsl')">
<with-param name="stageName" select="'post-floob'"/>
</transform>
</schema>
</isValid>
</assert>
</rule>
</framework>
Alternatively, transformation results can be stored in variables:
<framework>
<variable name="mySchema">
<transform instance="document('master.rng')"
transformation="document('getstage.xsl')">
<with-param name="stageName" select="'post-floob'"/>
</transform>
</variable>
<rule>
<assert>
<isValid schema="$mySchema"/>
</assert>
</rule>
</framework>
These are just some few initial examples, but I'd like to get your
feelings at this stage!
Thanks
Eric
--
Don't you think all these XML schema languages should work together?
http://dsdl.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 Mon Mar 10 13:40:25 2003
This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:00:27 UTC