By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,130 Members | 2,141 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,130 IT Pros & Developers. It's quick & easy.

xmlns attribute produces XHTML validation error.

P: n/a
I have an xmlns attribute that produces an XHTML validation error and I
do not understand why it is considered an error.The file displays as
expected on Firefox and IE7.
<?xml version="1.0" encoding="UTF-8"?>
"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
<html dir="ltr" xml:lang="en"
<title>NG 2007-06-25</title>
<h1>NG 2007-06-25</h1>
<xhtml:p xmlns=""

When I run it through the W3C validator it identifies several errors.
Error Line 13, column 15: there is no attribute "xmlns" .

<xhtml:p xmlns=""
_HTML & XHTML The Definitive Guide_ (6th Edition) by Musciano & Kennedy
section 16.2.2, page 497:
...the xmlns attribute... You can place it within the start tag of any
element within your document...
The example with the error is a reduced version of the results produced
For more context of what I am working upon see:

C.W.Holeman II | cw***
To only a fraction of the human race does God give the privilege of
earning one's bread doing what one would have gladly pursued free, for
passion. I am very thankful. The Mythical Man-Month Epilogue/F.P.Brooks
Jun 25 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a
On 25 Jun, 16:47, "C.W.Holeman II" <>
I have an xmlns attribute that produces an XHTML validation error and I
do not understand why it is considered an error.
Take it to c.i.w.a.h if you want to _understand_ why (and put your
flame-proof pants on first)

The root of it is this:
Content-Type: text/html

You're not using XHTML, you're using XHTML Appendix C. It's XML
content, but sent out deliberately mis-labelled as HTML so that it
gets processed as HTML (ie SGML) and thus makes IE work. It's a hack,
but it's still the only way to serve XHTML to the majority of

Under Appendix C, you can't do namespacing (meaningless in SGML), so
of course your code is invalid.

It's also arguable that you can't do Appendix C for XHTML 1.1 and can
only do it for XHTML 1.0

Jun 25 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.