[XML-SIG] Schematron validation

Uche Ogbuji uche.ogbuji@fourthought.com
Sat, 22 Feb 2003 09:38:02 -0700

I'm just catching up with some e-mail I had to put aside in a hectic period.  
Sorry for the slow response.

> On Thursday 22 November 2001 06:41 pm, Uche Ogbuji wrote:
> > I too am no friend of XSD.  We tend to use Schematron or Examplotron when
> > we use schemas at all, but I like RELAX-NG/TREX.
> I'm looking for a Schematron implementation in Python. The Resource Directory 
> for Schematron [1] lists 4Suite as having a validator. Unfortunately the link 
> is dead. A quick search of the archives of xml-sig found very little 
> discussion of Schematron in 2002. Has Schematron died? 

4Suite still "supports" Schematron, but it really only does so by allowing you 
to use the Schematron XSLT compiler.  Even the schematron support in the 
server is this way.  We have often considered implementing Schematron in 
native ython (and I think othrs have talked about doing so as well - we'd be 
happy to use their eforts), but the itch hasn't been great enough yet.  Our 
most common usage scenarion fro Schematron is validate-on-update, and for that 
the XSLT approach is usually fast enough.

Another, separate thread that has come up before is the ability to use 
Schematron rules to validate Python objects.  this would require an XPath 
mapping for the Python data model, and would also probably be a worthwhile 
effort, but te itch hasn't been bad enough.

> I've been using XML Schema to define some large documents. This approach 
> suffers from the limitations that are described in the Schematron assertion 
> language introduction. I need to build the document in stages and the 
> validation will change as more information is filled in during the workflow. 
> I am somewhat concerned about Schematron validation performance and the 
> ability to describe large documents. 

Yes, performance does become a poblem using the XSLT approach if you have 
large documents.  In our work we always try to avoid large documents, and 
prefer to stitch together smaller documents with RDF and other means.

Unfortunately, if Schematron/XSLT is too slow fr you, I don't have a ready 
solution in Python.

Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
The open office file format  - http://www-106.ibm.com/developerworks/xml/librar
4Suite Repository Features - https://www6.software.ibm.com/reg/devworks/dw-x4su
XML class warfare - http://www.adtmag.com/article.asp?id=6965
See you at XML Web Services One - http://www.xmlconference.com/santaclara/