Drafts for Schematron support of EXSLT, XPath2, XSLT2 and STX
by Rick Jelliffe
However there have been many requests to allow more powerful languages, and ISO Schematron was designed to allow this. There is an attribute called
queryBindingon the top-level schema element, and this lets you declare which query language you are using. The standard even specifies a document called a "Schema Language Binding" and says the information that this must provide. It also reserved several names: "xslt1, xslt2, xpath2, exslt" etc.
So here are the draft text for new annexes I will be submitting to SC34 (and thence to national vote) for augmenting ISO Schematron. EXSLT was a community effort to define some more powerful functions for XSLT1. XPath2 is the updated version of XPath from W3C, very much changed, in particular with a different and large function library; the
xpath2query language binding allows the minimal, untyped, untyped-data profile. XSLT2 is the reworked XSLT1, and the
xslt2query language binding allows the typed data (PSVI) if you want it (Schematron doesn't provide any mechanism for making sure that is what you are working with) and also user-defined functions in the XSLT2 namespace.
Most interestingly, perhaps, is the STX binding. I am supposed to be contacting the STX editor to see about using this query language binding plus the STX specification as an ISO standard (another part of DSDL.) Actually, STX was voted on for this purpose, but without the query language binding some national bodies decided it couldn't be classed as a schema language, but it should be an easy fix, since the hard work has been done and the NBs are onside at last.
The thing about STX is that works in streaming fashion. So you can test documents larger than your virtual memory. STX is much less limited than the subset of XPath that XSD uses.
The draft bindings are here (sorry in boring custom XML not typeset to HTML.) Comments are very welcome, and thanks to the schematron-love-in mail-list members for comments and prods. There are a few other issues on the table for a revised Schematron upgrade, but they all can procede independently of these bindings, if time is not my friend.
I think that bindings for stx, xpath2 and xslt2 should also add support for stxpath-default-namespace and xpath-default-namespace respectively in order to make writing assertions for namespaced documents easier.
Jirka: In Schematron I have maintained a strict policy of making namespaces explicit. The use of defaulting has caused more problems and confusion than almost anything else in XML, and is one reason I have the