I'm starting to use DTML to generate plain text output.  Generally speaking,
the amount of DTML used to represent a particular chunk of output is much
longer than the output itself.  For instance, something like

    <dtml-var "_['start'].strftime('%m/%d%y')"><dtml-if "start != end"-->-<dtml-var 

will expand to something as short as




I'd like to structure my DTML so it is vaguely readable:

    <dtml-var "_['start'].strftime('%m/%d%y')">
    <dtml-if "start != end"-->
        -<dtml-var "_['end'].strftime('%m/%d%y')">

This means inserting newlines and doing some indenting.  Unfortunately,
since I'm generating plain text, the newlines and indentation count (unlike
with HTML).  Is it possible to tell the formatter to either ignore
whitespace around the current location or turn off implicit whitespace
rendering altogether?  <dtml-comment> seems like overkill and would add a
lot of <tags> to the total amount of text my eyes have to analyze.

If it matters, I'm using Zope 2.2.1.  I'm currently using the
DocumentTemplate.HTMLFile class, but could easily change if one of the
others provides more convenient default behavior.  (Would it be possible to
subclass File or HTMLFile to get the behavior I want?)


Skip Montanaro ([EMAIL PROTECTED])

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

Reply via email to