[Zope-dev] Acquisition problems with XMLDocument?

Martijn Faassen M.Faassen@vet.uu.nl
Mon, 26 Jul 1999 15:43:22 +0200


Hi there,

I'm having some trouble getting acquisition to work with XMLDocuments.
When
calling some part of an XML doc by URL acquisition works, but when
calling it in Python it doesn't (or I don't get it). I get name errors.

Example:

XMLDocument - doc:
<?xml version="1.0"?>
<text>This is text</text>

DTML method - renderText:
<p>
<!--#var "text_content()"-->
</p>

DTML method - viewText:
<!--#var standard_html_header-->
<!--#var "doc[0].renderText()"-->
<!--#var standard_html_footer-->

When I access renderText as follows, it works:

.../doc/0/renderText

However, when I use viewText instead, it gives a NameError (text_content
unknown). So acquisition is in fact doing something (as renderText is
indeed called), but then it seems to forget the namespace context?

Am I doing something wrong or is this a bug?

Regards,

Martijn