This is the approach
used in ebXML and HL-7 for example.
Others would argue that good old DTDs provide a basic facility for this, which can be used to create simple hierarchical relationships between element types known as parameter entities. In many DTDs you will find
parameter entities with names like "block", "inline", "heading", "list"
and so on. These act as containers and classifiers for elements - a pure XML 1.0 approach to basic object oriented classification. This is the approach used in the XHTML DTD for example.
Others would argue that the way to add hierarchy to schemas is to annotate element types with attributes that specify the classification system - architectural forms are an example. In the OO world, the use of archetypes in UML is similar in scope.
As ever, all the approaches have pros and cons. The UML approach works well at the expense of making the only legible version of the model visual (and most likely, proprietary to the tool that created the visualization.). Parameter entity approaches have the advantage of being pure XML 1.0 but are a quite limited, purely lexical approach. In particular, the classification is invisible to all but the most DTD-aware, validating parsers and thus the hierarchy information is not available easily to downstream processing. The architectural form
approach has the advantage that the hierarchy information is available downstream. However this approach has not received widespread support in
Some time ago, I suggested that XML was just a special case of some more general technology. I am beginning to think that the next level up is now taking shape. We started by using XML to add hierarchies to data.
That is now an established and fairly well understood. The next big frontier to be conquered by the hierarchy brigade is the models for the data -- the schemata. In a word, meta-models and meta-modeling.
Just when you thought the level of abstraction was leveling out, we seem to be heading north again!
Hmmm. I wonder what the opposite of "meta" is?...