W3C home > Mailing lists > Public > www-validator@w3.org > July 2007

Re: [VE][xmlwf] xml parses some php code it shouldn't

From: Benjamin Niemann <pink@odahoda.de>
Date: Mon, 30 Jul 2007 22:56:29 +0200
To: www-validator@w3.org
Message-ID: <f8lj9u$87c$1@sea.gmane.org>

Hello,

Kevin D'Auria wrote:

> My xhtml 1.1 page I made passes validation by direct input on the
> validator
> page.  However, when I try to validate it by URL it fails.  The problem is
> that it parses some php inside an else/if statement.  It parses both the
> code inside the "if" and the code inside the "else".  Since, on my page,
> PHP will give an error if the else statement is run with an element in the
> POST array, my server outputs the following:
> 
> <b>Fatal error</b>: Call to a member function updateParams() on a
> non-object in
> <b>D:\Web\WebServer\Apache2\htdocs\site3\process_search2.php</b> on line
> <b>35</b><br />.
> 
> Of course, this is not valid xhtml.  But I was hoping the xml parser
> wouldn't parse this.  Is there a way to fix this ?

Validate by URL always uses GET. If you want to validate the output of a
script that is only accessible via a POST request, you can only do this
using the direct input method. There are browser plugins/extension that can
post the currently opened document using the direct input form, so you
don't have to copy/paste the source manually.

And you should fix your script, so it fails more gracefully on such error
conditions.


HTH

-- 
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
Received on Monday, 30 July 2007 20:57:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:25 GMT