W3C home > Mailing lists > Public > www-validator@w3.org > November 2002

Re: couldn't validate because first line

From: Terje Bless <link@pobox.com>
Date: Fri, 29 Nov 2002 13:00:25 +0100
To: W3C Validator <www-validator@w3.org>
cc: Frederik Vos <fvos@vosberg.be>
Message-ID: <a01060007-1022-25525EFE039211D7B52A00039300CF5C@[193.157.66.10]>

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 GMT

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