[SOLVED] xhtml validation

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
rsmarsha
Forum Contributor
Posts: 242
Joined: Tue Feb 08, 2005 4:06 am
Location: Leeds, England

[SOLVED] xhtml validation

Post 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?
Last edited by rsmarsha on Fri Feb 01, 2008 11:00 am, edited 1 time in total.
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Re: xhtml validation

Post 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">
rsmarsha
Forum Contributor
Posts: 242
Joined: Tue Feb 08, 2005 4:06 am
Location: Leeds, England

Re: xhtml validation

Post 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.
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: xhtml validation

Post by matthijs »

http://www.w3.org/QA/2002/04/valid-dtd-list.html

Personally I choose HTML 4 strict nowadays instead of pseudo-xhtml
rsmarsha
Forum Contributor
Posts: 242
Joined: Tue Feb 08, 2005 4:06 am
Location: Leeds, England

Re: xhtml validation

Post 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.
rsmarsha
Forum Contributor
Posts: 242
Joined: Tue Feb 08, 2005 4:06 am
Location: Leeds, England

Re: xhtml validation

Post by rsmarsha »

Changed the default apache encoding to "iso-8859-1" and all is working as it should. :)
Post Reply