Presentable and Parseable Information

Roger Costello

I Want More from Information!

  1. I am not satisfied with information that can only be processed by machines.
  2. I am not satisfied with information that can be viewed in a browser, but cannot be processed by machines.
  3. I want both! I want information that can be viewed in a browser and can be processed by machines.
  4. I want presentable and parseable information!

Getting More out of Information

  1. XML is great for machine processing, but is not directly consumable by browsers, cellphones, or screen readers. That is, it's not good for presentation.
  2. XHTML is great for presentation, but its tags lack the semantic richness that a good collection of XML tags can provide. That is, it' not good for processing.
  3. However, XHTML can be semantically enhanced! Just about every XHTML tag has an optional id and class attribute. XHTML links have an optional rel attribute. Through the use of these attributes XHTML can be semantically enhanced.
  4. XHTML + (id, class, rel) = presentable and parseable information!

Converting XML into Presentable and Parseable Information

Here is an XML document. It uses a nice set of semantically rich tags:

<Book> <Title>The Wisdom of Crowds</Title> <Author>James Surowiecki</Author> <Date>2005</Date> <ISBN>0-385-72170-6</ISBN> <Publisher>First Anchor Books</Publisher> </Book>

Here the XML has been converted into presentable and parseable information:

<div class="Book"> <span class="tag">Book</span> <ul> <li> <span class="Title"> <span class="tag">Title</span>: <span class="value>The Wisdom of Crowds</span> </span> </li> <li> <span class="Author"> <span class="tag">Author</span>: <span class="value>James Surowiecki</span> </span> </li> <li> <span class="Date"> <span class="tag">Date</span>: <span class="value>2005</span> </span> </li> <li> <span class="ISBN"> <span class="tag">ISBN</span>: <span class="value>0-385-72170-6</span> </span> </li> <li> <span class="Publisher"> <span class="tag">Publisher</span>: <span class="value>First Anchor Books</span> </span> </li> </ul> </div>

It uses the XHTML tags - div, span, ul, li - so it is instantly presentable on over a billion devices (browsers, cellphones, screen-readers, PDA's, and so on). Here is how it might appear in a browser:

Book

Plus, by using the class attribute, the XHTML document has been enhanced with the same rich semantics as the XML version, so it can be processed by Java or XSLT or any other kind of application.

It is presentable and parseable information!

Tags for this Document

Practice what I Preach

Here is a presentable and parseable document that contains a list of all the XML Schema datatypes. It is a simple document. As you can see, it is presentable. (I could make it look a lot nicer were I to create a CSS stylesheet) And if you view source you will see that it is semantically rich. I have written several applications which uses it.

This document is presentable and parseable information.