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

Re: Validating ASP pages SOLUTION found

From: David Dorward <david@dorward.me.uk>
Date: Tue, 31 Jul 2007 23:11:59 +0100
Message-Id: <A35C018B-9471-4E1A-AF3A-E6FAC89A930A@dorward.me.uk>
Cc: <www-validator@w3.org>
To: "Hoskin, Patricia J" <phoskin@att.com>

On 31 Jul 2007, at 20:26, Hoskin, Patricia J wrote:
> The above is in an include file.  So, I put the <% VBSCRIPT… stuff% 
> > after the <? … “en”> and the page itself would not work.  So,  
> back the VB information went to where it belonged.  I then decided  
> to give the validation tool one more try; when I used the “view the  
> source code” of one of the page, I copied it ONLY from the <?xml…  
> to the end of the document, rather than getting that 1st empty line  
> … and the page validated.
> So, with your new tool, I will have to remember NOT to have the  
> empty 1st line and copy only from <?xml… to the end of the page.   
> No problem, I can do this; at least the pages are now validating.
I'm not an expert in ASP, but I suspect that what you had was:

* Some ASP code
* A new line
* The XML prolog

This was processed by the server resulting in the output being

* A new line
* The XML prolog

Nothing is allowed before the XML prolog in XML documents, and that  
includes whitespace such as new lines.

Previous to the most recent upgrade, a bug in the validator meant  
that it ignored this error. That bug has now been fixed so the error  
is flagged.

Rather then copy/pasting the source code, you should fix your ASP so  
that it doesn't output any whitespace before the XML prolog.

(Or switch to HTML 4.01, as there is little point in using XHTML on  
the WWW - http://www.webdevout.net/articles/beware-of-xhtml )

David Dorward
Received on Wednesday, 1 August 2007 08:07:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:53 UTC