[ZPT] Why does this cause a page template to be invalid? (longish)

Godefroid Chapelle gotcha@swing.be
Fri, 22 Mar 2002 15:21:00 +0100


At 12:31 18/03/2002, Phil Harris wrote:

>I have a PageTemplate with this content:
>
><span metal:use-macro="here/ASPIRE_MainTemplate/macros/ASPIRE_mainMacro">
><span metal:fill-slot="ASPIRE_mainbody">
><div class=Section1>
><p class=MsoNormal><span
>class="s-ASPIRE-1">
><table cellpadding=0 cellspacing=0 align=left>
>  <tr>
>   <td width=37 height=0></td>
>   <td width=113></td>
>   <td width=28></td>
>   <td width=69></td>
>   <td width=284></td>
>  </tr>
>  <tr>
>   <td height=25></td>
>   <td colspan=2 rowspan=2 width=141 height=39 align=left valign=top
>   bgcolor=white class="s-ASPIRE-2"><span class="s-ASPIRE-3">
>   <table cellpadding=0 cellspacing=0 width="100%">
>    <tr>
>     <td>
>     <div v:shape="_x0000_s1026" class="s-ASPIRE-4"
>     class=shape>
>     <p class=MsoNormal>This is floating</p>
>     </div>
>     </td>
>    </tr>
>   </table>
>   </span>&nbsp;</td>
>  </tr>
>  <tr>
>   <td height=14></td>
>   <td></td>
>   <td rowspan=2 align=left valign=top><img width=284 height=122
>   src="./doc2/image001.gif" alt="Your Text Here"
>v:shapes="_x0000_s1028"></td>
>  </tr>
>  <tr>
>   <td height=108></td>
>  </tr>
>  <tr>
>   <td height=9></td>
>  </tr>
>  <tr>
>   <td height=97></td>
>   <td></td>
>   <td colspan=2 align=left valign=top><img width=97 height=97
>   src="./doc2/image002.gif" v:shapes="_x0000_s1027"></td>
>  </tr>
></table>
></span>&nbsp;</p>
></div>
></span>
></span>

cfr my previous post to zpt@zope.org.

You could use :

<tal:m_aspire_mainmacro 
metal:use-macro="here/ASPIRE_MainTemplate/macros/ASPIRE_mainMacro">
<tal:f_aspire_mainbody metal:fill-slot="ASPIRE_mainbody">
<div class=Section1>
<p class=MsoNormal>..all MSWord junk;-)..</p>
</div>
</tal:f_aspire_mainbody>
</tal:m_aspire_mainmacro>

where you can both have readable code and take advantage of the XHTML (or 
HTML 4) validation made by ZPT parser.

--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 18 / 202
1348 Louvain-la-Neuve
Belgium

Tel + 32 (10) 459901
Mob + 32 (477) 363942

TVA 467 093 008
RC Niv 49849