[ZPT] ExpatError in FS-View but not in ZopeFolder

Christian Ledermann lists at futuresign.de
Sat Oct 30 17:56:22 EDT 2004


Am Mon, 2004-10-25 um 20.46 schrieb Fred Drake:
> On 22 Oct 2004 22:12:34 +0200, Christian Ledermann <lists at futuresign.de> wrote:
> > A Pagetemplate that is placed in a _Filesystem Directory View_ gives the
> > error:
> > 
> > <!-- Page Template Diagnostics
> >  Compilation failed
> >  xml.parsers.expat.ExpatError: junk after document element: line 8, column 0
> > -->
> ...
> > If I just copy the code (with cut and paste) to a _new_ PageTemplate in a Zope Folder
> > everthing works fine, no errors.
> 
> This is strange.  I'd expect this to fail in the copy as well.
> 
> > My first thought was that there was an illegal char that did not display somewhere,
> > but this was not the case, the only invisible chars are LineFeeds.
> 
> That's not it.
> 
> > the code of the page template is:
> > -----------------
> > <?xml version="1.0" encoding="UTF-8"?>
> > 
> > <!DOCTYPE xbel
> >   PUBLIC "+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML"
> >          "http://www.python.org/topics/xml/dtds/xbel-1.0.dtd">
> > <metal:block tal:define="dummy python:request.RESPONSE.setHeader('Content-Type', 'text/xml')"/>
> > 
> > <xbel version="1.0"  tal:define="rootLevel
> 
> This is not well-formed XML, so Expat is right to raise an exception. 
> XML only allows a single top-level element.
> 
> You can avoid this problem by moving your tal:define to the xbel element.
> 

yes of course you are right, I guess i wasnt seeing the wood for the
trees here. 

But the wierd behaviour carries on:
Now the source of my pt returns, the tal does not get interpreted.

again: if i customize the the pt this behaviour stays the same, if i cut
and paste it to a _NEW_ pt everything works fine!

any thoughts?

thanks
christian 



More information about the ZPT mailing list