Scott Andrew - lo-fi acoustic pop superhero!

Join the Demo Club to unlock new music, get discounts, tour dates and other neato stuff:

or learn more here.

September 18, 2002

Garbage Out

A gripe: XML namespaces. The W3 validator doesn’t like ‘em. Which is bad, because namespaces are vital to embedding XML (like RDF, MathML and SVG) into XHTML. Consider the following snippet:

<?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:sa="http://www.scottandrew.com">
    <head>
        <title>XML in XHTML</title>
    </head>
    <body>
        <sa:p>
          This is a P element from the "sa" namespace.
        </sa:p>
    </body>
</html>

The validator returns the following error:

Error: there is no attribute "xmlns

This is all very frustrating to those of us who have come to use and trust the validator yet want to use the XML features of XHTML. I shouldn’t have to resort to some conditional hack to show my pages validate. It would be nice if the validator politely reported that elements from exotic, alien namespaces had been detected and only checked for well-formedness. Anything is better than belching out an error for otherwise valid markup.

No Comments

Leave a Comment

Get The Tunes

Download Scott Andrew tracks from iTunes Find Scott Andrew at Spotify Find Scott Andrew at Emusic Find Scott Andrew at Lala Find Scott Andrew at Rhapsody Find Scott Andrew at Amazon Find Scott 
Andrew at CD Baby Find Scott Andrew at Napster

More Options

Reader Comments

New Videos

More Videos

Photos

More Photos at Flickr