Chameleon XML models
It’s not unusual for there to be several XML syntax forms for a given domain model. This might be in cases where there is an industry standard model with competing XML representations used in different organizations, or where there is a common model implemented in XML independently by different departments. It’s a well known problem that XML provides no mechanism for reconciling such variance. Since early days of markup schema, however, there have been strategies for bridging chameleon XML models— syntactic variants on the same model. The SGML world had Architectural Forms, a sophisticated mechanism for specifying syntax variations in DTDs. There have been some efforts towards bringing architectural forms to XML, but many have balked at the complexity of the technology.
Transforms written in XSLT open provide for post facto syntax conversions, but experience indicates that a declarative, schema-driven approach is still needed. The Schematron schema language, inspired by the rules-driven system in XSLT, includes a mechanism, abstract patterns, for formalizing syntactic variations. Overall Schematron is probably the most powerful XML schema language available (and it can be much more than just a schema language). It is heading towards ISO standardization and has an impressive implementation record because of its common sense approach on building on well-established technology such as XPath.
In addition to Schematron have come other Architectural Forms variations such as John Cowan’s AFng and Jeni Tennison’s XSLT implementation thereof. One controversial example was the mini specification language used for hLink, a limited mini-specification language for allowing specifications to express “which attributes of elements represent Hyperlinks, and how those hyperlinks should be traversed, [extending] XLink use to a wider class of languages than those restricted to the syntactic style allowed by XLink.” (Words from the HLink specification abstract).
This paper and presentation will look at practical tools and techniques for dealing with chameleon XML models, as well as the inevitable limitations and problems, focusing on current conventions.




