Using Microformats in XML

Microformats are designed to work with XHTML by adding semantics to some of its elements. There's nothing wrong with this approach, but I think that we could extend its design principles to make Microformats work with XML. For example, taken the hCard specification, we could write something like this:

<?xml version="1.0" encoding="utf-8"?>


As you can see, our root element is actually vcard, followed by some of the elements defined in the hCard specification. With this approach, our document can actually be used in a wide range of possible scenarios, like mobile directories, email and chat clients and so on. Again, this proves how the extensibility of XML can be used to write new languages which allow us to go beyond the limits of some existing standards.

Leave a Reply

Note: Only a member of this blog may post a comment.