Microformat converters

As I mentioned previously, I’m setting up a public microformat proxy service. I’m standing on the shoulders of my betters here, as my XML and XSLT knowledge is practically (if not entirely) nonexistent, but despite that I’ve managed to get something up and running and it even mostly works.

The first format I worked on was hAtom, which I got started with the help of Tom Morris on Freenode #microformats. Add a few days troubleshooting and experimenting on my own and it now supports hCard, and hCalendar as well. To use them, either enter the URL of a web page containing one of the supported microformats, or skip that step and just construct a URL of the format http://labs.synaesthetic.net/mf/FORMAT/URL, where FORMAT is either hAtom, hCard, or hCalendar, and URL is, obviously, the URL of the page containing the microformat you want to read.

So let me give you an example. If you’ve got a page containing an hCard and you want people to be able to easily add it to their address books, put a link like this on your site:


Clicking this link will cause my converter to read the hCard from the specified page and offer it for download to the reader, automatically opening up their computer’s address book if supported. Likewise for pages containing hAtom feeds and hCalendars.

These aren’t perfect yet. The hAtom parser, for example, only accepts well-formed XHTML (ie, XML) and will choke on invalid markup or HTML 4. I’m not sure yet if this is a bug or a feature as anyone using hAtom certainly knows enough to write proper XHTML. I’ll fix it if I can but it’s not a very high priority. I made this mainly for my own use, so I don’t have to rely on third-party proxies that may disappear tomorrow, but in the spirit of openness I’m making it available to anyone who wants to use it (with no guarantees, naturally). Keep in mind that this is very much a work in progress. Maybe I should slap a big Beta! label on it.

Find it at labs.synaesthetic.net/microformats. Feel free to report any bugs or problems here.