HTML5 validator failing on Facebook OpenGraph XML Namespace xmlns:og

HTML 5 validator is failing on my code despite me following the Facebook documentation to the letter. There are a variety of problems but let's start with one example to start with.

I'm following the Facebook "Getting Started" documentation and using th5is code:

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:og="http://ogp.me/ns#"
  xmlns:fb="http://www.facebook.com/2008/fbml">

The only difference is I precede this with <!DOCTYPE html> for HTML5. When running it through the W3C HTML5 validator I get this error:

 Attribute xmlns:og not allowed here

The only things I can think of what the error are:

  1. Facebook's documentation is wrong
  2. I'm supposed to add some kind of namespace to the <!DOCTYPE html> declaration.

However, in either case I don't know what the fix is. Would love some help!

Answers


fb's documentation isn't wrong, but their approach to open web is. those are fb proprietary attribute values, so they're not going to ever validate, unless w3c makes them standards. that may sound gloomy, but as long as those are your only validation errors, don't worry about it. validation is an awesome tool, but remember, it's just a tool.


Need Your Help

Writing polymorphic class data to a file?

c++ derived-class ofstream

So I have these classes. There's one base class, but it has/will have lots and lots of derivatives, and those derivative classes will be able to have derivatives as well. I'd like to be able to h...

Assign Raster band to variable name in Loop - “can't assign” error

python function loops

I want to write two nested loops that iterate over the RGB bands of a series of eight JPG images. Later on these images shall be combined into one array channel by channel, so each array of the cha...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.