Re: Request to publish HTML+RDFa (draft 3) as FPWD

Toby Inkster wrote:
> On Wed, 2009-09-23 at 09:52 +0100, Philip Taylor wrote:
>> So I believe these attributes (rel, rev, content, href, src) should
>> only be permitted on the elements that HTML5 currently permits them
>> on.
> Certainly it would be wise to consider the appearance of @href and @src
> on elements HTML5 does not currently permit them on to be
> non-conforming.
> [...]
> However, disallowing @rel, @rev and @content from appearing on arbitrary
> elements would break current content which relies on the fact that they
> can, and break very useful RDFa authoring patterns.

Hmm, that's true. E.g. 
uses <li rel>:

    <li class="lteIE6_first-child" 
typeof="g:Notice" rel="foaf:page">

uses <span rel>:

    <span rel="dc:publisher" href=""></span>

But that second one is also using <span href>, so disallowing href will 
make that page non-conforming. (I think restricting href is still 
worthwhile, to prevent future confusion for HTML authors who don't care 
about RDFa at all and expect href to make links and should get validator 
errors when it doesn't.)

Allowing rel/rev on any HTML element would result in the inconsistency 
that you can write <a rel rev>/<link rel rev> and scripts can access 
a.rel and a.relList and (considered obsolete in HTML5) a.rev; and you 
can similarly write <span rel rev>, but there is no span.rel or 
span.relList or span.rev so you have to use span.getAttribute() instead. 
Also you can write <area rel rev> and access area.rel and area.relList 
but *not* area.rev. If HTML+RDFa encourages the use of these content 
attributes on any element, and allows the IDL attributes only on a few 
elements, that seems a bit unpleasant. (The unpleasantness has to be 
balanced against other arguments; I just want to make sure it's a known 

Philip Taylor

Received on Wednesday, 23 September 2009 12:59:40 UTC