문제

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>
도움이 되었습니까?

해결책

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>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top