[Zope-dev] ZDOM BUGS: Anyone know a workaround?
Anthony Pfrunder
s341625@student.uq.edu.au
Sat, 13 Nov 1999 19:49:54 +1000 (GMT+1000)
Hi,
I've found two bugs in the ZDOM (Zope/Lib/Python/Ofs/ZDOM.py) and was
wondering if someone knew a workaround.
1 - getAttributes() only returns attributes of type string, not tokens,
selections etc.
Example:
* Add some properties of various types to a ZClass instance
* Add the following to a Python Method of the ZClass:
parameters: self, REQUEST
t = ''
for i in self.getAttributes():
t = t + i.getNodeName() + ',' + i.getNodeValue()
return t
* View the Python Method of the zclass instance (ie tryit)
2 - REQUEST throws "Unauthorized access" for objects stuffed into it.
Even as superuser you get the unauthorized message.
Example:
* Create an XML document (myxml) in the ZClass
* Create a Python Method:
parameters: self, REQUEST
REQUEST.set('node', self.myxml.getFirstNode())
return self.dump(REQUEST)
* Create a DTML Method (dump):
<dtml-var "node.getNodeName()">
* View the Python Method of the ZClass (ie TryIt)
Anyone?
Anthony Pfrunder