Re: RDFa and Web Directions North 2009

On Feb 18, 2009, at 22:27, Karl Dubost wrote:

> Le 18 févr. 2009 à 06:28, Henri Sivonen a écrit :
>> Note that the Validator.nu HTML Parser currently exposes a XOM  
>> tree, so a parser exposing XOM is not a theoretical construct. None  
>> of the currently drafted HTML5 features need the change that  
>> exposing xmlns:foo-based RDFa would require for consistency with  
>> the exposure of xmlns:foo in XML.
>
>
> I still don't get this. Could you explain?

You quote me talking about XOM in particular but ask me about  
validation. Which one did you mean to ask me about?

> Let's suppose, Gedanken experiment, that the few attributes  
> (@content, @about, @property, @resource, @datatype, @typeof and  
> xmlns:foo) needed for "validation talisman" [(c) hsivonen] are added  
> to html5.
>
> For example,
>
>   xmlns:cc="http://creativecommons.org/ns#" is declared

As things are currently defined, this is a namespace declaration that  
establishes a namespace mapping scope in XML but is a plain namespace- 
insensitive but infoset-violating attribute ["","xmlns:cc"] in HTML.  
The latter can't be exposed via XOM without XOM throwing and can't be  
exposed in properly configured SAX without violating the API contract  
(that the interfaces themselves don't enforce but existing libraries  
might rely on in undocumented ways).

> And in the document, there is
>
>   <a rel="cc:license"
>      href="http://creativecommons.org/licenses/by-nc-nd/3.0/"
>      >Creative Commons License</a>.
>
> For validation, only html:a, html:rel, html:href matters. no?

No. A proper validator would have to check if cc is unbound, no? As a  
validator developer, I'd want this above-parser check to run exactly  
the same code for HTML+RDFa and XHTML+RDFa. (Yes, one possibility of  
getting there is changing HTML parsing. My main point here is to show  
that advocating for attributes like @property & friends while  
pretending that there also isn't a countably infinite number of  
attributes of the form xmlns:foo that would need special care is  
highly misleading.)

(Further, for precision, rel and href are not in the HTML namespace.  
They are in no namespace.)

> An authoring help tool could go further, but on another layer, such  
> as checking if the "cc:" in "cc:license" has been declared.

What's the difference between a validator and an authoring help tool?  
Why shouldn't the validator check if cc has been declared?

> We could also imagine a tool which once  the values have been  
> extracted to create a graph, if the graph is valid. But all of that  
> is not in the html5 territory.

It would be in the territory of an HTML5+RDFa validator, though,  
wouldn't it.

> It would be like trying to validate a jpeg image or even more the  
> XMP content of a JPEG image.

It would be good for validators to validate image files, too.  
Unfortunately, the resources available for validator development  
haven't permitted addressing this item as it is perceived as being  
lower priority than a lot of other stuff.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Thursday, 19 February 2009 07:50:18 UTC