1

我正在使用 FOAF 和 RDFa,并努力弄清楚我是否应该使用 foaf:depiction 或 foaf:depicts 以及使用它们的正确方法。这是我已经建立的:

<div class="profile" typeof="foaf:Person">
<p>Employee Name: <span property="foaf:name">Fred Flintstone</span></p>
<p><img src="http://www.example.com/fred.jpg" alt="Photo of Fred Flintstone" /></p>
</div>

我知道描绘和描绘是反向相关的。我搜索了互联网的广阔范围,但找不到任何具体的例子。根据我的阅读,Image 描绘了 Person,所以我倾向于使用 foaf:depiction,因为我的主题是 Person,但我不确定如何正确使用。相对还是转速?在图像本身还是在封闭段落上?

4

2 回答 2

2

看起来我正在处理一个利基主题。我做了更多的搜索和阅读,我想我在这里找到了答案:http://www.w3.org/TR/2008/WD-xhtml-rdfa-primer-20080317/#using-src-on-img

总而言之,我对术语的怀疑是正确的:
图像->描绘->人物
人物->描绘->图像

但是,foaf:img属性是一个更具体的术语,而不仅仅是专门用于将 Person 与代表他们的 Image 相关联的描述。所以使用它本来是正确的,使用rel="foaf:depiction"它(在我的情况下)更正确rel="foaf:img"

这是最终的代码:

<div class="profile" typeof="foaf:Person">
<p>Employee Name: <span property="foaf:name">Fred Flintstone</span></p>
<p rel="foaf:img" rev="foaf:depicts"><img src="http://www.example.com/fred.jpg" alt="Photo of Fred Flintstone" /></p>
</div>

rev属性指定图像与人的反向关系。这巩固了这些对象之间存在相互关系,而不是单方面的关系。

So whether it is correct to use rel or rev depends on what your subject is. If I had a foaf:Image and with a list of multiple people in the image, the correct markup would be rel="depicts".

It's a shame that many examples were removed in future version of the RDFa Primer, but fortunately all previous versions are retained for the future.

于 2009-02-19T21:54:07.813 回答
0

Scott - the answer is that depicts and depiction are inverse properties of each other, as you found out, it is defined like this in the FOAF spec:

<rdf:Property rdf:about="http://xmlns.com/foaf/0.1/depicts" rdfs:comment="A thing depicted in this representation.">
[...]
<owl:inverseOf rdf:resource="http://xmlns.com/foaf/0.1/depiction"/>

This means that if you have proper inference in your store, it doesn't matter which one you use, they should both appear.

FOAF uses a few things like that, primaryTopic/isTopicOf, topic/page, maker/made, etc. FOAF also makes use of inverseFunctionalProperties, i.e. properties where a certain value is tied uniquely to a single person. The usual example is mbox, if you find two FOAF Person entities with the same email address, you can infer that they are actually the same person, since they are uniqiuely identified by their email address.

于 2009-04-24T10:03:35.697 回答