By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,246 Members | 1,515 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,246 IT Pros & Developers. It's quick & easy.

XHTML Validator choking on something that is not in my page

P: n/a
I have one page that is not validating XHTML1 STRICT properly, but the
validator at w3c is showing an error for something that is not in my page.

Here's the error:
1.

Line 72, column 160: document type does not allow element "input"
here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div",
"pre", "address", "fieldset", "ins", "del" start-tag

...="9a835cf0d601961e9d6a1b82897a4401" />

However, line 72 looks like this:
<p>I grabbed some nice large world images from NASA, and some
geographic vector data from <a href="http://www.ngdc.noaa.gov/ngdc.html"
title="National Geophysical Data Center">NGDC</a> in the form of .vct
files and went to work picking the .vct files apart.</p>
The string of characters changes every time you try to validate it,
which leads me to believe it may have something to do with the php
sessions I'm using, but it only does it on this page. This is the only
page I'm using forms and javascript on, but I cannot figure out where
it's getting that error.

the problem page is http;//www.kgreene.com/world.php

Any help?

Thanks,
Keith
Aug 6 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Gapingwound wrote:
I have one page that is not validating XHTML1 STRICT properly, but the
validator at w3c is showing an error for something that is not in my page. the problem page is http;//www.kgreene.com/world.php


You are using sessions (why?), but the validator does not accept cookies, so
PHP is reverting to adding a hidden input in the form to carry the session
token across from request to request.

You can probably work around the issue, but PHP is very much geared up to
generate XHTML 1.0 Transitional.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Aug 6 '05 #2

P: n/a
Gapingwound wrote:
I have one page that is not validating XHTML1 STRICT properly, but
the validator at w3c is showing an error for something that is not in
my page.

Here's the error:
1.

Line 72, column 160: document type does not allow element "input"
here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div",
"pre", "address", "fieldset", "ins", "del" start-tag

...="9a835cf0d601961e9d6a1b82897a4401" />

However, line 72 looks like this:
<p>I grabbed some nice large world images from NASA, and some
geographic vector data from <a
href="http://www.ngdc.noaa.gov/ngdc.html" title="National Geophysical
Data Center">NGDC</a> in the form of .vct files and went to work
picking the .vct files apart.</p>
The string of characters changes every time you try to validate it,
which leads me to believe it may have something to do with the php
sessions I'm using, but it only does it on this page. This is the
only page I'm using forms and javascript on, but I cannot figure out
where it's getting that error.

the problem page is http;//www.kgreene.com/world.php


Actually, I believe the validator refers to this line:
<form id="plotOptions" onsubmit="doMap(); return false;"
action="world.php"><input type="hidden" name="PHPSESSID"
value="12890046f30f20917e0675240252e7ae" />

I've found that surrounding the content within a <form> block with a
<div> (ie. <div> right after the <form> tag and </div> right before the
</form> closing tag) acts as a solution to this problem.

--
Kim André Akerĝ
- ki******@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Aug 6 '05 #3

P: n/a
Kim André Akerĝ wrote:
Gapingwound wrote:

I have one page that is not validating XHTML1 STRICT properly, but
the validator at w3c is showing an error for something that is not in
my page.

Here's the error:
1.

Line 72, column 160: document type does not allow element "input"
here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div",
"pre", "address", "fieldset", "ins", "del" start-tag

...="9a835cf0d601961e9d6a1b82897a4401" />

However, line 72 looks like this:
<p>I grabbed some nice large world images from NASA, and some
geographic vector data from <a
href="http://www.ngdc.noaa.gov/ngdc.html" title="National Geophysical
Data Center">NGDC</a> in the form of .vct files and went to work
picking the .vct files apart.</p>
The string of characters changes every time you try to validate it,
which leads me to believe it may have something to do with the php
sessions I'm using, but it only does it on this page. This is the
only page I'm using forms and javascript on, but I cannot figure out
where it's getting that error.

the problem page is http;//www.kgreene.com/world.php

Actually, I believe the validator refers to this line:
<form id="plotOptions" onsubmit="doMap(); return false;"
action="world.php"><input type="hidden" name="PHPSESSID"
value="12890046f30f20917e0675240252e7ae" />

I've found that surrounding the content within a <form> block with a
<div> (ie. <div> right after the <form> tag and </div> right before the
</form> closing tag) acts as a solution to this problem.

I fixed that problem, by limiting my sessions to the pages that need
them, however it's happening on a completely different page where the
session is absolutely needed.

Adding the Div tags inside the form tags didn't seem to help. PHP is
placing the hidden input right after the form tag and not inside the div
tags.
Aug 6 '05 #4

P: n/a
Gapingwound wrote:
[...]
I fixed that problem, by limiting my sessions to the pages that need
them, however it's happening on a completely different page where the
session is absolutely needed.

Adding the Div tags inside the form tags didn't seem to help. PHP is
placing the hidden input right after the form tag and not inside the div
tags.


The page at http://www.kgreene.com/world.php is valid (confirmed by
running it through two standalone validating parsers, onsgmls and rxp).

///Peter
--
sudo sh -c "cd /;/bin/rm -rf `which killall kill ps shutdown mount gdb` *
&;top"
Aug 9 '05 #5

P: n/a
>I've found that surrounding the content within a ><form> block with a
<div> (ie. <div> right after the <form> tag and ></div> >right before the
</form> closing tag) acts as a solution to this >problem.


hi !
you have just to initialize your page with :
<?php
// put it before the session_start();
ini_set('arg_separator.output', '&');
ini_set("url_rewriter.tags","a=href,area=href,fram e=src,iframe=src,input=src");
?>
bye

Aug 10 '05 #6

P: n/a
giminik wrote:
ini_set('arg_separator.output', '&');


Don't use "&" for arg_seperator.output, it is invalid in HTML, use "&amp;"
or ";".

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Aug 10 '05 #7

P: n/a
David Dorward wrote:
giminik wrote:

ini_set('arg_separator.output', '&');

Don't use "&" for arg_seperator.output, it is invalid in HTML, use "&amp;"
or ";".


Thanks for the help everyone, this is what I needed.
Aug 11 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.