Problem/Motivation

Currently, the RDF module asks users to specify which attribute the RDFa for a field should use. The options are property, rel, and rev. Which attribute is used determines what the statement actually says.

For example, given the HTML below, the statements using the different attributes would be as follows:

<div about="node/1">
  <div $attribute="schema:about">
    <a href="term/1">Foo</a>
  </div>
</div>
  • If $attribute = 'property', then the statement made is <node/1> <schema:about> "Foo".
  • If $attribute = 'rel', then the statement made is <node/1> <schema:about> <term/1>.
  • If $attribute = 'rev', then the statement made is <term/1> <schema:about> <node/1>.

This has the advantage of giving the site administrator a way to switch between using the string and the href values, depending on what they want to say.

However, the confusion caused by having three separate attributes has resulted in a very high error rate. In an explanation of why Google was not supporting RDFa for Schema.org, Guha said

Google announced supported RDFa in 2009. One of the startling discoveries we made was that the error rate (i.e., webmasters marking up their pages to say X when the really meant to say Y) was about 3 times as much as it was for other formats... More than 40% of the errors had to do with the confusion between rel and property.

Proposed resolution

Use pure RDFa Lite 1.1 (not using the additional features of RDFa 1.1 Core). This means only using the property attribute and determining the value solely based on where that property is placed.

Because RDFa Lite 1.1 adopted the same attribute placement as microdata, this also means that attribute placement would be the same between the two.

Comments

scor’s picture

Status: Active » Fixed

I think it's pretty clear we should just use the @property attribute, especially given the plan to inject attributes inside field formatters. I'm marking this as fixed. reopen if someone disagrees.

Anonymous’s picture

Agreed! I think this will make it easier for other folks to grasp how the RDFa works.

Automatically closed -- issue fixed for 2 weeks with no activity.