Re: Schematron, New XPath and XSL, and W3C Types

"Rick Jelliffe" <[email protected]> Thu, 17 Jul 2003 17:36:53 +1000
Newsgroups gmane.text.xml.schematron
Message-ID <[email protected]>
From: "Patrick Garvey" <[email protected]>

> Hello. I have some questions about Schematron and the new versions of
> XPath and XSL that will be type aware.
> 
> Will this mean that I'll be able to do the following with Schematron:
> 
> - Check to see if an element in an instance document is of a specific
> datatype (either simple or complex, native or user-defined)?
>
> - Check to see if an element is of a type that derives (via extension or
> restriction) from a specific datatype (either native or user defined)?
> 
> - Check to see if an element is of a type (simple or complex) which
> derives (via extension or restriction) from any second datatype that is
> defined in a specific namespace?

The rough answer to all these is the same:--

ISO Schematron is defined as a framework of elements that can be
used with different query languages.  (A schema document
signals which version it needs an attribute on the schema element;
an implementation checks the attribute to make sure it can handle
the schema.)

This reflects the reality--people have used XSLT, EXSLT, XPath
and Squish as the query languages, and obviously XPath2 systems
are around the corner.  The default is XSLT.   

I have not tested it, but it is possible that if you use SAXON now
as your schematron transform-engine and you make sure it is runs over
the PSVI (i.e. that the instance gets schema-processed first)
you may even now have access to the new type-aware functions,
and these may do the things you ask.

The PSVI stuff is so unfortunate: by introducing non-XML information
items into the processing chain, the W3C Schema WG (which I was
a member of) abandons many of the advantages of XML processing: 
pipelines of loosely-coupled transforms based on explicit markup.  
It is not a brave new world, it is a radical step *away* from XML;
or, at least, if confines XML to the edges of systems rather than
encouraging XML-throughout systems.  

Cheers
Rick Jelliffe



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0