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

Re: RDFa API - uniting bnode, uri and projected objects

From: Toby Inkster <tai@g5n.co.uk>
Date: Tue, 27 Apr 2010 14:16:16 +0100
To: public-rdfa-wg@w3.org
Message-ID: <20100427141616.7e12c11d@miranda.g5n.co.uk>
On Tue, 27 Apr 2010 09:23:04 +0100
Toby Inkster <tai@g5n.co.uk> wrote:

> For want of a better term, I'll call this superclass "Resource" as
> it's analogous to an rdfs:Resource.

Expanding on this a little...

	var x = new URI("#foo");
	var y = new URI("#foo");

	if (x == y) { this_should_work(); }

So, in particular:

	<span about="#foo" predicate="ex:test" href="#bar"></span>
	<span about="#foo" predicate="ex:test" href="#baz"></span>

	<script type="text/javascript">
	  var triple_list = rdfa.filter();
	  var t0 = triple_list[0];
	  var t1 = triple_list[1];

	  // the subjects are the same
	  if (t0.subject == t1.subject)
	  {
	    // this should work
	  }
	</script>

But t0.subject.element doesn't make sense now. t0.subject and
t1.subject are the same resource, but have different elements.

So, further to my previous proposal we should extend the current
RDFTriple interface to include three additional readonly attributes:

	readonly attribute Node subjectElement;
	readonly attribute Node predicateElement;
	readonly attribute Node objectElement;

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>
Received on Tuesday, 27 April 2010 13:18:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 04:55:06 GMT