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

seb bacon seb@jamkit.com
18 Mar 2002 12:22:27 +0000


Don't know what's going on there, but I reduced it to a simpler test
case:

<p>
  <div>
     
  </div>
</p>

If you replace the <div>s with inline elements like <span>s, it works;
if you use block elements like <table>, it doesn't.

I wonder if this is a buggy version of strict XHTML checking?  You're
not meant to put block elements inside span elements, IFAIK.

seb
 
On Mon, 2002-03-18 at 11:31, 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>
> 
> The error message is:
> 
> Compilation failed
> TAL.HTMLTALParser.NestingError: Open tag <span> does not match close tag
> </p>, at line 48, column 14
> 
> OK, well removing the <p> start and end tags fixes the problem, but why
> should there be an error in the first place?
> 
> AFAICS there is no mismatch in the tags.
> 
> tia
> 
> Phil
> 
> 
> 
> 
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt