Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 6th, 2005, 10:45 PM
Gapingwound
Guest
 
Posts: n/a
Default XHTML Validator choking on something that is not in my page

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
  #2  
Old August 6th, 2005, 11:05 PM
David Dorward
Guest
 
Posts: n/a
Default Re: XHTML Validator choking on something that is not in my page

Gapingwound wrote:
[color=blue]
> 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.[/color]
[color=blue]
> the problem page is http;//www.kgreene.com/world.php[/color]

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
  #3  
Old August 6th, 2005, 11:05 PM
Kim André Akerĝ
Guest
 
Posts: n/a
Default Re: XHTML Validator choking on something that is not in my page

Gapingwound wrote:
[color=blue]
> 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[/color]

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ĝ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
  #4  
Old August 6th, 2005, 11:55 PM
Gapingwound
Guest
 
Posts: n/a
Default Re: XHTML Validator choking on something that is not in my page

Kim André Akerĝ wrote:[color=blue]
> Gapingwound wrote:
>
>[color=green]
>>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[/color]
>
>
> 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.
>[/color]
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.
  #5  
Old August 10th, 2005, 12:45 AM
Peter Flynn
Guest
 
Posts: n/a
Default Re: XHTML Validator choking on something that is not in my page

Gapingwound wrote:
[...][color=blue]
> 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.[/color]

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"
  #6  
Old August 10th, 2005, 08:55 AM
giminik
Guest
 
Posts: n/a
Default Re: XHTML Validator choking on something that is not in my page

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

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

  #7  
Old August 10th, 2005, 07:55 PM
David Dorward
Guest
 
Posts: n/a
Default Re: XHTML Validator choking on something that is not in my page

giminik wrote:
[color=blue]
> ini_set('arg_separator.output', '&');[/color]

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
  #8  
Old August 11th, 2005, 02:05 AM
Gapingwound
Guest
 
Posts: n/a
Default Re: XHTML Validator choking on something that is not in my page

David Dorward wrote:[color=blue]
> giminik wrote:
>
>[color=green]
>>ini_set('arg_separator.output', '&');[/color]
>
>
> Don't use "&" for arg_seperator.output, it is invalid in HTML, use "&amp;"
> or ";".
>[/color]

Thanks for the help everyone, this is what I needed.
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles