- From: Philip Taylor <pjt47@cam.ac.uk>
- Date: Wed, 23 Sep 2009 13:58:57 +0100
- To: Toby Inkster <tai@g5n.co.uk>
- CC: Manu Sporny <msporny@digitalbazaar.com>, HTMLWG WG <public-html@w3.org>, RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
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. http://www.london-gazette.co.uk/issues/59061/notices/816373/all=cheese uses <li rel>: <li class="lteIE6_first-child" about="http://www.london-gazette.co.uk/id/issues/59061/notices/816373" typeof="g:Notice" rel="foaf:page"> and http://www.civilservice.gov.uk/jobs/careers-detail.aspx?JobId=7808 uses <span rel>: <span rel="dc:publisher" href="http://www.civilservice.gov.uk/"></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 issue.) -- Philip Taylor pjt47@cam.ac.uk
Received on Wednesday, 23 September 2009 12:59:40 UTC