[whatwg] A Selector-based metadata proposal (was: Annotating structured data that HTML has no semantics for)

Henri Sivonen hsivonen at iki.fi
Fri May 22 08:14:09 PDT 2009


On May 22, 2009, at 17:44, Toby Inkster wrote:

> But given that the
> HTML5 spec defines how the DOM is built, there's a very simple  
> solution
> to that -- HTML5 could simply mandate that:
>
> 	<html xmlns:foo="http://foo.example.com/">
>
> generates an identical DOM representation in both XHTML5 and HTML5.
> What's the problem with that?


  1) It's a difference from how browsers behave now. It's a flaw in  
RDFa that it opens the question whether text/html parsing needs to  
change.
  2) Finding out whether the change to parsing is harmless for  
existing content requires shipping a mass-market browser with the  
parsing change.
  3) It would require the HTML parser to look inside the attribute  
name buffer instead of treating it as an opaque string, which would  
add code complexity.
  4) If if you changed this in text/html parsing, next CURIEs would be  
Selector-unfriendly... CURIEs aren't a good match for the platform.

> But for the
> most part, those differences are pretty small and obscure, and don't
> actually effect real world code very much. e.g. the following code  
> seems
> to work fine in Opera, Firefox and Midori (a Webkit browser):
>
> 	http://buzzword.org.uk/2009/dom.html
> 	http://buzzword.org.uk/2009/dom.xhtml

You are using a Namespace-unaware API.

The internal APIs of Gecko and WebKit as well as various non-browser  
XML frameworks are Namespace-aware.

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




More information about the whatwg mailing list