Re: [Zope] ID's in one XML Document nt unique?
At 12:41 PM 9/6/99 -0500, Stephan Richter wrote:
that helps. Our indexes are created dynamically, sothe second issue would not be the problem. But how could I get the entire URL if I am using DOM methods.
Right now I simply say: <dtml-var id>. Is there a function with which I can get the entire URL?
Try <dtml-var "absolute_url(1)"> which gives the absolute url from the top of the object hierarchy. Note: this method is available on all normal Zope objects. -Amos
Try <dtml-var "absolute_url(1)"> which gives the absolute url from the top of the object hierarchy. Note: this method is available on all normal Zope objects. Thanks. That was what I needed.I couldn't remember the variable.
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> Note: I know that does not work, since I tried it. regards, stephan -- Stephan Richter iXL - Software Designer and Engineer CBU - Physics, Computer Science and Chemistry Student
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
participants (2)
-
Amos Latteier -
Stephan Richter