I am working on a custom DTML tag (that I may unleash on the world when
finished) that has brought to my attention an interesting feature of the
DTML parser:

It preparses everything in the block(s) between the start and end tags
before the document containing the code is committed.

My tag is a little different in that I don't want to put DTML inside it,
therefore this parsing is undesirable. There is however one built-in tag
that this is true for as well: <dtml-comment>. Many a thread has been
burned about that issue.

I propose a change to DT_String to allow a tag to turn off this
preparsing feature. It should be easy enough to implement by adding a
class attribute to the tag class such as disable_dtml_block_parsing = 1.
Is this abhorrent to anyone? 

If not, I will make a patch for DT_String to support this. The
beneficial side affect would be that <dtml-comment> could be "fixed" so
that its contents need not be parsable anymore, just like every other
language I know of.
| Casey Duncan
| Kaivo, Inc.

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to