This sample code won’t pass w3c validator.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:foo="http://foo.com/fooxml">
<head>
<title>Foo</title>
</head>
<body>
<foo:TabControl>
</foo:TabControl>
</body>
</html>
What am I missing? What do I need to do to make namespaces to work and pass validation?
Your DTD (
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd) is “XHTML 1.0 Strict” not “XHTML 1.0 Strict + Foo”.If you want to validate you will need to find or create a DTD that includes all the elements and attributes you are using, and change the Doctype to point at that.
The W3C’s list of recommended Doctypes includes a number of multiple namespace documents (such as XHTML + MathML + SVG) that you could use as examples for creating your own.