This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15913 - HTML+RDFa adds href, src, rev and rel attributes to all elements
Summary: HTML+RDFa adds href, src, rev and rel attributes to all elements
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML+RDFa (editor: Manu Sporny) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Manu Sporny
QA Contact: public-rdfa-wg
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-06 16:06 UTC by Henri Sivonen
Modified: 2013-01-26 19:05 UTC (History)
6 users (show)

See Also:


Attachments

Description Henri Sivonen 2012-02-06 16:06:44 UTC
http://dev.w3.org/html5/rdfa/#extensions-to-the-html5-syntax says "If HTML+RDFa document conformance is desired, all RDFa attributes and valid values (including CURIEs), as listed in RDFa Core 1.1, Section 2.1: The RDFa Attributes, must be allowed and validate as conforming when used in an HTML4, HTML5 or XHTML5 document."

It doesn't really say which elements these attributes are added to. The failure to say which elements the attributes are added to is a bug, but knowing the nature of RDFa as a general overlay, it's safe to guess that the above-quoted text tries to add attributes to all elements.

The section referred to, http://www.w3.org/TR/rdfa-core/#rdfa-attributes , doesn't contain proper normative statements defining "RDFa attributes and valid values". However, it says "For a complete list of RDFa attribute names and syntax, see Attributes and Syntax."

That section (http://www.w3.org/TR/rdfa-core/#s_syntax) lists href, src, rel and rev.

One has to conclude that HTML+RDFa adds href, src, rel and rev to all elements. I think it's a bad idea to add attributes that look like HTML attributes but that only have their RDFa functionality--not the usual HTML functionality of the attributes of the same names--to elements, because this is confusing.

Please don't add attributes that already have a meaning in HTML to HTML elements that don't already have those attributes in unextended HTML.
Comment 1 Michael[tm] Smith 2012-02-07 03:41:46 UTC
I'm in complete agreement with Henri on this bug.

As somebody who has recently just spent a significant amount of time trying to implement schema support for full RDFa in HTML, I can say that re-purposing existing HTML attributes for uses in HTML+RDFa that they don't have in HTML itself is not a good idea.

The result is confusing for users because they now have to deal with attempting to evaluate two sets of conflicting conformance contraints for the same attribute. And it is complicated to implement schema support and validation support for those attributes without just completely relaxing -- for all cases -- the existing constraints in the HTML spec. (Even after having spent quite a bit of time on trying to correctly express the HTML+RDFa constraints in the schema, I'm still not convinced I've got it right. Part of that is also due to the ambiguities in the spec that Henri has pointed out.)

And the effect that all can have on users it that it may cause them to not be alerted about problems the validator otherwise would have caught and reported to them. In particular, I can imagine cases where a user is accidentally (mis)using an HTML attribute in a particular way -- not with the intent to use it in the context of full RDFa -- and so we are not going to be able to have the validator report the mistake to them in the way it would be otherwise.

For those reasons, I think it makes sense to encourage general users to stick to RDFa Lite unless they are consciously choosing otherwise, and for that to be the default for validation. And I think it make sense to then expose full RDFa validation to users who are knowingly and intentionally opting in to using the full set of RDFa attributes (instead of doing it accidentally) and who really know what they are doing.
Comment 2 Manu Sporny 2012-02-26 22:05:56 UTC
Issues are being tracked here:

http://www.w3.org/2010/02/rdfa/track/issues/130
http://www.w3.org/2010/02/rdfa/track/issues/132
Comment 3 Manu Sporny 2012-03-11 01:12:54 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the tracker issue; or you may create a tracker issue
yourself, if you are able to do so. For more details, see this document:

http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Some issues RESOLVED, Some issues WONTFIX

Technical Description: 

The submitter would like to see all HTML attributes that overlap with RDFa only used on elements that have traditionally used them in HTML to avoid confusing authors that switch between HTML5 and HTML5+RDFa.

Rationale:

These issues were raised and discussed in the RDF Web Apps WG. The question of @src was discussed independently of @href, @rel and @rev everywhere. An official response was provided to Henri on both issues:

http://lists.w3.org/Archives/Public/public-rdfa-wg/2012Feb/0077.html
http://lists.w3.org/Archives/Public/public-rdfa-wg/2012Feb/0078.html

The following resolutions were made:

RESOLVED: In RDFa Core, @href should be specified as an optional RDFa
attribute. In HTML+RDFa, @href is only allowed on elements that it has
traditionally been allowed on. In XHTML+RDFa, @href is allowed on all
elements. In XHTML+RDFa, XML+RDFa and HTML+RDFa, @rel and @rev are
allowed on all elements. (non-substantive)

RESOLVED: The @src attribute is only allowed on elements defined by the
Host Language. (non-substantive)

For the @src attribute, HTML+RDFa will only allow the attribute where it has traditionally appeared in HTML4 and HTML5.
Comment 4 Henri Sivonen 2012-03-15 12:48:13 UTC
Even though this was resolved FIXED, AFAICT, the ED has not changed.
Comment 5 Manu Sporny 2013-01-26 19:05:52 UTC
(In reply to comment #4)
> Even though this was resolved FIXED, AFAICT, the ED has not changed.

I'm processing all HTML+RDFa issues before we go to LC. I'm making sure that we implemented all of these resolutions:

In RDFa Core, @href should be specified as an optional RDFa attribute. 

Verified: http://www.w3.org/TR/rdfa-syntax/#s_syntax

In HTML+RDFa, @href is only allowed on elements that it has traditionally been allowed on. 

Verified: http://www.w3.org/TR/rdfa-syntax/#hostlangconf and http://www.w3.org/TR/rdfa-in-html/#extensions-to-the-html5-syntax

In XHTML+RDFa, @href is allowed on all elements. In XHTML+RDFa, XML+RDFa and HTML+RDFa, @rel and @rev are allowed on all elements. (non-substantive)

Verified: http://www.w3.org/TR/rdfa-in-html/#extensions-to-the-html5-syntax

RESOLVED: The @src attribute is only allowed on elements defined by the
Host Language. (non-substantive)

Verified: http://www.w3.org/TR/rdfa-syntax/#s_syntax and http://www.w3.org/TR/rdfa-syntax/#hostlangconf