Loosen up

2007-11-20T12:30:50Z
Dave Pawson.  link
Home

Loosen up

Loosen up

Rick made me think (again) this morning.

when some information is highly coherent (think of Eve Maler’s Information Units) i.e., it belongs together semantically and would not make much sense in isolation, it deserves an official container.

If you take Ricks ideas (or Eve's Information Units on page 158), both express the idea of being able to 'stand alone' as a comprehensible unit of information. That makes sense in the small. A paragraph is almost universal as a unit of information. Once you step up a level the only way to understand the markup is to take it in context. A chapter of a book, a topic for Dita, a verse in a poem. Taking Ricks ideas a bit further I'm saying that is less well modelled by XML without further information.

My biggest change of heart over ten years is in the idea of modelling structure. I was wildly insistant on adding deep and regular structure when I first hit SGML. Unfortunately I'm regretting it, having left my mark in a couple of places. Let me explain, but first a simple statement (breakable, like most rules). I can't see much point in having markup much deeper than about 3 levels, the third being basic inline markup. You can get picky about block level structures like lists and tables, but often those outer wrappers are just unnecessary. If I could, I'd ignore the file level wrapper and just say 3.

Fact. People, when writing, seldom insert deep structures into the tools most used by authors, word processors. There the presentational items are one block level with inlines.

So how would this look if we took it over to XML? For the moment, skip the metadata associated with the document element and let's leave a fully flat structure. Chapters don't exist, sections don't exist, whatever. We can say they start when the markup shows some form of header. This runs through to the next header, i.e. headers start higher level block elements. Since I'm no longer worried about level 1..n blocks, I can have a level one header follow a level 5 header without any issue. Where's the problem? I can't see any. I can insert tables and lists and emphasis and links and paragraphs and code and whatever. What's been lost? Nothing that I can see. I can generate tocs and indexes and lots and lofs etc etc. No change there. Is this using jelly beans as Rick puts it? Who needs jars (to keep jelly beans in that is).

Metadata. I agree that something is needed for metadata. Ok, so have your first level block called info. Add your namespaces there. This falls foul of XML of course, but I have seen people asking for 'non wrapped' XML on xml-dev for so long. A directed graph seems so much more useful than the subset that came from the document world of SGML. I think the wrapped closed world of SGML fits neatly as a subset of that so there shouldn't be much of an issue.

How would that fit with your usage of XML?

Keywords: xml

Comments (View)

Return to main index