[Zpt] Multiple conditions?
Shane Hathaway
shane@digicool.com
Fri, 09 Mar 2001 12:34:23 -0500
Martijn Pieters wrote:
>
> On Fri, Mar 09, 2001 at 06:15:25PM +0100, Martijn Pieters wrote:
> > Can I use multiple conditions? If so, what happens if I do? Will the tag
> > only be rednered if *all* conditions are true?
> >
> > If so, this would be very handy, think:
> >
> > <div tal:condition="exists:here/talkback"
> > tal:condition="here/talkback/hasReplies">
> >
> > ...
> >
> > </div>
> >
> > Of course, I need to be sure that attributes are processed in document
> > order of course.. I believe Expat doesn't nessarily give you the
> > attributes in that order, IIRC.
>
> I got my answer already; multiple attributes of the same name are not
> allowed in XML, the parser will tap me on the fingers.
Still, it might be reasonable to expect to be able to do...
<div tal:condition="(exists:here/talkback) and
(here/talkback/hasReplies)">
...
</div>
The syntax would need to be considered carefully. Future version,
maybe.
Shane