W3C home > Mailing lists > Public > www-validator@w3.org > July 2013

Validating an XHTML+RDFa 1.0 Page Containing Facebook fb: Elements?

From: Aaron Davies <adavies42@me.com>
Date: Tue, 30 Jul 2013 00:57:44 -0400
Message-id: <7198D94C-A5D3-47C4-A26D-646B1F2EB41D@me.com>
To: www-validator@w3.org
I have a page that starts as follows:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
version="XHTML+RDFa 1.0"

From what I've read, this should be the correct way to declare a page that is written in XHTML 1.0, but additionally includes Facebook-specific elements like fb:like-box. However, I've been unable to get the validator to accept it.

I would expect that the validator would either ignore elements it doesn't understand which are in a namespace declared in the html element, or that it would be able to actually use the namespace declaration to go ahead and validate those elements completely.

For the moment, as a workaround, I'm using server-side includes and user-agent sniffing to hide the Facebook elements from the validator, but this feels like a cheap hack.

Is there a better way to get the page to pass validation and still include the Facebook elements?
Aaron Davies
Received on Tuesday, 30 July 2013 04:58:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:09 UTC