I'm using Zope version 2.5 My problem: I need to access the DOM. I need to pass a value from a form field to a python script. I've been trying to avoid this intersection for quite some time, using creative alternatives to get around the problem. However, I'm having difficulty avoiding it this time. I found something interesting: ZDOM. Looks promising, but I don't know what the heck I'm doing since the documentation is so laconic and sparse. The example provided is too general for me. I need a working, practical example. I'm not sure if 2.5 implements ZDOM. If so, has anyone used it yet? If someone has used it, then perhaps that someone could send me a code snippet as an example? Thanks for your time.
On Tue, May 02, 2006 at 12:00:07PM -0700, Benjamin Isaac wrote:
I'm using Zope version 2.5
Wow. You do know that's over four years old, right? Are you stuck with that version for some reason?
My problem: I need to access the DOM. I need to pass a value from a form field to a python script.
Unfortunately I can't make sense of the above... it was a non-sequitor. Let's split those up, or you can explain how you think they're related:
I need to access the DOM.
Why?
I need to pass a value from a form field to a python script.
That normally has nothing to do with DOM. Typically, the form would just submit to a url that resolves to a script, and that script will get the value from the request. See the chapters "Basic Zope Scripting" and "Advanced Zope Scripting" in the online Zope Book, at http://www.plope.com/Books/2_7Edition Sorry if you've read all that before, I may be totally missing your point.
I'm not sure if 2.5 implements ZDOM. If so, has anyone used it yet? If someone has used it, then perhaps that someone could send me a code snippet as an example?
Personally I've never seen ZDOM before. AFAICT from a very brief look, it's nothing but a different way of traversing the zope object tree. Possibly convenient at times but I don't see anything there that can't be done with the "normal" zope APIs. -- Paul Winkler http://www.slinkp.com
Paul Winkler wrote:
I'm not sure if 2.5 implements ZDOM. If so, has anyone used it yet? If someone has used it, then perhaps that someone could send me a code snippet as an example?
Personally I've never seen ZDOM before.
You haven't missed anything :).
AFAICT from a very brief look, it's nothing but a different way of traversing the zope object tree. Possibly convenient at times but I don't see anything there that can't be done with the "normal" zope APIs.
Aaaah, time for a Zope history lesson :). The beginning of ZDOM predates my engagement in Zope by a little over a year. It dates back to the times when the XML hype all of a sudden hit the Zope world, meaning Digital Creations :). Everybody was thinking how important it was to make Zope support XML and hence we ended up with things like ZDOM. Or an expat parser shipping with Zope. As said, it predates my Zope time, but I've heard the stories about the XML hype (and the following anti-hype) all too well... According to SVN, that was 6.75 years ago. The ZDOM API isn't used much, but you do see some code using parentNode etc. once in a while. There don't seem to be tests for it, so it's just bitrotting. Perhaps someone finds the time and energy to deprecate it and eventually 'svn rm' it... By the way, unless Benjamin was calling for the deprecation of ZDOM (I don't think he was), this is the wrong list. General Zope problems should be discussed on zope@zope.org. zope-dev@zope.org is for development *of* Zope, not *with* Zope. Philipp
participants (3)
-
Benjamin Isaac -
Paul Winkler -
Philipp von Weitershausen