Re: blank line at top of files

Robert Wade <[email protected]> Fri, 12 Oct 2007 09:21:57 -0500
Newsgroups gmane.comp.apache.mod-layout
Message-ID <[email protected]>
> I have noticed that a blank line seems to be inserted by Modlayout/3.2
> and 3.4 at the top of web pages. This makes it difficult to validate
> XHTML because the declaration must be on the first line of the web  
> page.
> Is there any way to stop this from happening?

I've got the same problem you're describing using Mod_layout 3.2 w/ 
Apache 1.3.

Testing suggests that layout inserts the line preparatory to adding  
the header but doesn't remove the line when LayoutMerge is enabled or  
appending, etc. What order the layout directives are provided doesn't  
seem to improve the situation.

I'm not responsible for maintaining/upgrading the production server,  
so it's proving to be a bit problematic here also (validation is a  
good thing!).

You can start the page with just the doctype (no xml declaration) and  
it'll validate.  It's not much of a solution, if it's a solution at  
all, but it'll meet the need if the only reason you're using the  
XHTML 1.* doctype is to stay current with things.  I'd love to hear  
about any better workarounds for this problem also.

Wade