[ZDP] Rendering for Quick Reference XML

Stephan Richter SRichter@ixl.com
Thu, 26 Aug 1999 09:14:17 -0500


> These are standard DOM methods. I'm trying this myself right now, but
> I'm having trouble. What for instance, if you expect the first subnode
> to be 'title'? Saying getChildNodes[0] doesn't work, as there may be
> empty textnodes around still. How do you skip these?
> objectValues('title') skips those automatically.

Okay, you may be right here. But when do you really want that?

<abstract>
  foo ...
  <title>Hello World!</title>
  bar ...
</abstract>

okay, I see. The plain text was a bad example I guess. here a better one?

<project>
   <category> blah</category>
   <title>Hello</title>
</project>

You could use two for loops. or even better, put the title inside the project
tag.

<project title="Hello">

So you can call it <dtml-var title> without any problem. I just noticed that I
went more and more away from using objectValues. :) 


> I should think some more. :)
I guess I need to think more about the issue too.

BTW, I just strated college again and had to rebuild my box, sol I am not srtuo
in school completely yet to receive Zope mail. After this weekend I should be
able to answer to the mail more quickly. :)

regards,
stephan
--
Stephan Richter
iXL - Software Designer and Engineer