有没有办法,使用HTML5(和RDFa?)的“语义”属性来明确地引用地名?这可能是使用地理名称URI,所以像这样(我认为这是不正确的):
<span about="http://sws.geonames.org/7298792">St Mary's</span> is a great place to go coasteering.
如果在世界各地经常重复许多地名,例如St Mary's,那么能够“消除歧义”将被引用的位置会很棒。
我正在寻找类似于HTML5中时间的解决方案,其中有一个标签可以使时间明确且机器可读:
<time datetime="2013-03-14">last Thursday</time>
答案 0 :(得分:4)
你的例子很好,你可以在HTML和RDFa中引用一个地方。使用地理名称也是一个好主意。
PS:Google测试工具不会显示任何内容,因为您的数据太少,并且您没有将您的地理位置与网页上的任何其他内容相关联。以下是如何改进它。例如,如果你想说这个页面是关于St Mary的,你可以写:
<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>
如果你想将圣玛丽描述为一个有事件的地方,你可以这样做(这次我将schema.org定义为默认词汇,我不使用任何前缀,如'dc'):< / p>
<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>