[examplotron] Re: Rules-based standards (was: Advanced handling of attributes)

From: Eric van der Vlist <[email protected]>
Date: Mon Jul 07 2003 - 23:50:02 UTC

Jonathan Lang said:
>
> Eric van der Vlist wrote:
>> Martin Roberts wrote:
>> > Why can't schematron asserts be applied to attributes? On the old
>> > Examplotron, rules could be attribute based.
>>
>> I don't see any really good reason!
>>
>> I *think* that it's part of the feeling that attributes are nothing
>> more than annotations for the elements ti which they belong.
>> This is the price to pay to get Examplotron based on standards and I
>> *think* that it's worth the effort but it's probably something we
>> should discuss in more details!
>
> Perhaps Schematron is the wrong standard to be using for rules-based
> document validation?

I don't think so (see below), but I may be wrong.

> XSLT might be a better choice (especially once
> XSLT 2.0 and XPath 2.0 reach Recommendation status, what with their
> incorporation of namespaces and datatypes);

I wouldn't recommend this. The support of datatypes in XSLT 2.0 and XPath
2.0 relies on W3C XML Schema, what would be the point of Examplotron if
you had to provide a WXS schema?
> I suspect that it's
> possible to view Schematron as a subset of XSLT, and to arrange for a
> transformation from the former to the latter in a fairly
> straightforward manner.

Yes. Most of the implementations of Schematron are done by XSLT
transformations which compile a Schematron schema into a XSLT
transformation which performs the job.
The exceptions are implementations performing directly a Schematron
validation and this is especially intersting for embedding Schematron
rules within schemas. See for instance MSV -Sun's Multi Schema Validator-
ad its Schematron addon:
http://wwws.sun.com/software/xml/developers/multischema/
http://wwws.sun.com/software/xml/developers/schematronaddon/

Relying on Schematron rules embedded in Relax NG means that we can rely on
existing validators such as this one. It's a benefit we would loose if we
replaced them by simple XPath expressions.
Eric

>
> =====
> Jonathan "Dataweaver" Lang
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com

-- 
Freelance consulting and training.
                                            http://dyomedea.com/english/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
Received on Tue Jul 8 01:50:02 2003

This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:29:47 UTC