RDFa and HTML imagemap

Part of Data

Author(s) and publish date

By:
Published:
Skip to 2 comments

RDFa is a way to enrich your Web pages with local data. The clear benefit is that your data are in context and then easier to manage. Yesterday, on the RDFa mailing list, Dan Brickley asked how we could use RDFa to extract the information of an HTML imagemap.

Dan says:

HTML has a somewhat neglected notation for describing regions of images, and associating them with links.

[snip]

BTW I have no idea what the current XHTML 2 and WhatWG/HTML5 folks have planned for these elements. But I think this kind of markup has a lot of potential for making images on the Web more automation friendly.

For now, HTML 5 map element doesn't do better than HTML 4.01 or maybe I have missed something.

Max Froumentin had design an XSLT which transforms the imagemap code and then convert it to an SVG ouput with the background tone down to make the imagemap zone more visible.

image map and SVG ouput screenshots

Dan continue:

I'd like a way to say, "this area of the image depicts the person who is the primaryTopic of http://danbri.org/".

A lot of work had been done already in the past on image descriptions with some practical examples, but Niklas Lindström started to give it a stab.

<map name="da8bb51_b" id="da8bb51_b"
    about="[_:the_area]" 
    property="ex:imageMapAreaElement">
    <area  shape="POLY"
        coords="..."
        href="http://danbri.org/" />
</map>

<img  about="[_:the_area]" 
    rel="ex:sourceImage"
    src="2169955372_503da8bb51_b.jpg"  
    width="1024"
    usemap="#da8bb51_b" />
<div about="[_:danbri]" instanceof="foaf:Person">
    <span property="foaf:name">Dan Brickley</span>
    <span rev="foaf:depicts" resource="[_:the_area]"></span>
    <a rev="foaf:primaryTopic" href="http://danbri.org/">(website)</a>
</div>

 

  • Someone has a better suggestion in RDFa?
  • Would it be better done in HTML only without breaking previous implementations of HTML 4 imagemap?

 

I see a lot of possibilities in games, identification, education, cartography. fun. fun.

Related RSS feed

Comments (2)

Comments for this post are closed.