schematron is cool

2007-08-18 @ 21:59#

this is a cool paper on the basics of Schematron.

much of what i am doing with the exyus framework is about leveraging XML stuff (XML docs, XSLT transforms, XSD validations, etc.), i handle details of the interpreting incoming request (using XSLT) to output the proper resource. this works especially well for GET requests that must return a list. i can use XSLT to scan the query line (passed in using XSLTArgs) and render the proper resource view. really nice, actually!

another thing i do quite a bit is use XSD to validate the incoming document in general. i even use it to validate a 'on-the-fly' XML document that represents the various parts of the resource URI. it helps me catch invalid URI details *before* making an expensive call into the data store.

but there's a drawback in my reliance on XSD as a validation engine - crummy error reporting. XSD was never designed to return 'user-friendly' errors. that's fine, tho because there *is* an XML technology that is designed for ust such a situation - Schematron. implementations for it are a bit sparse, but they're out there. and there is a very stable (but slightly dated) .NET version, too.

as i move forward with more complex resource modeling, i'll want to use Schematron as my engine for reporting any problems.

code