Architectural Forms
It is an unfortunate fact of life that the best technical solution doesn't always win. In this case, the best technical solution is HyTime, or rather a part of HyTime called the architectural form. I won't try to explain HyTime, but architectural forms have been proposed as a possibility for XML and I believe they deserve a mention here. They are, by far, the most powerful and most perfect mechanism, but they suffer from being extremely difficult to comprehend and being almost impossible to actually implement. Where XML applications will be numbered, at the least, in thousands, SGML applications are numbered, possibly, in hundreds and HyTime applications are numbered, hopefully, in tens.
| The Hypermedia/Time-based Structuring Language (HyTime) is an application of SGML that provides facilities for representing static and dynamic information that is processed and interchanged by hypertext and multimedia applications. |
HyTime provides standardized mechanisms for specifying the interconnections (hyperlinks) within and between documents and other information objects, and for scheduling multimedia information in time and space. In essence, HyTime makes it possible to represent links to anything, anywhere, at any time.
An XML DTD describes document architecture. It contains rules that govern every aspect of how conforming (valid) documents are to be represented and processed (or at least as far as you can do so in SGML).
Instead of specifying complete document types, it is possible to define rules, known as architectural forms, for creating and processing elements (just as document architectures are rules for creating and processing documents).
Architectural forms are specified principally by attribute definitions. However, an architectural form can also include rules for constructing the content models of element types conforming to the form.
The set of architectural forms and related declarations for an architecture act as a sort of meta-DTD. Applications can create their own architecture forms, which means that how an application looks at the information is a matter that it can decide for itself, or in common with another application. The architectural form therefore provides a very powerful and extremely rich and sophisticated mechanism for describing, and exchanging, information about information and data about data.
The essence of the architectural form is that it allows the set of attributes for an element to be extended without changing the basic processing, parsing, and integrity of the DTD or associated document. By extending the set of attributes, information that would otherwise require the use of external files can be expressed and preserved.
The attraction of this approach is that it does not require the use of new structures and processes; it uses the SGML parser and an extended, but perfectly standard, form of the DTD to convey the information. The architectural form directly encodes the relationship between the elements and target application's semantics in the DTD.
To take a practical example of the importance of this, consider the now famous advantage of XML-that it will make searching on the Web much simpler. Will it really? Well, I suppose it would if you could persuade everyone to use the same standard element names, or to comply with namespace vocabularies. That way you could not only easily find all the books with a certain title, you could easily find all the books by the same author. But there lies the problem. Making information easy to find also makes it easy to compare, and there are already hints of packages that will automatically perform price comparisons and return you the address of the best offer. It can hardly be in the retailers' best interests to open up their information to this sort of activity. Architectural forms offer a sort of compromise, and a sort of workaround. Suppose you want to find all the prices for a certain book, but you don't know how the price has been tagged. By defining an architectural form, the search engine could look for the architectural forms instead of the tag names. Architectural forms are a wonderful mechanism; for a more extensive, and much deeper, discussion, read David Megginson's book (Structuring XML Documents, Prentice Hall Computer Books, ISBN: 0136422993). Architectural forms make namespaces largely irrelevant and they are future-proof. However, to return to my original theme, the best technical solution doesn't always win, and this one probably won't either. It would take a long time and a lot of work to implement architectural forms and the Web won't wait. The Web requires instant, working solutions.