Re: couldn't validate because first line

Frederik Vos <fvos@vosberg.be> wrote:

>If the first line is an empty line in your xhtml document, the validator
>doesn't work.

Please define "doesn't work". :-)

Sample URLs are always best; barring that, a more detailed explanation of
the input, the expected output, and why you think the output you recieved
is incorrect.


>The problem is that this first line is created by a ssi line .. (so it
>exist in the code, but not in the output)

If this is Apache SSI, you can avoid this blank line by playing tricks with
newlines in your SSI directives. e.g. on the Validator we use this:

<!--#set var="title" value="The W3C MarkUp Validation Service"
--><!--#include virtual="header.html" -->

The file "header.html" contains the DOCTYPE Declaration, the <head> part of
the document, the <h1>, and the navigation menu. Since the newline in the
SSI statements is _inside_ one of the statements, the resulting page
contains no newline and the DOCTYPE from header.html ends up as the first
line in the result.


-- 
"I don't mind being thought of as a badguy,
 but it /really/ annoys me to be thought of
 as an *incompetent* badguy!" -- John Moreno

Received on Friday, 29 November 2002 07:00:33 UTC