Re: [Zope] XMLDcoument setAttribute error

2000-11-12 Thread Dieter Maurer

Matt writes:
 > I have an external method like the following
 > 
 > def make_an_element(self,REQUEST):
 > new_elem = self.createElement(REQUEST.new_elem_name)
Use:
   new_elem = self.createElement(REQUEST.new_elem_name).__of__(self)
 > new_elem.setAttribute('hello','there')
 > self.appendChild(new_elem)
 > 
 > I call this on an XMLdocument root node and get the following error at
 > the setAttribute stage :
 > 
 >Error Type: AttributeError
 >Error Value: aq_base



Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] XMLDcoument setAttribute error

2000-11-11 Thread Matt

I have an external method like the following

def make_an_element(self,REQUEST):
new_elem = self.createElement(REQUEST.new_elem_name)
new_elem.setAttribute('hello','there')
self.appendChild(new_elem)

I call this on an XMLdocument root node and get the following error at
the setAttribute stage :

   Error Type: AttributeError
   Error Value: aq_base



   Troubleshooting Suggestions

The URL may be incorrect.
The parameters passed to this resource may be
incorrect.
A resource that this resource relies on may be
encountering an error.

   For more detailed information about the error, please
refer to the HTML source for this page.

   If the error persists please contact the site
maintainer. Thank you for your patience.




Traceback (innermost last):
  File /usr/local/zope/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py,
line 222, in publish_module
  File /usr/local/zope/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File /usr/local/zope/Zope-2.2.2-src/lib/python/Zope/__init__.py, line
221, in zpublisher_exception_hook
(Object: Manageable)
  File /usr/local/zope/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File /usr/local/zope/Zope-2.2.2-src/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: acceptLiveFileInfo2)
  File /usr/local/zope/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: acceptLiveFileInfo2)
  File
/usr/local/zope/Zope-2.2.2-src/lib/python/Products/ExternalMethod/ExternalMethod.py,
line 263, in __call__
(Object: acceptLiveFileInfo2)
(Info: ((, formfdate001108fnamep001108_http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )