XML

Monday 27 September 1999
XML (www.gca.org/whats_xml/...) is a new format for computers to exchange structured data. The complexity of the data structure can be quite high.

Many to many relation between publisher and reader through subscription XML works top down, fine as long as the subject has a simple hierarchical structure. Unfortunately reality is more complex, full of many-to-many structures like the one between publishers and the readers.

In last week's Nut. you read Every hierarchy is a simplification that leads to problems. That theses is ready for reuse. To which hierarchy does a subscription belong? To the publisher's or to the reader's?

<XML>
. <Publisher>
. . <Name>VNU Business Publications</Name>
. . <Subscription>
. . . <Magazine>Computable</Magazine>
. . </Subscription>
. </Publisher>
<XML>

Problem: subscription lacks reader

<XML>
. <Reader>
. . <Name>Henk Jan Nootenboom</Name>
. . <Subscription>
. . . <Magazine>Computable</Magazine>
. . </Subscription>
. </Reader>
<XML>

Problem: subscription lacks Publisher

A subscription belongs to both Publisher and Reader. The hierarchical XML structure fails to cope with this schizophrenic nature.

There is a well-tried alternative for a top down way: the bottom up approach. A relational database designer would use foreign keys to link each subscription to both Publisher and Reader. XML allows the same approach. (w3.org/XML/Datamodel...).

<XML>
. <Publisher>
. . <id>VNU</id>
. . <Name>VNU Business Publications</Name>
. </Publisher>
. <Reader>
. . <id>HenkJan</id>
. . <Name>Henk Jan Nootenboom</Name>
. </Reader>
. <Subscription>
. . <Blad>Computable</Blad>
. . <Publisher> <href>VNU</href> </Publisher>
. . <Reader> <href>HenkJan</href> </Reader>
. </Subscription>
<XML>
Suddenly, mapping complex structures to XML becomes surprisingly easy.

Are you experiencing a Déjà vu feeling? Well, it's old wine in new bottles. Most good ideas are not new, and so aren't most new ones.

Till next week!
Nut

PS: You reader do not have to subscribe to Nut's Weekly. Every Monday this Publisher gives you a fresh episode, no subscription required. After all, reality is complex enough as it is.