I think one of the sweet points of RDFa should be in marking up tabular data and then enabling sorting, grouping and simple numeric analysis such as summation over the table using Javascript.

Does anyone have any pointers or examples of this being done?

As an example, how could you mark up the table from Wikipedia's List of tallest structures? (here are the first few rows slightly edited for clarity)

<table class="wikitable">
    <th colspan="2">Pinnacle height</th>
    <th>Structural type</th>
    <th>Main use</th>
    <td><a href="/wiki/Burj_Dubai" title="Burj Dubai">Burj Dubai</a></td>
    <td>2,684 feet</td>
    <td>818 m</td>
    <td>Office, hotel, residential</td>
    <td><a href="/wiki/United_Arab_Emirates" title="United Arab Emirates">United Arab Emirates</a></td>
    <td><a href="/wiki/Dubai" title="Dubai">Dubai</a></td>
    <td>Topped-out on 17 January 2009</td>
    <td><span class="latitude">25°11′50.0″N</span> <span class="longitude">55°16′26.6″E</span></td>
    <td><i><a href="/wiki/Warsaw_Radio_Mast" title="Warsaw Radio Mast" class="mw-redirect">Warsaw Radio Mast</a></i></td>
    <td>2,121 feet</td>
    <td>646.4 m</td>
    <td>Guyed mast</td>
    <td><a href="/wiki/Poland" title="Poland">Poland</a></td>
    <td><a href="/wiki/G%C4%85bin" title="Gąbin">Gąbin</a>-<a href="/wiki/Konstantyn%C3%B3w_(P%C5%82ock_County)" title="Konstantynów (Płock County)" class="mw-redirect">Konstantynów</a>, <a href="/wiki/Masovian_Voivodeship" title="Masovian Voivodeship">Masovian Voivodeship</a></td>
    <td>insulated; collapsed on August 8</td>
    <td><span class="latitude">52°22′3.44″N</span> <span class="longitude">19°48′8.51″E</span></td>

asked 06 Nov '09, 11:29

Ian%20Davis's gravatar image

Ian Davis
accept rate: 13%

I'm not sure I see how leveraging RDFa to annotate a table enables better or more robust JavaScript interaction. I see how it makes the table more understandable by machines parsing the document content. Can you explain what type of value you think that javascript will be able to leverage beyond what can already be done with the myriad of sortable/orderable javascript table solutions (jQuery, prototype, mootools, etc...)

(07 Nov '09, 08:26) spoon16 spoon16's gravatar image

Hi Ian

I wrote a blog post on this topic a couple of months back http://www.webofdatablog.com/articles/2009/08/25/publishing-table-based-data-as-rdfa I was focusing on how to do the markup - I hadn't thought of your suggestion of using Javascript to allow operations on the data.

From comments on that post and some further reading, I reckon that my N-ary relations approach is essentially the best bet, but using SCOVO would be an improvement over my initial experiment.

My example was looking at time-varying data - as other responses to this question have shown, it probably doesn't need to be that complicated in the OP's example, as properties like the height and location of each tower could reasonably be taken to be constant in time.

permanent link

answered 06 Nov '09, 11:48

billroberts's gravatar image

accept rate: 47%

edited 06 Nov '09, 12:13

Very nice post (how did I miss it?)

(06 Nov '09, 11:52) Ian Davis Ian%20Davis's gravatar image

I would probably do something along those lines (of course you should use another vocabulary than ex):

<tr about="http://dbpedia.org/resource/Burj_Dubai">
  <td rel="ex:seeAlso" resource="/wiki/Burj_Dubai" ><a href="/wiki/Burj_Dubai" title="Burj Dubai">Burj Dubai</a></td>
  <td property="ex:heightFeet">2,684 feet</td>
  <td property="ex:heightMeter">818 m</td>
  <td property="ex:yearBuilt">2009</td>
permanent link

answered 06 Nov '09, 12:01

user-142%20%28google%29's gravatar image

user-142 (go...
accept rate: 0%

Starting point below. It's marked community wiki, so please contribute.


  • add the @about attribute to indicate the topic, which is for each row, so on <tr>
  • does anyone know a common ontology for dimensions? height below?
  • using @content to give machine readable version of the value
<table xmlns:ex="http://example.com/"

<tr about="http://dbpedia.org/resource/Burj_Dubai">
  <td><a rel="foaf:page" href="http://en.wikipedia.org/wiki/Burj_Dubai" 
         property="foaf:name">Burj Dubai</a></td>
  <td><span property="ex:height" content="2684" 
            datatype="xsd:integer">2,684 feet</span></td>
    <span property="wgs84_pos:lat" content="25.19722"
    <span property="wgs84_pos:long" content="55.27406"
permanent link
This answer is marked "community wiki".

answered 06 Nov '09, 12:03

Egon%20Willighagen's gravatar image

Egon Willigh...
accept rate: 12%

edited 11 Oct '10, 15:31

tobyink's gravatar image

tobyink ♦

You can use genoname ontology(www.geonames.org/ontology/#) to describe latitudes, longitudes and altitudes etc. using ''wgs84_pos:lat'', ''wgs84_pos:long'' and ''wgs84_pos:alt'' etc. Then RDFQuery(code.google.com/p/rdfquery/) can be employed to glean RDFa from your tables and this will be compatible with your later data processing using Javascript.

permanent link

answered 06 Nov '09, 13:55

Xi%20Bai's gravatar image

Xi Bai
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 06 Nov '09, 11:29

question was seen: 17,570 times

last updated: 11 Oct '10, 15:31