The Language of Self-Description
Recently, Charles Petzold blogged about a new Microsoft specification called CSAML, which uses XML to directly specify C# parse trees.
Brilliant.
This timely topic is actually very close to my heart. In parallel to the work Petzold has been doing, I’ve been simultaneously working on an XML specification for describing the contents of an XML file. It’s called XXMLDL (eXtensible XML Description Language).
I think you’re going to like it.
For example, this XML document…
<person firstname=”Benji” lastname=”Smith”>
<personality type=”stupendous” />
</person>
…could be represented using the following XXMLDL document…
<xxmldl:document>
<xxmldl:element>
<xxmldl:openingtag>
<xxmldl:leftanglebracket />
<xxmldl:tagname value=”person”>
<xxmldl:attributeset>
<xxmldl:attribute>
<xxmldl:attributename value=”firstname” />
<xxmldl:equals />
<xxmldl:doublequote />
<xxmldl:attributevalue value=”Benji” />
<xxmldl:doublequote />
</xxmldl:attribute>
<xxmldl:attribute>
<xxmldl:attributename value=”lastname” />
<xxmldl:equals />
<xxmldl:doublequote />
<xxmldl:attributevalue value=”Smith” />
<xxmldl:doublequote />
</xxmldl:attribute>
</xxmldl:attributeset>
<xxmldl:rightanglebracket />
</xxmldl:openingtag>
<xxmldl:whitespace><[CDATA[
]></xxmldl:whitespace>
<xxmldl:element>
<xxmldl:standalonetag>
<xxmldl:leftanglebracket />
<xxmldl:tagname value=”personality”>
<xxmldl:attributeset>
<xxmldl:attribute>
<xxmldl:attributename value=”type” />
<xxmldl:equals />
<xxmldl:doublequote />
<xxmldl:attributevalue value=”stupendous” />
<xxmldl:doublequote />
<xxmldl:slash />
</xxmldl:attribute>
</xxmldl:attributeset>
<xxmldl:rightanglebracket />
</xxmldl:standalonetag>
</xxmldl:element>
<xxmldl:whitespace><[CDATA[
]></xxmldl:whitespace>
<xxmldl:closingtag>
<xxmldl:leftanglebracket />
<xxmldl:slash />
<xxmldl:tagname value=”person”>
<xxmldl:rightanglebracket />
</xxmldl:closingtag>
</xxmldl:element>
</xxmldl:document>
The advantages to an approach like this are obvious.
Until now, there was no way to specify the contents of an XML document, except using the document itself (which is obviously a clumsy way of doing things). Now, using XXMLDL, it’s possible to describe with an unprecedented level of precision, the contents of an XML document.
What’s even more appealing is that XXMLDL, unlike any other computer language, is actually capable of self-description.
On the other hand, there’s a compelling case for the development of XXXMLDLDL (of course: eXtensible XXMLDL Description Language) to more thoroughly fill that niche, when the time comes. My preliminary research indicates that it’ll be a huge success.
Put that in your pipe and smoke it, Petzold.










May 16th, 2006 at 5:56 am
You did spot the date of his blog entry, right?
(But I like XXMLDL - a solution just waiting for the right problem)
May 23rd, 2006 at 9:52 am
Absolutely brilliant!
I want to be an early adopter. Imagine all the XML currently just lying around *un-described*–I mean it’s practically useless in that state. Please keep us posted on your progress and hurry up with a 1.0 spec!
June 8th, 2006 at 5:53 am
U are aware of: http://www.w3.org/TR/xmlschema-formal/ I presume :)