Monday, October 5, 2009

To ISO or Not to ISO

Schematron comes in two common flavors, Schemtron v1.5 (older) and ISO Schematron (newer). While there are a number of differences that can be read about on the official Schematron Website, it can sometimes be confusing about which version is "best". The following table presents some of the differences between the two:
Featurev1.5ISO
VarriablesNot supportedlet element available.
Query LanguageXSLT 1.0/XPath 1.0XSLT 1.0/XPath 1.0, XSLT 2.0/XPath 2.0, EXSLT, STX, XSLT 1.1, etc.
Abstract Patterns & InheritanceNot SupportedSupported
value-of Element
(helpful in debugging and error messaging)
Not SupportedSupported
xsl:key ElementSupportedNot Supported
(Workaround Exists)
flag AttributeNot SupportedSupported
SVRLNot SupportedSupported
include elementNot SupportedSupported
My suggestion would be to go with ISO Schematron, for the following reasons:
  • Support for variables is important when working with ID and IDREF (more about this in a later blog).
  • XQuery 2.0 functions provide a number of goodies that would be hard to pass up.
  • ISO Schematron is a recognized ISO standard. . . which should count for something in a standards-based community.
Feel free to comment if you know any other key differences or disagree with my suggestion. Update: 2009-10-05 - Correct typo.

No comments:

Post a Comment