W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > August 2009

Re: Minutes for July 30th, 2009 RDFa Telecon

From: Philip Taylor <pjt47@cam.ac.uk>
Date: Wed, 05 Aug 2009 16:28:33 +0100
Message-ID: <4A79A521.6030005@cam.ac.uk>
To: martin@weborganics.co.uk
CC: RDFa Developers <public-rdf-in-xhtml-tf@w3.org>
Martin McEvoy wrote:
> Philip Taylor wrote:
>> HTML 5 (in its text/html serialisation) currently doesn't allow xmlns: 
>> to be used in that way. The only thing it allows is 
>> xmlns="http://www.w3.org/1999/xhtml" on an HTML element, and a few 
>> special cases in inline MathML/SVG content. Anything else is invalid.
> What happens to the invalid attributes?, are they simply marked as 
> garbage and then removed from the DOM?

They are kept in the DOM - the parser doesn't know which attributes are 
valid, so it handles them all the same. (And it doesn't do anything 
special with colons (or any other characters), so the attributes are all 
in no namespace and their local names contain colons (or any other 
characters), so the DOM/infoset is different to what an XML parser gives 
with the same input bytes.)

> "2.4. Pave the Cowpaths
> When a practice is already widespread among authors, consider adopting 
> it rather than forbidding it or inventing something new.
> Authors already use the <br/> syntax as opposed to <br> in HTML and 
> there is no harm done by allowing that to be used. "
> Inventing something new in HTML 5 I would say is microdata why use it If 
> RDFa already exists?

The editor did "consider adopting" RDFa, and decided it would be better 
on balance to invent something new. (I don't care whether that is the 
right decision or not, and it doesn't change the technical issues with 
how attributes containing colons are parsed.)

> It leads me now to believe that using xmlns: is ok anyway, and really 
> HTML5 should try to adapt an existing way that works rather than 
> inventing something new or ignoring RDFa altogether.

HTML5 can't significantly change the way attributes are parsed (because 
it needs to support existing content), and it seems like bad language 
design to encourage use of a feature that behaves unexpectedly (given 
that people expect it to work the same as in XML, and it doesn't quite), 
so the problem exists regardless of whether RDFa is officially supported 
by the HTML5 spec.

The only options for resolving the problem are to ignore it (and put up 
with the DOM inconsistency and the potential for confusion and obscure 
bugs), or to change RDFa-in-text/html to not use colons in attribute 
names (any other character would be fine), and in either case it doesn't 
matter what HTML5 says about RDFa.

> Best wishes

Philip Taylor
Received on Wednesday, 5 August 2009 15:29:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:32 UTC