473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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
Aug 6 '05 #1
7 1803
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
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
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
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
>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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

59
by: Philipp Lenssen | last post by:
I've tested some of the new Nokia 6600 functionality. It ships with WAP2 and XHTML Support (it says). What it does is check the Doctype -- if it's not the XHTML Mobile Profile Doctype, but a...
17
by: Colin Cogle | last post by:
------- Line 47, column 8: there is no attribute "id" <DIV id="LeftNavigation" style="position:absolute; left:8px; top:6px; width:200p ------- Line 47, column 31: there is no attribute "style"...
9
by: rbronson1976 | last post by:
Hello all, I have a very strange situation -- I have a page that validates (using http://validator.w3.org/) as "XHTML 1.0 Strict" just fine. This page uses this DOCTYPE: <!DOCTYPE html PUBLIC...
12
by: Alex D. | last post by:
How can I stop asp.net from rendering XHTML istead of HTML? My javascripts are rendering wrong because of that. It is rendering &amp; to clients instead of &. Any help? Thanks, Alejandro.
11
by: Tomek Toczyski | last post by:
What is the best way to attach a caption to an image in xhtml? I can attach a caption to a table by a "<caption>" tag but I would like to do sth similar to an image. How to do it in a natural...
9
by: wardy1975 | last post by:
Hi All, Looking for a little expert advice on a few web standards issues. I am currently trying to understand the impact of web standards for a web application I work with. I have been doing a...
4
by: Alan Silver | last post by:
Hello, I have a site that produces 100% valid XHTML 1.0 Strict when viewed in a browser (IE, Firefox, etc). I just tried validating the site with an on-line validator, and got several errors. ...
11
by: Michael Powe | last post by:
How can I make an XHTML-compliant form of an expression in this format: document.write("<scr"+"ipt type='text/javascript' src='path/to/file.js'>"+"</scr"+"ipt>"); this turns out to be a...
10
by: Robert Huff | last post by:
Can someone offer suggestions why, on the same server (Apache 2.2.8), this works <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en-US"> <head> <link rel=stylesheet...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.