Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Namespace & XMLNS Errors. How do I fix these?


  • Please log in to reply

#1
Spider-Man

Spider-Man

    Member

  • Member
  • PipPipPip
  • 167 posts
Hello. My project for this week was to create a website for a local company selling spas. I have uploaded the site to my test area, www.grantglendinning.co.uk/Spas/index.html.

Using the W3C HTML Validator, I've found that the page has 1 important warning and 2 errors.

The errors are as follows:

1. Warning Namespace Found in non-XML Document

Namespace "" found, but document type is not XML!

# Error Line 3, Column 12: there is no attribute "XMLNS".

<html xmlns="http://www.w3.org/1999/xhtml" lang="en-GB" xml:lang="en-GB">



You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.


Line 3, Column 65: there is no attribute "XML:LANG".

…http://www.w3.org/1999/xhtml" lang="en-GB" xml:lang="en-GB">



You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.




I have went over the entire code, using the same 'xmlns' string as other major websites, but all of which still produce these errors. So I presume it's because I'm using the wrong DataTypeDictionary, or everybody else is wrong? :whistling: Can anyone help me solve these errors? Thank you:)


PS. Rate the site if you care to look:)

Thank you
  • 0

Advertisements


#2
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
HTML Tidy reports this:

HTML Validator result
----------------------
http://www.grantglen...Spas/index.html

line 6 column 1 - Warning: <meta> element not empty or not closed
line 7 column 1 - Warning: <meta> element not empty or not closed
line 8 column 1 - Warning: <meta> element not empty or not closed
line 9 column 1 - Warning: <meta> element not empty or not closed
line 15 column 1 - Warning: <link> element not empty or not closed
line 49 column 5 - Warning: <input> element not empty or not closed
line 316 column 192 - Warning: unescaped & which should be written as &amp;
Info: Doctype given is "-//W3C//DTD HTML 4.01 Transitional//EN"
Info: Document content looks like XHTML 1.0 Transitional
0 errors / 7 warnings

The W3C validator is the kicker. You are using a transitional doc type. Either remove
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-GB" xml:lang="en-GB">
or select the proper doc type to use.

Ron
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP