Mike Macgirvin
Diary and Other Rantings
Beyond Silicon Valley
   
Friday, Jul 25 2008, 12:09 pm
Dec 20, 2005
freeXML
As I've delved into the deepest pits of extending the eXtensible Markup Language (XML), I've found that it has been over-engineered to the point of absurdity. DOCTYPE's, DTD's, XSLT's, RDF, etc.

It's enough to drive an insane person crazy. Extensible? Try it sometime. You've no idea the can of worms you'll open. I think it's time to dispense with the whole mess and get back to what XML started out as. A means to convey information through a '<tag>content</tag>' syntax.

It is an implicit format to allow producers and consumers of information to talk the same language. In doing so, all of the information forms have been forced to be standardized so that the information language is discoverable through namespace declarations and associated style guides.

Why bother?

It's all well and good for something like a web browser which needs to display information, but it's overkill for the use of XML as a simple data exchange format. All you really need is for an information consumer to recognize an element that it knows about and deal with it.

So I'm proposing something new. FreeXML. A freeXML document can look just like an XML document. The only difference is that it doesn't care what it is presented with. Either it recognizes the data or it doesn't. Namespace declarations? We don't need no steenkin' namespaces.

<freeXML>
<html>
<head><title>a freeXML document which contains HTML</title></head>
<body>
Anybody can do it. See?
</body>
</html>
</freeXML>

Now let's go a step further -

<freeXML>
<animals>
<item><name>dog</name></item>
<item><name>cat</name></item>
</animals>
</freeXML>

Either you know what an 'animals' is and how to deal with it or you don't and you ignore it. This is what every XML consumer does now. The only difference is - No DOCTYPE, no namespace declarations with associated DTD, no XSLT. Either the information consumer can handle the data the producer produces, or it can't.

What about extensibility? What about it...

<freeXML>
<animals>
<item><name>dog</name><mypetname>Fido</mypetname></item>
<item><name>cat</name><mypetname>Fluffy</mypetname></item>
</animals>
</freeXML>

Again, either you know how to deal with <mypetname> or you don't. Validation? Why? If you've grabbed this 'animals feed' from a remote source and don't understand a particular element, it wasn't meant for you, and you can ignore it.

What can you do with freeXML? Anything you can do with XML. It's just another type of markup. Heck, you can embed XML into freeXML. Here's an RSS feed -

<freeXML>
<xml>
<?xml version="1.0" encoding="iso-8859-1" ?>
<rss version="2.0" >
<channel>
<language>en-us</language>
<title>Diary and Other Rantings</title>
<description>Life in Silicon Valley by a former software engineer who now runs a music store.</description>
<link>http://macgirvin.com/blog</link>
<lastBuildDate>Mon, 19 Dec 2005 11:57:51 -0800</lastBuildDate>
<generator>Note-a-Day Weblog - Version 2.2</generator>
<copyright>Copyright 2005 Mike Macgirvin</copyright>
<webMaster>mike@macgirvin.com (Mike Macgirvin)</webMaster>
<managingEditor>mike@macgirvin.com (Mike Macgirvin)</managingEditor>

<item>
<pubDate>Sat, 17 Dec 2005 12:00:00 -0800</pubDate>
<title>Goodbye, Ruby Tuesday..</title>
<description>Who could hang a name on you?&lt;p /&gt;Actually, the name is &apos;Ruby on Rails&apos;. It&apos;s quite an interesting moniker for a programming language. OK, the language is Ruby. The &apos;on rails&apos; part has to do with adding the programming language with database classes into a web server&amp;nbsp; and database environment. The example is an entire web-based recipe database in one line of code. That&apos;s impressive, and it&apos;s attracting a lot of attention. It was only a matter of time. Programmers are lazy folks. We don&apos;t like to write the same things over and over. So every time a new language pops up that includes more and more of the stuff that we&apos;ve written over and over again, it&apos;s bound to take off. &lt;p /&gt;But if you look under the hood, it&apos;s not quite one line of code to write a web based recipe database. In fact the tutorial takes three pages of system configuration and database mucking before you get to the one line of code. Some things never change. &lt;br /&gt;</description>
<link>http://macgirvin.com/blog/index.php/DEC-2005#article-17-DEC-2005</link>
<guid isPermaLink="true">http://macgirvin.com/blog/article.php?17-DEC-2005</guid>
<comments>http://macgirvin.com/blog/feedback.php?17-DEC-2005</comments>
<category>software</category>
</item>
</channel>
</rss>
</xml>
</freeXML>

Categories: software rantings
Comments? | More Actions Open/Close menu
Back
"The only way for a reporter to look at a politician is down."
-- H.L. Mencken