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

Re: Minutes for July 30th, 2009 RDFa Telecon

From: Martin McEvoy <martin@weborganics.co.uk>
Date: Wed, 05 Aug 2009 16:41:54 +0100
Message-ID: <4A79A842.7090701@weborganics.co.uk>
To: Philip Taylor <pjt47@cam.ac.uk>
CC: RDFa Developers <public-rdf-in-xhtml-tf@w3.org>
Thanks Philip for your very thorough reply....

Philip Taylor wrote:
> 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.)

Agreed so no colons in attributes...
>> 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.

Ok I understand that....
> 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.
So something like this would be a suitable proposal:

<section data-pet="http://example.com/animal#"
         typeof="pet:cat animal:feline">
<h2 property="pet:name">Hedral</h2>
 <p property="pet:desc">
    Hedral is a <span property="animal:gender">male</span> <span 
property="animal:title">american domestic shorthair</span>,
    with a fluffy <span property="pet:color">black</span> fur with  
<span property="pet:color">white</span> paws and belly.
<img property="pet:photo animal:img" src="hedral.jpeg" alt="an american 
domestic shorthair cat" title="My Cat Hedral" />

Of course we dont have to really use RDFa terms at I dont think that 
should count as not being RDF in attributes....

<section data-pet="http://example.com/animal#"
               item="pet:cat animal:feline">
<h2 itemprop="pet:name">Hedral</h2>
 <p itemprop="pet:desc">
    Hedral is a <span itemprop="animal:gender">male</span> <span 
itemprop="animal:title">american domestic shorthair</span>,
    with a fluffy <span itemprop="pet:color">black</span> fur with  
<span itemprop="pet:color">white</span> paws and belly.
<img itemprop="pet:photo animal:img" src="hedral.jpeg" alt="an american 
domestic shorthair cat" title="My Cat Hedral" />

Both of the above examples seem OK to me, the second in particular.

Thanks again

Martin McEvoy
Received on Wednesday, 5 August 2009 15:42:46 UTC

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