[Zope] How do I control iteration over XML elements?
Jean Jordaan
Jean@mosaicsoftware.com
Tue, 1 Aug 2000 11:28:43 +0200
Hi Curtis & all
> yuck....
indeed.
Just thinking aloud ..
I got as far as:
<dtml-in "teams[0].getElementsByTagName('team')">
<dtml-in "objectValues('member')">
!! but now I can't see 'team' anymore :(
<dtml-let membername="text_content">
<dtml-var membername> is member of
<dtml-in "objectValues('team')">
!! this whole -in never contains anything .. because
!! I'm already -in member (Have I got this right?)
<dtml-var "text_content('name')">
<dtml-in "objectValues('member')">
<dtml-if "text_content == membername">
<dtml-var name>,
!! AFAICT 'name' won't be visible -in 'member' ..
</dtml-if>
</dtml-in>
</dtml-in>
</dtml-let>
<br>
</dtml-in>
</dtml-in>
I think I need a lot more Python than I know ..
1. objectValues returns a list -- this needs to get sorted
& duplicates dropped.
2. when -in team and -in member, the name of the team
needs to be accessible.
--
jean