[ZPT] Re: xpath: expression type?
Chris Withers
chris at simplistix.co.uk
Mon Oct 10 15:07:40 EDT 2005
Paul Everitt wrote:
>
> No, I just meant that I'm not subscribed to the zpt list. So, I would
> have replied to all, there would have been a bounce.
Oh well, I shall bounce away then... ;-)
>>> Indeed, that was kind of the direction I was going towards. I've
>>> been told that ZPT in Zope 3 is more pluggable, giving various
>>> opportunities to register things that get evaluated inside TALES at
>>> different hops. (For example, traversal on path expressions or
>>> whatnot.)
>>>
>>
>> *nods* well, I'd imagine plugging in a new expression type isn't too
>> hard, no matter what TALES implementation is used...
>>
>>
>>> One thing is missing, though, from what you have below: a way to
>>> bind to the Python variable holding the node. Let's say that it is
>>> "here" that is the node that we are operating on. You need to say
>>> something more like:
>>> tal:repeat="thisvendor xpath: here //vendor[@status='approved']/ title"
>>> Is that possible?
>>>
>>
>> Hey, it's out expression type, we can use whatever syntax we want ;-)
>>
>> Now, I guess whatever "here" is above needs to support an xpath
>> traversal. I guess in Zope 3 we'd check for an "xpath interface" on
>> "here" and raise an exception if it didn't support it?
>
>
> Yup.
>
>> (see, I can hand wave too ;-) )
>
>
> Listen, I"m Mr. Hand Wave. :^) My talent is limited to partially
> understanding this email, with zero idea how to do it.
Yeah yeah...
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the ZPT
mailing list