W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > January 2004

Generic extraction (and Atom extension)

From: Danny Ayers <danny666@virgilio.it>
Date: Fri, 16 Jan 2004 12:27:00 +0100
To: <public-rdf-in-xhtml-tf@w3.org>
Cc: "Eric Scheid" <eric.scheid@ironclad.net.au>, "Morten Frederiksen" <mof-rdf@mfd-consult.dk>
Message-ID: <BKELLDAGKABIOCHDFDBPKECMFCAA.danny666@virgilio.it>


This partly a marginally off-topic fyi, partly a more on-topic hunt for a
code snippet. It's early days stuff, so any thoughts/suggestions would be
greatly appreciated.

I've been looking at applying essentially the same techniques as the
rdf-in-xhtml proposal on a proposed extension mechanism for the Atom
syndication language [1]. Within Atom, the key part here is the <link>
element, which will be used to point to external resources, e.g.

<link rel="comments" href="http://www.example.org/blog/entry1"

There will be a set of standard values for rel [2], but the construct is
ideal for extension using the ideas of RFC 2731 [3] (Encoding Dublin Core
Metadata in HTML). I made a start at writing this up at [4] (without
reference to RDF for political reasons ;-), and Eric Scheid has begun
turning this into a formal RFC (which will eventually contain the RDF

Following the same path as rdf-in-xhtml, something of the form above should
be transformable into RDF.

e.g. the Atom source:

    <link rel="schema.FOAF" href="http://xmlns.com/foaf/0.1/" / >
   <title>Fear of Vegemite</title>
   <link rel="FOAF.depiction"
        title="danbri with yeast extract" />

would map (in part) to something like:

<rdf:RDF xmlns:atom="http://purl.org/atom

<atom:entry rdf:about="http://example.org/blog/post123">
    <foaf:depiction rdf:resource="http://rdfweb.org/vegemite.jpg" />


(btw, a link rev="..." attribute has been proposed, which would reverse the
role of the URIs in the statement).

Ok, that's the fyi. Now the snippet-hunt. I'll put it in terms of atom:link,
but I believe it would be essentially the same for xhtml:meta or whatever
else is used in rdf-in-xhtml.

Given that XSLT is a complete language, presumably it should be possible to
do this transformation in a generic fashion on arbitrary namespaces and
properties. So:

<link rel="schema.NS" href="http://example.org/namespace" / >
<link rel="NS.property" href="http://example.org/objectURI" />


<rdf:RDF ...

<rdf:Description rdf:about="http://example.org/subjectURI">
	<ns:property rdf:resource="http://example.org/objectURI" />


(the <id> element is a little clunky, but that looks like the way it's going
to be done in Atom)

I was wondering if anyone had a bit of code that did something like this -
I'm only a novice with XSLT, so it would take me a good while to figure out.


[1] http://www.intertwingly.net/wiki/pie/FrontPage
[2] http://www.intertwingly.net/wiki/pie/LinkTagMeaning
[3] http://www.ietf.org/rfc/rfc2731.txt


Received on Friday, 16 January 2004 06:39:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:01:43 UTC