469,326 Members | 1,415 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,326 developers. It's quick & easy.

Help with W3C page validation - xhtml-mp

I'm trying to build a mobile site (xhtml-mp) but cant get it to validate:

Can somebody advise me what to do with these errors? (From W3C)

1. Unknown Parse Mode!

2. Byte-Order Mark found in UTF-8 File.

3. character data is not allowed here.

The last one worries me because if I remove the entire line of code, the error jumps elsewhere.

I've Googled these all day and still no luck.

Thanks a lot,

The Originals

[PHP]<?php
echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "(URL address blocked: See forum rules)" >
<html>
<head>
<meta http-equiv="Cache-Control" content="max-age=200" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="(URL address blocked: See forum rules)" rel="stylesheet" type="text/css" />
<title>The Originals Mobile Blog</title>
</head>
<body>
<div class="container">
<p class="marquee">content goes here</p>
</div>
</body>
</html>
[/PHP]
May 13 '07 #1
8 5094
kestrel
1,071 Expert 1GB
what validator are you using? link?
May 14 '07 #2
I'm using the W3C page validator - Sorry I didn't know I was allowed to put links in my post ;)

Here are the results:

http://validator.w3.org/check?verbos...ginals.mobi%2F

BTW I've changed the markup since my initial posting and am now only getting an "Unknown Parse Mode!" error.

The current markup passes the .mobi validation, which was my original goal, but I'd really like to understand, and correct the W3C error:

Thanks,

Matthew
May 14 '07 #3
RedSon
5,000 Expert 4TB
I'm trying to build a mobile site (xhtml-mp) but cant get it to validate:

Can somebody advise me what to do with these errors? (From W3C)

1. Unknown Parse Mode!

2. Byte-Order Mark found in UTF-8 File.

3. character data is not allowed here.

The last one worries me because if I remove the entire line of code, the error jumps elsewhere.

I've Googled these all day and still no luck.

Thanks a lot,

The Originals

[PHP]<?php
echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "(URL address blocked: See forum rules)" >
<html>
<head>
<meta http-equiv="Cache-Control" content="max-age=200" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="(URL address blocked: See forum rules)" rel="stylesheet" type="text/css" />
<title>The Originals Mobile Blog</title>
</head>
<body>
<div class="container">
<p class="marquee">content goes here</p>
</div>
</body>
</html>
[/PHP]
Does the validator give you a line number? If not you should try to comment out everything in your code except for the very very basic tags. Then run the validator. If that passes then uncomment another tag, run the validator again. Continue this process untill you can isolate which tag or line is causing the error. That will give you a better chance to debug it.
May 14 '07 #4
kestrel
1,071 Expert 1GB
well, the unknown parse mode isnt the actual error
its the character data is not allowed here error thats failing your site.
Its saying that > isnt allowed to appear where it is, it could be a doctype problem, but im not seeing why it's receiving an error.
May 14 '07 #5
Hi there RedSon & Kestrel,

Thanks for the advice

RS: I've tried reducing the document to the xhtml skeleton <html><head><title><body> but I'm still getting the unknown parse mode error.

K: Do you think that the error might have something to do with the Byte-Order Mark? I've read a few treads on this subject, but still confused as to how to get rid of it. I'm writing the code with SciTE and setting the document encoding with that.

The mark up passes the .mobi validation with no problem, but I'm keen to understand the error, so I can avoid it in the future.

Any thoughts?

Matthew
May 15 '07 #6
kestrel
1,071 Expert 1GB
to be completely honest. i cant figure out what the error is. Ive looked over the code and what not, and i have no idea. Sorry man.
May 17 '07 #7
You're using the Validator on a site that isn't really using a W3C standard profile. Hence, odd results.

XHMLT-MP isn't in the W3C Validator's repertoire. It's crapping out cause it's clueless how to handle what you're feeding it.
May 19 '07 #8
kestrel
1,071 Expert 1GB
as good an answer as any
May 20 '07 #9

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by mike | last post: by
1 post views Thread by PATRICIA THOMPSON | last post: by
3 posts views Thread by bdbeames | last post: by
2 posts views Thread by Henry Stock | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.