[Zope] DTML reformulated as XML (was RE: [Zope] <% ... %> ?)

Otto Hammersmith otto@ipass.net
Tue, 15 Jun 1999 11:15:55 -0400


(First let me appologize for the junk I spewed to the list a couple days
ago... it was late and I must've hit send when I meant to save as
draft.)

Jim Fulton wrote:
> 
> Otto Hammersmith wrote:
[snip]
> > however, it might very well
> > end up being an ugly unwieldy syntax.
> 
> If someone found the XML flavor of DTML unwieldy, then I'm quite
> sure that they would find XHTML unweildy too.

That's a very good point.

> (snip)
> > The if gets really strange when you start adding 'elif' and 'else'
> > clauses.
> 
> Nah:
> 
>   <dtml:choose>
>     <dtml:if expr="x==1">
>        ....
>     </dtml:if>
>     <dtml:if expr="x==2">
>        ....
>     </dtml:if>
>     <dtml:else>
>        ....
>     </dtml:else>
>   </dtml:choose>

I've written most of a proposal for a XDTML syntax, and I should be
posting it tonight... this is the exact suggestion I made.  Actually,
split the if into an if and a choose, just as XSLT has it.  The if
doesn't allow for any else or elseif conditions, but the choose does. I
think it's a rather clean solution, and I suspect the authors of the XSL
draft agree with me. :)

						-Otto.