4

Is there a way, using "semantic" properties of HTML5 (and RDFa?) to unambiguously refer to a place name? This might be using a geonames URI, so something like this (which I assume is incorrect):

<span about="http://sws.geonames.org/7298792">St Mary's</span> is a great place to go coasteering.

Where many place names are so often repeated throughout the World, such as St Mary's, it would be great to be able to 'disambiguate' which location is being referred to.

I am looking for a solution similar to that for time in HTML5, where is a tag to make a time unambiguous and machine-readable:

<time datetime="2013-03-14">last Thursday</time>
severecci
  • 193
  • 1
  • 6
  • You mean that a certain area (like St Mary's) has a different timezone or that you can recall a stored location that repeats itself (refer back to the same attributes)? –  Mar 24 '13 at 19:01
  • The time example is probably misleading. I want a way of defining a location in a story so that a machine will know which St Mary's is being referred to. I do not want to do anything with time. I may also not require RDFa - I am still learning about the technology and trying to understanding it. – severecci Mar 24 '13 at 19:16
  • It seems you have the availabilty of the Dublin Cores (https://en.wikipedia.org/wiki/Dublin_Core) in the RDFa https://en.wikipedia.org/wiki/RDFa). Which one to fit best for locations I don't know for sure. Here's more to read http://dublincore.org/documents/dc-xml/. You might be able to define custom rules that are based on a certain definition you can create yourself (in XML). Very good question :P –  Mar 24 '13 at 19:23

1 Answers1

4

You example is fine as is, that's how you can refer to a place in HTML and RDFa. Using geonames is a good idea too.

PS: The google testing tool won't show anything because you have too little data in there, and you haven't related your geoname place with anything else on your page. Here is how to improve it. For example if you want to say that the page is about St Mary's you can write:

<div prefix="dc: http://purl.org/dc/terms/">
  <span property="dc:subject" resource="http://sws.geonames.org/7298792">St Mary's</span> is a great place to go coasteering.
</div>

If you want to describe St Mary's as a place with an event, you can do it like this (this time I define schema.org as the default vocabulary and I don't use any prefix like 'dc'):

<div vocab="http://schema.org/">
  ...
  <div typeof="Place" resource="http://sws.geonames.org/7298792">
    <span property="name">St Mary's</span> is a great place to go coasteering.
    <div property="event" resource="http://example.org/festival/stmarys1" typeof="Event">
      <span property="name">Festival of St Mary's</span>
    </div>
  </div>
  ....
</div>
scor
  • 940
  • 5
  • 5
  • 1
    If the example is fine, why doesn't the [Google Structured Data Testing Tool](http://www.google.com/webmasters/tools/richsnippets) or the [W3C RDFa Validator](http://www.w3.org/2012/pyRdfa/Validator.html) extract any data from the HTML? Is it because there isn't really any 'structure' to extract? – severecci Mar 25 '13 at 17:16
  • Thank you. I think I'm starting to understand more now. A colleague also pointed me in the direction of schema.org/Place. Using syntax from the [RDFa 1.1 Primer](http://www.w3.org/TR/xhtml-rdfa-primer/#alternative-for-setting-the-context--about), I can reduce your example to the following syntax, which still seems to parse correctly: `
    St Mary's is a great place to go coasteering.
    `
    – severecci Mar 27 '13 at 09:08