Friday, August 6, 2010

The problem with HTML5

This XFBML might be extremely awesome for XHTML languages, but in my case it's not directly compatible with my website because I use HTML5. The thing is that in order to use FBML, an XML namespace must be declared. This is mostly done in the html element of the page and looks like this:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/200
8/fbml">...</html>

Now, declaring an XML namespace is not yet confirmed to be valid HTML5. Using the (experimental) validator on W3C will mark these declarations (and all FBML tags) as erroneous code. This means that until now it is morally illegal to use FBML in HTML5.

I've read that HTML5 aims to be compatible with HTML4 and XHTML1.0 Strict and will just mark initially unsupported elements or attributes as deprecated. I don't know whether this can be confirmed. Even if so, this still this means that our xmlns attribute could be deprecated (in HTML5) instead of being completely supported. I don't like to use deprecated code, so this still isn't a good solution to me.

Also note that FBML will be parsed by many browsers, even if the page is served as HTML5. So developers who don't care about valid markup can just use it.

1 comment:

  1. Hi! Did you solve the problem? We are experimenting the same issue, and i can't find documentation on this!

    ReplyDelete