Re: What engine does Schematron Validator use?

Rick Jelliffe <[email protected]> Thu, 03 Jun 2004 16:12:26 +1000
Newsgroups gmane.text.xml.schematron
Message-ID <[email protected]>
Hunting, Sam (LNG-EWR) wrote:

>For example, it does Relax validation, but with what? Jing?
>
>Or -- I am very new to Schematron -- is this even the right question to ask?
>  
>
Hi Sam.

You can implement Schematron using pretty well any XSLT engine. The most 
common
technique for using it is just to transform the Schematron schema into 
an XSLT stylesheet,
then to run that on the instance data to generate validation results. 
Jing uses SAXON
for this, Topologi uses Xerces and MSXML, for example.

So it is not a kind of RELAX NG validator, nor does it require RELAX NG 
validation.
The new draft ISO Schematron uses a RELAX NG (compact syntax) schema, 
but that
is to describe the language: there is no coupling required to RELAX NG. 

Because Schematron is good at validating things that grammars are no 
good at (and, to a
lesser extent, vice versa), Schematron is often used as an adjunct to 
validation with
a grammar (DTD, RELAX NG, XML Schemas).  To keep this tidy, some people
even embed the Schematron schema inside the <annotation><appinfo> elements
of XML Schemas (or the equivalent in RELAX NG). But this does not mean there
is any necessary tie.

Grammar based schema languages only express regular constraints: there 
are no constraints
between, say, cousins, and all structure decisions are made in document 
order. In Schematron
you use XPaths to locate the contexts in which you assert that other 
XPath expressions should
evaluate to true.  So you can look up, down, backwards, even into other 
documents. 

The <let> expressions (since Schematron 1.6) allow you to make 
variables, which simplifies
expressions and allows a similar kind of expressive power as type 
systems can.

Cheers
Rick Jelliffe


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504