在RDFa中使用@rev与@property是合法的

时间:2012-02-20 04:44:48

标签: rdf rdfa

在以下RDFa片段中:

<span about="example.com/subjectURI" rel="example.com/predicateURI" property="literalText"></span>
<=> about =属性中的URI是主题(确定URI引用的实体,但是你明白了),rel表示谓词和属性表示文字对象。我知道使用谓词的rev属性会反转主题和对象,以便about = now引用RDF语句的对象。但是,根据我的阅读,文字似乎不允许成为主题。那么,以下是合法的吗?

<span about="example.com/objectURI" rev="example.com/predicateURI" property="literal-text-as-a-subject"></span>

现在有人可能会争辩说文字文本可能是一个陈述的主题。例如,史蒂文科尔伯特可能会写下以下的RDFa:

<span about="www.stevencolbert.com/verytruthy" rev="www.stevencolbert.com/truthyness" property="Only geeks would care about whether one could use @rev with @property, whatever the hell that means."></span>

1 个答案:

答案 0 :(得分:3)

回答您的具体问题:是的,这是合法的。它有用吗?很少(如果有的话),它没有做你想的。

从你的例子中可以看出一些困惑:

首先(次要)你没有使用绝对URI。我的假设是你的意思是http://example.com/subjectURI而不是example.com/subjectURI等,但它们不是一回事。

其次,您正在使用property="literalText"。我的猜测是propertycontent的混合。你想要的是:

<html xmlns:ns="http://example.com/">
...
<span about="http://example.com/subjectURI" 
      property="ns:predicateURI"
      content="literalText"></span>

结果是:

<http://example.com/subjectURI> <http://example.com/predicateURI> "literalText" .

或者使用等效结果(假设为xmlns):

<span about="http://example.com/subjectURI" 
      property="ns:predicateURI">literalText</span>

relrev用于将两个URI, not URI与文字相关联;这就是property的作用。由于没有property的倒数,你无法成为一个文字主题。

相关问题