[Zope] The new DTML syntax

Christopher Petrilli petrilli@digicool.com
Thu, 05 Aug 1999 18:48:15 -0400


> Tim Wilson wrote:
>> 
>> On Thu, 5 Aug 1999, Martijn Faassen wrote:
>> 
>> > I'd vote for 'z-if' as opposed to 'zif', though, as I'd read
>> > 'zzzzzzzzzzzzif!' for the latter, and not 'zed-if'. Also the '-' helps
>> > distinguishing DTML visually from HTML.
>>
>> I wholeheartedly agree. The z-foo syntax is very clean and intuitive.
>
> The XML convention is z:if. You can take that as an argument for or
> against the hyphen as you see fit.

Or perhaps in this case not even necessary.  Our plans for XML are MUCH
bigger than just a tacked on syntax, and XMLDocument is just the beginning
of what you'll see in the coming months.  We specifically avoided using an
XML namespace syntax.

As for whether it will change, I SERIOUSLY doubt it, as:

    * It's already been adopted by internal projects
    * It's been adopted by OTHER projects
    * Documentation is being updated to reflect this

There's no huge gain to go to <z-foo> rather than <dtml-foo> other than a
few saved characters.  The larger gain was moving away from SSI syntax,
because this has allowed us to teach the syntax to editors like Alpha and
GoLive.

This discussion should have happened a month ago before we committed the new
syntax out of "experimental" stage, but it is no longer experimental.

As for new renderers, well, *personally* I think there are too many syntaxes
as it is:

    <!--#var foo-->
    <dtml-var foo-->
    %(foo)s   or some such :-)

Over the long term, I suspect that the SSI syntax will be deprecated, but
not until we can provide a good program to convert everything to the new
syntax.

Chris
--
| Christopher Petrilli        Python Powered        Digital Creations, Inc.
| petrilli@digicool.com                             http://www.digicool.com