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

Re: @title

From: Toby A Inkster <tai@g5n.co.uk>
Date: Fri, 18 Apr 2008 15:05:51 +0100
Message-Id: <588FB325-8FF9-41F4-955F-2CB56A704275@g5n.co.uk>
Cc: Mark Birbeck <mark.birbeck@x-port.net>, public-rdf-in-xhtml-tf@w3.org
To: Dan Brickley <danbri@danbri.org>

On 17 Apr 2008, at 09:31, Dan Brickley wrote:

 > And imagemaps too I hope -
 > http://www.w3.org/QA/2008/01/rdfa_and_html_imagemap.html
 > If anyone with an RDFa parser cares to experimentally extend it so we
 > can get imagemap path data out as triples, I'd be very happy...

I'd be interested in implementing this.

As an example, to get this information out:

		<foaf:Person rdf:about="#me">
			<foaf:name>Toby Inkster</foaf:name>
		<foaf:Image rdf:about="http://example.com/mypic">
				<imreg:Rectangle rdf:nodeID="#reg">
					<imreg:regionDepicts rdf:resource="#me" />

... from something like this:

	<div about="#me" class="figure">
		<img src="mypic" alt="Photo of: " usemap="#themap" />
		<span class="legend" property="foaf:name">Toby Inkster</span>
	<map name="themap" id="themap">
		<area shape="rect" coords="42,17,304,231" href="#me"
		rel="imreg:regionDepicts" />

The only extra rules required would be:

	1. Any <area> elements have an implicit @typeof attribute of
	   imreg:Rectangle, imreg:Polygon or imreg:Circle depending
	   on the contents of @shape.

	2. For any <img> elements with a non-empty @usemap, an implicit
	   imreg:region relationship exists between the image URI and
	   each <area> element within the map.

A slight problem though is that it increases parsing complexity
significantly, owing to the fact that the <map> element may be
anywhere in the page, so may be encountered either before or
after the <img> element.

Toby A Inkster
Received on Friday, 18 April 2008 14:06:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:27 UTC