[Zope] - Using "tree" with an object
Gabe Wachob
gwachob@findlaw.com
Tue, 19 Jan 1999 11:40:03 -0800
OK, another question.
I have an XMLFile (derived from Document). It has a domtree attribute
which contains the XML document as a DOM tree.
I have a index_html.dtml file which is displayed as the default view.
I would like to use the <!--#tree--> construct to interactively view the
XML files (as trees), hiding and displaying structure as the user
pleases. I was going to do this by hand, but I thought using the
<!--#tree--> construct would be kewl.
Well, I'm having more problems with DTML. How do I use the <!--#tree-->
construct with the object's domtree attribute (that is, with any object
referred to by my Document-subclasses XMLFile)?
I've tried just inserting "domtree" in the name attribute (no success)
of tree, I tried "self.domtree" (no success), I've tried
"_.getitem(document_id, 0).domtree" (no success), I've tried the
below (no success):
<!--#tree name="_.getitem(document_id,0)" expr="domtree"
branches="childNodes" -->
<!--#var nodeName-->
<!--#/tree-->
I really don't know what I'm doing -- the documentation on how to refer
to objects contained within a Document (for example) in the context of
DTML seems incomplete.
Finally, how do I write my own HTML response forms? Do I *have* to use
MessageDialog? Also, where are MessageDialogs documented?? If I don't
have a REQUEST or RESPONSE as an explicit parameter to my methods, what
does ZPublisher do with the stuff returned by a published method?
Am I asking too much for all this documentation?
-Gabe