Re: Validating ASP pages SOLUTION found

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
http://dorward.me.uk/
http://blog.dorward.me.uk/

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