[Zope-dev] Re: [Zope3-dev] Re: Re: RFC: TALES adapters and
 TAL/Tales variable namespaces
    Garrett Smith 
    garrett at mojave-corp.com
       
    Thu May 27 16:55:23 EDT 2004
    
    
  
Jim Fulton wrote:
 > We don't.  In fact, one could argue that adaptation is a bit like
 > a different kind of traversal. In fact, in Zope 3, we already have
 > a notion of this. In general, in Zope 3 paths, we can say:
 >
 >   foo/++namespace++name
 >
 > where "/++namespace++" can be thought of as a special form of
 > namespace operator (similar and partly inspired by xpaths
 > "/:namespace:").
 >
 > So, we could also use something like:
 >
 >   content/++adapter++dc/title
 >
 > but I think people want something more concide for ZPT.
I prefer this notation, even though it's more verbose. I think it should 
be supported along with a short cut syntax.
This problem seems analogous to view lookup -- 
"content/++view++index.html" and "content/@@index.html" are equivalent.
So, applied to adapters, we could use:
   content/++adapter++dc/title (or '++adapt++')
one could use:
   content/##dc/title
or perhaps (yuckier):
   content/**dc/title
I'd hate to see Yet Another Traversal Syntax introduced when we already 
have a decent pattern established.
  -- Garrett
    
    
More information about the Zope-Dev
mailing list