SVG hCard example; sharing profiles?

Ed Davies dropped in a comment [1] about my soupdragon test, pointing
out that a tool that interpreted the doc as SVG would also be bogus
(because it's served as "text/html", authoritative metadata again). A
good point, got me thinking about making a test for SVG too. But I
couldn't find an example of microformats used in SVG, so I made one
(and the test will have to wait...) -

http://dannyayers.com/misc/microformats/hcard-svg

SVG supports a lot of the same constructs as HTML, notably @class.
First impressions suggest a profile definition for a HTML microformat
could be reused with SVG with relatively minor changes.

I'm not entirely sure how best the profile should be associated with
the instance document, SVG profiles seem to be more engineered towards
rendering than layering metadata on top. One possibility would be to
use XHTML's profile attribute, namespace-qualified (ugh!). More
natural would be to use SVG's <metadata> element, something like:

<metadata>
   ...
      <rdf:Description rdf:about="">
         <gspec:profileName rdf:resource="http://www.w3.org/2006/03/hcard" />
      </rdf:Description>
...

Use of GRDDL directly on SVG docs is straightforward (making the
transformation association in the root element), assuming of course a
transformation exists.

Out of curiosity I associated the example here with the hcard2rdf.xsl
which was written for HTML hCard. Running this through Dom's demo [2],
the fn part is recognised ok, but that's all. Tweaks needed on the
XSLT I assume.

Cheers,
Danny.


[1] http://dannyayers.com/2007/03/07/hot-news---people-can#comments
[2] http://www.w3.org/2004/01/rdxh/grddl-xml-demo

-- 

http://dannyayers.com

Received on Thursday, 8 March 2007 11:59:06 UTC