[Zope] - XML-style DTML code

Gabe Wachob gwachob@findlaw.com
Fri, 29 Jan 1999 21:30:42 -0800


Perhaps this is retreading old territory, but if the goal is to have DTML that
"looks like" XML, I would say either make it XML or don't. It seems like it
would be too confusing to those of us familiar with XML to try to get used to a
"almost-XML" syntax.

Why not do something like:

<zope:if condition="total_votes">
    <p>
        <zope:in var="choices">
            <zope:var expr="percent_for(_['sequence-index'])" fmt="%2d"/>
        </zope:in>
        <br/>
    </p>
<zope:else>
    <em>No votes have been cast yet</em>
</zope:if>

That's XML which represents HTML (a la XSL-- note the <br/> -- XML doesn't have
unclosed tags). The only thing that might not work above is inserting & or < ,
etc. in certain places (they would normally have to be &amp;  or &lt;)

Then, the DTML interpreter would just be an XML app (and not that complicated I
would think).

I know there are reasons things weren't done this way -- I'm curious to hear
what they are.

    -Gabe