[Zope] DTML reformulated as XML

David Jacobs djacobs@mitre.org
Tue, 15 Jun 1999 09:16:28 -1000


> -----Original Message-----
> From: Pavlos Christoforou [mailto:pavlos@gaaros.msrc.sunysb.edu]
> Sent: Tuesday, June 15, 1999 9:05 AM
> > If you have looked at the XMLC product that the Enhydra project has
> > incorporated (www.enhydra.org) It provides some clues as to how
> it might be
> > implemented.  Basically the XMLC is a HTML compiler that
> compiles HTML/XML
> > to Java Document Object Model classes that can then be manipulated
> > dynamically to add active content.
> >
>
> But Zope already does that and more but in reverse ... ie the object model
> of Zope can be considered/used as a Document Object Model. You build you
> hierarchy of objects and then you use DTML to produce the output, either
> in HTML, XML or whatever. The reverse is only possible if all the info is
> accessible in the document ie full blown XMl, but do we really want to
> write xml for web publishing right now? In any case what you are asking is
> not that difficult. I have already build an external method in the past
> that it would take an XML doc parse it and create a hierarchy of
> Folders/DTMl Documents with appropriate properties. Then you can
> manibulate the DOM through the Web using Zope and output it back in HTMl
> or XML.

I agree, I see referring to compiling XML into an DOM was a little bit of a
red herring.  The main thrust I wanted to get across was the removal of
coding from the DTML.  The person writing an HTML page should not have to
understand how to write loops and if/then statements.

By forcing all dynamic behaviors to be coded separately we also would
greatly encourage the reuse of those dynamic behaviors.  The trick then
becomes coming up with a user friendly interface for users to tie these
behaviors to their respective object elements and then to have zope bring
all the pieces together when it needs to generate the actual HTML page.

Cheers,
David