471,088 Members | 1,267 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,088 software developers and data experts.

xmlns attribute produces XHTML validation error.

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="http://emle.sourceforge.net/emle020100"

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="http://emle.sourceforge.net/emle020100"
_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***@Julian5Locals.com-5 http://JulianLocals.com/cwhii
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
1 3651
On 25 Jun, 16:47, "C.W.Holeman II" <cwhii_google_s...@yahoo.com>
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.

Similar topics

10 posts views Thread by Saqib Ali | last post: by
22 posts views Thread by Haines Brown | last post: by
4 posts views Thread by Shailendra Batham | last post: by
3 posts views Thread by Gary Stephenson | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.