Saturday, 13 January 2007

Of Schematron, Unit Testing and oXygen...

I've been off the SVG trail for the last three or so months due to a shift in contract work. But, as this blog is not just about SVG, I'd like to pass on my experiences with some truly wonderful things:
  • Schematron - a rules based XML validation language
  • Unit testing - with respect to the above
  • <oxygen/> - an most excellent XML IDE
Schematron, is an example of how you can put existing technologies to very good use. Schematron uses XML and XPath to declaritively express a set of rules that when applied to a source document will test the validity of that source document. But here's the cool part, there is an XSLT implementation of Schematron and what's more - it is, in my opinion, a very good example of what XSLT can do. The XSLT implementation has been written with many hooks to allow overriding of the standard functionality. It is, for example, quite straight forward to customise the report output. I'll say no more than this and advise you to check it out.

Unit Testing, which I'm sure we've all had some involvement with one way or another but for some people its necessary and for others its a necessary evil. Now, considering what I've just been saying about Schematron, a rules based language for validating XML documents, or fragments there of, the light should be coming on about now. Yes, you can use Schematron to validate the results of your XSLT transformations. I could bang on for ages about this but I wont. Have a think and a play.

<oxygen/>, as I've already stated is a most excellent XML IDE, which comes chock full of some wonderful tools including the very good source editor with superb code completion, abbreviations and support for all the main validation languages (including Schematron). It has a sensational debugger that you've got to experience to believe, a profiler that I haven't touched yet but others I know have found it useful and it support XSLT 2 and XQuery via Saxon 8. I'm not kidding when I say - It rocks!!!

No comments:

Post a Comment