RE: [Fwd: Re: [Zope] test for the existence of a nodeValue]

2005-08-05 Thread Jon Bowlas
Many thanks Dieter, works a treat. I'm working through the python tutorial now. -Original Message- From: Dieter Maurer [mailto:[EMAIL PROTECTED] Sent: 04 August 2005 18:58 To: [EMAIL PROTECTED] Cc: zope@zope.org Subject: Re: [Fwd: Re: [Zope] test for the existence of a nodeValue] Jon

[Fwd: Re: [Zope] test for the existence of a nodeValue]

2005-08-04 Thread Jon Bowlas
Thanks Dieter, But I still cant get it to work. I've changed my get_attributes.py script to this: if not attobject: return '' version = attobject.get_viewable() nodes = version.content.documentElement.getElementsByTagName(attname) if not nodes: return '' nodeValue =

Re: [Fwd: Re: [Zope] test for the existence of a nodeValue]

2005-08-04 Thread Dieter Maurer
Jon Bowlas wrote at 2005-8-4 10:31 +0100: ... But I still cant get it to work. I've changed my get_attributes.py script to this: if not attobject: return '' version = attobject.get_viewable() nodes = version.content.documentElement.getElementsByTagName(attname) if not nodes: return ''

Re: [Zope] test for the existence of a nodeValue

2005-08-03 Thread Dieter Maurer
Jon Bowlas wrote at 2005-8-2 19:08 +0100: ... I'm pretty new to python and zope but would like to know how I can adapt this script below to test to see if nodeValue actually contains a value and if it doesn't then I would like to return a default value I can check for using my zpt that references

[Zope] test for the existence of a nodeValue

2005-08-02 Thread Jon Bowlas
Hi All, Im pretty new to python and zope but would like to know how I can adapt this script below to test to see if nodeValue actually contains a value and if it doesnt then I would like to return a default value I can check for using my zpt that references this script: if not