Hi Folks, Yesterday Michael Kay posted [1] a fascinating message. I’d like to summarize what I learned from reading his post. [Michael, please
correct any mistakes in my summary.] At the end of this message I have two questions. Consider this XML document containing data about a book: <Book> We have
direct access to the data by simply navigating to an appropriate element and then “peek inside” the element. For example, we can access the data “Siddhartha” by navigating to the Title element and then peek inside the element. XML is, of course,
extensible so we can extend the XML vocabulary: <Book> To recap, the document is extensible with direct access. Sometimes it is not easy to extend an XML vocabulary in a timely fashion. If the XML vocabulary is specified by an XML Schema, and
changes to the XML Schema is under the control of a slow-moving organization, then timely extensions to the XML vocabulary may be difficult. To deal with this we modify the design by turning the tags into data: <Book> Accessing data now involves a
level of indirection. For example, to access the data “Siddhartha” requires finding the NameValuePair with the Name element containing “Title” and then peeking inside the Value element. The document may be extended in the normal XML fashion by adding more NameValuePair elements, but we can also add another
layer of extensibility by adding new names: <Book> To recap, the document has two layers of extensibility and a level of indirection. “All problems in computer science can be solved by another level of indirection.”
[1]
http://lists.xml.org/archives/xml-dev/202111/msg00088.html
|