W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > May 2010

Re: RDFa DOM API Document update

From: Toby Inkster <tai@g5n.co.uk>
Date: Mon, 17 May 2010 08:17:53 +0100
To: Manu Sporny <msporny@digitalbazaar.com>
Cc: RDFa WG <public-rdfa-wg@w3.org>
Message-ID: <20100517081753.2c37dcba@miranda.g5n.co.uk>
On Sun, 16 May 2010 21:50:18 -0400
Manu Sporny <msporny@digitalbazaar.com> wrote:

> http://www.w3.org/2010/02/rdfa/sources/rdfa-dom-api/Overview-src.html

How exactly do these getElementsByX methods work? Although RDFa defines
how to generate an RDF graph from a DOM tree, it doesn't offer a clear
and unambiguous mapping back from the RDF graph to DOM nodes.

For example:

	<a about="#me" typeof="foaf:Person"
           rel="foaf:homepage" href="http://example.com/">
	  <span rel="rdf:type" resource="[foaf:Document]"
	     property="dc:title">My Homepage</span>
	<i about="#me" property="foaf:name">Joe</i>

What element would be returned in the case of
getElementsByType('foaf:Person')? Presumably the <a> element because it
set the subject for the {?thing rdf:type foaf:Person} triple.

But what about the getElementsByType('foaf:Document')? If we apply the
same reasoning, it would be the <a> element too.

Would the <i> element be selected by getElementsByType('foaf:Person')?
After all, we know #me is a foaf:Person.

As much as I think these getElementsByX methods would be useful, I
don't think they can be implemented in an especially obvious,
consistent and predictable way.

Toby A Inkster
Received on Monday, 17 May 2010 07:19:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:19:47 UTC