[Petal] Petal 0.5

Evan Simpson evan@4-am.com
Tue, 06 Aug 2002 10:50:17 -0500


Jean-Michel Hiver wrote:
> Where can I subscribe to this mailing list?
> Or at least browse the archives?

http://mail.zope.org/pipermail/zpt/

It's fairly Zope-heavy, though.

> One thing in these specs which I'll probably never follow from your
> specs is doubling special characters. I think backslashing them is an
> awful lot better, you can always backslash any character if you're in
> doubt.

I can understand that.  I've been thinking more and more about the need 
for an escaping convention.

> Another thing I've been wondering about is the 'structure' keyword. I
> cannot figure out if it's in the TAL or the TALES specification. It
> looks to me like a bit of a hack... Can you tell me more about it?

It's part of TAL, since it is only meaningful for 'content' and 
'replace' and tells those statements *not* to do something they would 
otherwise do.  Example:

<p tal:define="line string:&lt;hr&gt;">
One <tal:line replace="line" /> Two
<tal:line replace="structure line" /> Three
</p>

...becomes:

<p>
One &lt;hr&gt; Two
<hr> Three
</p>

Note that 'attributes' can't have 'structure', because XML attributes 
must be escaped.

Cheers,

Evan @ 4-am