Better access to APIs in paths (was Re: [Zope3-dev] needing viewsclues - template/title troubles)

Jim Fulton jim@zope.com
Mon, 24 Feb 2003 17:10:24 -0500


Jim Fulton wrote:
> Stuart Bishop wrote:
> 
>>
>> On Tuesday, February 25, 2003, at 02:13  AM, Shane Hathaway wrote:
>>
>>> I also want to clarify that in this syntax, you're not allowed to use 
>>> a  namespace qualifier for the first name in the path.  The first 
>>> name must be a local or global variable (just like today).  So 
>>> "dc:context/title" is not allowed, but something like 
>>> "context/zope:services/events/dc:title" is allowed and probably > 
>>> common.
>>
>>
>>
>> I originally started with "context/dc:title", but added more magic by 
>> making the namespaces map to a ZPT expression type (so it could be 
>> done). But this is probably silly since you then have to make sure so 
>> twonk tries to to map XPATH to the 'path' prefix... Although 
>> tal:content="dc:title" looks nicer... so I'm confused.
> 
> 
> I think it looks worse. You use the explict use of context. This is

Sorry, you "lose" the explicit use of context.

> too much like DTML magic namespaces.

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (888) 344-4332            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org