RDF in SVG (or other XML)

The SVG spec uses RDF in its examples of what to put in <metadata> elements,
and I was wondering how people were getting on with this in practice. In
particular, unmarshalling the markup in such a way that references between
the SVG elements and RDF statements are maintained/created in their
respective models strikes me as potentially tricky.

It's a fairly general problem - I know folks have done RDF scraping from
(X)HTML, but I can't remember seeing anything that kept references to
fragments annotated with the RDF.

The simplest way that occurs to me would be to run the source doc through
stylesheets first to split it into separate SVG and RDF DOMs, and then pass
these to appropriate APIs. If the original generator included
cross-references in the RDF then the XSLT should be pretty trivial. This
does seem like a bit of a sledgehammer approach though, presumably it should
be possible to do it more elegantly using DOM programmatically.

This is the kind of thing that only needs implementing once, and I am of
course hoping someone (who is liberal with their code!) has already done
this using Batik + Jena or similar ;-)

Cheers,
Danny.

---
Danny Ayers
<stuff> http://www.isacat.net </stuff>

Idea maps for the Semantic Web
http://ideagraph.net

Received on Friday, 9 August 2002 06:51:57 UTC