[ZPT] whitespace bug

Chris Withers chrisw@nipltd.com
Thu, 21 Nov 2002 10:57:13 +0000


Martijn Pieters wrote:
>>>>  <span tal:repeat="n python:range(3)" tal:content="n"></span>
>>>
>>It should, IMNSHO. Can you file a collector issue at 
>>http://collector.zope.org?
> 
> Why is this a bug?

There's no space between the <span> and the </span>, so why should any be 
included in the output?

> This is intended behaviour; whitespace surrounding a repeated tag is
> repeated as well. Otherwise there would be no way to preserve whitespace in
> between repeated items!

Why would you want to?

> Putting the repeated tag directly inside another eliminated the whitespace
> (including the newline) and was thus not repeated.

Is that documented anywhere?

> The whitespace included is limited to the whitespace on the line, IIRC. This
> is reasonable and confirms to the XML specs. 

Which one?

> It may be (although I doubt it)
> that the xml:space attribute is supported, but how ZPT should react if
> xml:space is set to preserve is a whole different kettle of fish.

Indeed.

cheers,

Chris