[Zope] Document Assembly with Zope

Ronald L. Chichester complaw@hal-pc.org
Sat, 08 Jun 2002 17:39:56 -0500


I created a zope site with a slew of DTML Document containing clauses 
for documents.  The idea is to list the various DTML Documents in an 
HTML form from which the user selects particular clauses for inclusion 
in a dynamically generated document.  The DTML Documents are stored in 
various folders in a tree.  This structure is easily viewed with a 
<dtml-tree> tag.  However, I am trying to generate an HTML form with the 
same structure, but with radio buttons in front of each clause so that 
one (or none) of the selections can be made by the user.

Making the HTML form is a bit tricky, but that isn't the really hard 
part.  First, as users would be allowed to add folders and DTML 
documents at will (this is a necessity for the project), then a python 
script can't be used to generate the appropriate document (or can it, 
because you wouldn't know the complete parameter string).

Has anyone tried to do something like this?  I considered creating a 
separate document with a list of the clauses contained in a list 
parameter.  Then the user could just select from the list.  This isn't 
the best solution, because it would presuppose that the user knew what 
the clause was to begin with (a bad assumption).  In fact, the nice 
thing about the form is that you could have a URL to the particular 
clause, which the users found very helpful.  

An alternative is to use a ZCatalog to generate the HTML form.  That 
still leaves the problem of generating the completed document because 
the python script wouldn't have a non-volitile parameter list.

I know that CMF is good for creating a single document.  Unfortunately, 
I haven't found that it is useful for generating a document on the fly 
from selecting particular clauses from a multitude of clauses.  

Any ideas?

Thanks in advance,

Ron