ISSUE-131: Specification bug where @href accidentally overrides @content

@href overrides @content

Specification bug where @href accidentally overrides @content

State:
CLOSED
Product:
3rd LC Comments - RDFa 1.1 Core
Raised by:
Niklas Lindström
Opened on:
2012-02-20
Description:
I've come across something surprising when helping some people apply
RDFa 1.1 recently. At first I thought it was a bug in a distiller, but
this behaviour is actually defined in "7.5 Sequence", step 5.

Given this markup:

<div vocab="http://schema.org/" about="#me">
<a property="email" href="mailto:peter@peterkrantz.se"
content="peter@peterkrantz.se">Send me an e-mail</a>
</div>

I was expecting:

<#me> schema:email "peter@peterkrantz@se" .

But the actual result is:

<mailto:peter@peterkrantz.se> schema:email "peter@peterkrantz.se" .

Meaning not only that @href has precedence over @content, but, more
importantly, that @href suddenly behaves like @about within the same
element! While resource attributes of course set the subject for
*nested* RDFa, I thought that we didn't want them to swap roles like
this?

(Notice that my point here is this swapping behaviour. (And that I
expected @content to overrule @href, given that they both represent
object values.) To get the expected results I can of course e.g. add
an empty @rel, or wrap the link in a span and put the @property there
instead. Or override @href with either @resource="#me" *or*
@about="#me".)

In fact, I notice also that this:

<a property="email" href="mailto:peter@peterkrantz.se"
datatype="">peter@peterkrantz.se</a>

Produces this:

<mailto:peter@peterkrantz.se> schema:email <mailto:peter@peterkrantz.se> .

That is, merely adding @datatype="" makes @href supply both subject and object!

For context, compare the above to:

<span property="email" content="peter@peterkrantz.se"></span>

And:

<a property="email"
href="mailto:peter@peterkrantz.se">Send me an e-mail</a>

Where @content and @href clearly are objects. I wonder if this is a
bug in the spec, or intended behaviour?

As I recall, we *did* discuss behaviour like this when we changed @src
into a resource attribute. That is, while @src behaves like a resource
attribute (supplying the object) here:

<img property="image" src="images/peter_krantz.jpg" />

It could behave like @about (i.e. supply the subject) here:

<img property="rdfs:label" src="images/apple.jpg" content="An apple" />

And it actually does! But I thought that we decided against it, given
that it would be confusing in general (as illustrated above).
Related Actions Items:
No related actions
Related emails:
  1. Re: Adding test cases to the suite to cover ISSUE-131 (from gregg@kellogg-assoc.com on 2012-03-23)
  2. Re: Adding test cases to the suite to cover ISSUE-131 (from lindstream@gmail.com on 2012-03-23)
  3. Re: Adding test cases to the suite to cover ISSUE-131 (from gregg@kellogg-assoc.com on 2012-03-23)
  4. Re: Adding test cases to the suite to cover ISSUE-131 (from ivan@w3.org on 2012-03-23)
  5. Adding test cases to the suite to cover ISSUE-131 (from lindstream@gmail.com on 2012-03-22)
  6. Re: Official Response to ISSUE-131 from RDF Web Apps WG (from lindstream@gmail.com on 2012-02-27)
  7. Official Response to ISSUE-131 from RDF Web Apps WG (from msporny@digitalbazaar.com on 2012-02-26)
  8. [REVISED] Telecon Agenda - February 23rd 2012, 1500 UTC (from msporny@digitalbazaar.com on 2012-02-23)
  9. Re: Telecon Agenda - February 23rd 2012, 1500 UTC (from ivan@w3.org on 2012-02-20)
  10. ISSUE-131 (@href overrides @content): Specification bug where @href accidentally overrides @content [3rd LC Comments - RDFa 1.1 Core] (from sysbot+tracker@w3.org on 2012-02-20)
  11. Telecon Agenda - February 23rd 2012, 1500 UTC (from msporny@digitalbazaar.com on 2012-02-19)

Related notes:

PROPOSAL: @href MUST NOT override @content when @property is used on the same element.

Manu Sporny, 23 Feb 2012, 05:42:39

RESOLVED: Fix the specification bug that ignores @datatype in step #11. (non-substantive)

http://www.w3.org/2010/02/rdfa/meetings/2012-02-23#resolution_1

Further discussion that @href does not override @content or @datatype when @property is found on the same element:

http://www.w3.org/2010/02/rdfa/meetings/2012-02-23#ISSUE__2d_131__3a____40_href_overrides___40_content

Manu Sporny, 26 Feb 2012, 21:18:45

Display change log ATOM feed


Chair, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 131.html,v 1.1 2015/03/27 14:12:20 vivien Exp $