Schematron and Architectural Forms

Rick Jelliffe has been working on Schematron once more, showing how to add support for variables and an implementation of the “abstract patterns” concept which was apparently the central idea behind Schematron’s original design.


The idea is that there are basic patterns, e.g. head/body, table/row/cells that are common to many different markup vocabularies. The individual elements and attributes that form the pattern may vary between vocabularies but the basic structural relationships are the same. You can read about a number of these over on the XML Patterns site. The overall premise is very similar to that of Design Patterns in OO languages.
Ideally one would like to be able to write validation rules for the general pattern (e.g. a table must have rows) and then be able to apply them to any particular instance of that pattern (e.g. a CALS table, or an HTML table). This is what Jelliffe’s new preprocessor does: it converts the abstract rules into concrete assertions tailored for a particular vocabulary.
I find this interesting, not only because of its overlap with Design Patterns in general (which I’m a big fan of) but also because of its relationship with Architectural Forms.
Architectural Forms allows the common structures of entirely different or variant schemas to be “transformed” into an architectural document that describes those common structures. E.g. a general table rather than a specific CALS table for example. The architectural document can be validated, because we define a schema for the architecture, and it can also be processed by an architectural processor designed to do something useful with that document, e.g. to layout the table for viewing.
Using Schematron we now have the validation component, but not the transformation.
I’m interested in how this may be combined with John Cowan’s Architectural Forms: A New Generation, particularly as Jenni Tennison has an XSLT implementation. Looks like it ought to be possible to combine the two.
I wrote a summary of Architectural Forms for XML-DEV a while back which I’ve been threatening to write up for a while. Robin Cover also captured a number of follow-up postings. This paper “Architectures in an XML World” is also worth a read and includes pointers to another XSLT implementation of Architectural Forms.

2 thoughts on “Schematron and Architectural Forms

  1. Damn it. Where has this *been* all my life? And I have *no time* to look at it. Grrrr.
    AFs are okay, but what they don’t do well is handle what I think I shall call markup cowlicks — bits where two models just plain do not and cannot coincide. If abstract patterns do this better (and from your description I suspect they do), I’m sold.

  2. Leigh Dodds says:

    Hi Dorothea,
    Do you have a specific examples of “markup cowlicks” (great term!) in mind?

Comments are closed.

Follow

Get every new post delivered to your Inbox.

Join 30 other followers

%d bloggers like this: