Fractals, Self Similarity, and the Whimsical Boundaries of XML Documents

April 24, 2002, 11:00 PM —  ITworld — 

XML makes modeling information in terms of a component/sub-component
model of the world very straightforward. XML tags (or element types to
be precise) are essentially containership modeling devices with the
powerful ability to express containership, not only of information
content but also of other containers. These containers can contain
other containers and so on.

One of the slightly mind-bending things about this containership model
is that containers can contain other containers that are "the same"
type of container. This so called recursive content capability is
second nature to those who naturally think in terms of documents (i.e.,
put a table inside another table) but less so to those who naturally
think in terms of databases (i.e., put an invoice inside another
invoice).

As a thought experiment, pretend that tags did not have associated
element type names. Fuzz your mental vision to the point where all you
see is the "things within things" containership structure created by
the "<>" and "" shells that are left behind. Notice in your minds
eye that when the tag names are stripped off like this, every level in
the structure looks much like any other level.

"Well duh", is one possible response to this observation. Of course
each level of the structure looks like every other level when the names
of the tags are removed!

I find looking at a tag structure without the tag names visible a
humbling experience that is good for the soul. It shows in stark relief
the futility of the boundaries we create in data modeling. We create a
boundary whenever we split a universe of information into chunks we
call "documents" which we then aggregate together into collections of
documents. Prior to tagging any information into XML we need to decide
where the concept of document stops and the concept of document
collection starts.

The trouble is, there is no correct place to put such a boundary.
Turning off the tag names in an XML document view shows this up nicely.
What is a document anyway? Boy, there is a subject for a never-ending
debate! Lets say we agree that a document is a cohesive collection of
chunks of stuff. Ok, but what is a chunk? A cohesive collection of
chunks of other stuff...and so on it goes all the way down to
individual characters.

At least in the downward direction we reach a point where we cannot
split any more. Not so on the way up! At an SGML conference many years
ago I remember hearing about an SGML document that was over 2 gigabytes
in size. At the time I thought, "Wow"; nowadays, I think a 2 gigabyte
XML/SGML file is actually pretty meaningless as a measure; it is just
the result of a fairly arbitrary decision as to how far up from
individual characters the concept of "document" should go.

Lets take an extreme example. If all the information content of the
U.S. Library of Congress were available in XML form, then where would
the modeling boundaries lay? Storage efficiency issues aside, what
would the fundamental document level of the model be? How about a
LibraryOFCongress tag topping and tailing one enormous XML document?
Maybe a Department tag creating a few thousand documents? A Book tag
thus creating millions of documents? A section tag creating a bazillion
documents? A paragraph? A sentence? A word? A character?

Does It Matter?
Fact is, it doesn't matter. Information is self-similar, all the way up
and all the way down. The decision is based not on concerns to do with
accurate modeling of the information but on physical limitations in the
real world (e.g., database and file system limitations).

Knowing that the quest for the perfect boundary between document and
document collection is an important step on the road to enlightenment
and will calm your soul. The document/collection decision is important
and has far reaching consequences for cross-referencing and information
reuse but there is no correct answer.

Information has a self-similar structure that extends from the shadow
at the back of Plato's Cave right through to the individual Unicode
code points constituting the atoms of the information universe. All we
can do is pound the pinions into the cave wall and hope the suction is
strong enough to carry us through.

» posted by ITworld staff

ITworld

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Free books

Essential JavaFX
Get started building rich Web apps quickly with an introduction to the power of JavaFX key features -- scene node graphs, nodes as components, the coordinate system, layout options, colors and gradients, custom classes with inheritance, animation, binding, and event handlers.Enter now!

The Nomadic Developer
Consulting can be hugely rewarding, but it's easy to fail if you are unprepared. To succeed, you need a mentor who knows the lay of the land. Aaron Erickson is your mentor, and this is your guidebook. Enter now!

Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

Marketplace