[Zope] ID's in one XML Document nt unique?

Amos Latteier amos@aracnet.com
Mon, 06 Sep 1999 13:29:08 -0700


At 03:08 PM 9/6/99 -0500, Stephan Richter wrote:

>Also, is it possible that I just say something like this (please correct
what I
>am doing wrong):
>
><dtml-with "xmldoc/e134/e12">
>  <dtml-in "getChildNodes()">
>     foo
> </dtml-in>
></dtml-with>

This is a common DTML mistake. You cannot use URL notation to refer to
sub-objects in DTML. This is not a XML Document specific issue at all. If
you want to refer to sub-objects you need to use the appropriate Python
syntax. This is usually getattr, or getitem.

In this case you need to use getitem, as per the README.txt file.

<dtml-with "xmldoc['e134']['e12']">
  <dtml-in getChildNodes>
    ...
  </dtml-in>
</dtml-with>

Make sense?

-Amos