Page 1 of 1

[SOLVED] xhtml validation

Posted: Fri Feb 01, 2008 10:04 am
by rsmarsha
I'm using the w3c validator to validate a test page. I know the xhtml is right, just wanted to run it over once to make sure. The validator picks up on a problem with the character encoding.

The document is :

http://78.136.39.65/templates/grail.html

As it is at the moment it says there is an encoding problem. If i put in :

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
Then the validator says there is no doctype, also the page cannot be viewed.

Any ideas?

Re: xhtml validation

Posted: Fri Feb 01, 2008 10:19 am
by Zoxive

Code: Select all

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" >
VML?

Normally my tag looks like...

Code: Select all

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

Re: xhtml validation

Posted: Fri Feb 01, 2008 10:25 am
by rsmarsha
Yeah the one in my example came from a css layout example that page is based on.

I normally use

Code: Select all

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
also. Either of them give you the same results.

With the xml line in i get no doctype and no encoding, without i get no encoding but it finds the doctype.

httpd.conf in apache has none as the default chartype, should i change it? I tried changing that to utf-8, but it just made all my pound signs show oddly. :)

I can't get it to pickup the encoding from the actual document itself.

Re: xhtml validation

Posted: Fri Feb 01, 2008 10:38 am
by matthijs
http://www.w3.org/QA/2002/04/valid-dtd-list.html

Personally I choose HTML 4 strict nowadays instead of pseudo-xhtml

Re: xhtml validation

Posted: Fri Feb 01, 2008 10:44 am
by rsmarsha
Thanks, but was already doing that. I've tried numerous variations and nothing seems to work.

I'm a bit stuck at the moment.

Re: xhtml validation

Posted: Fri Feb 01, 2008 10:55 am
by rsmarsha
Changed the default apache encoding to "iso-8859-1" and all is working as it should. :)