hDOAP microformat
September 21st, 2007I wasn’t looking forward to writing code to display DOAP on an HTML page. As a matter of fact, I was burnt out on scraping metadata, converting it to DOAP, getting that into an SQL database, getting it back out and into DOAP again.
I’m using Turbogears for doapspace.org and its default templating system, Kid. No offense Kid, but I just wasn’t in the mood to re-map any more DOAP.
This issue was actually keeping me from finally launching the site. I kept thinking someone must have an RDF-to-Kid plugin for Turbogears somewhere, then on a hunch I searched for DOAP and XSLT and voilla, hDOAP.
hDOAP is Danny Ayers‘ microformat for DOAP. A microformat is an XHTML dialect according to Danny. I haven’t played with everything hDOAP offers yet, but I found exactly what I needed in doap2html.xsl.
Edit: Danny informed me that hDOAP is not an official microformat.
This little gem, with a few lines of Python code using lxml, had doapspace.org displaying DOAP for humans in a couple of minutes.
Now I need to transform the hDOAP so I can include it in a Kid template so it fits with the design layout of the rest of doapspace.org.