[Templates] 10 lines of whitespace at top of page

Garry Heaton garry@heaton6.freeserve.co.uk
Mon, 07 May 2007 10:55:52 +0100


The HTML pages produced by a template I have just coded come with 10 lines 
of whitespace at the top before the DOCTYPE declaration. Any reason why? 
Here are my components:

**************** wrapper **********************

[%- WRAPPER html;
       WRAPPER layout;
         content;
       END;
     END
-%]

************** html *************************

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>[% template.title %]</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="[% sitekeys %][% template.keys %]" />
<style type="text/css" media="all"><!-- @import url("[% dir 
%]css/main.css"); --></style>
<script type="text/javascript" language="javascript" src="[% dir 
%]js/main.js"></script>
</head>
<body onload="cacheImages();">
<div id="layout">
   <div id="logo">
     [% PROCESS logo -%]
   </div>
   <div id="nav">
     [% PROCESS nav -%]
   </div>

   <div id="content">
   <table width="758" border="0" cellpadding="0" cellspacing="0">
     <tr>
       [% content %]
     </tr>
   </table>
   </div>
</div>

[% PROCESS footer -%]
</body>
</html>

********************* layout *************************

[%- IF template.name == 'index.sht' %]
       [% PROCESS home -%]
     [% ELSIF links == 'nonav' %]
       [% PROCESS nonav -%]
     [% ELSE %]
       [% PROCESS mainsite -%]
[% END %]

****************** mainsite *************************

       <td id="leftcol" valign="top">
         <h1>[% links.0.2 %]</h1>

         <ul>
         [%- FOREACH link IN links %]
           <li><a href="[% dir %][% link.1 %]" alt="[% link.0 %]">[% link.0 
%]</a></li>
         [%- END %]
         </ul>
       </td>
       <td id="rightcol" valign="top">
         [% content %]
       </td>

**************************************************


Regards

Garry