W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2009

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

From: Henri Sivonen <hsivonen@iki.fi>
Date: Fri, 22 May 2009 18:14:09 +0300
Message-ID: <935673B6-5E1C-4B25-8265-A9A7FF1D326A@iki.fi>
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/
Received on Friday, 22 May 2009 08:14:09 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:49 UTC