[ZPT] v2 of Path Prefixes in CVS

Shane Hathaway shane at zope.com
Tue Sep 2 11:55:57 EDT 2003


Dieter Maurer wrote:
> Fergal Daly wrote at 2003-8-31 21:13 +0100:
>  > ...> 
>  > I find the prefix expressions very confusing.
> 
> When I first saw them, me too, I thought "what a horrible semantics".
> 
> However, at second thought, it is not so unnatural:
> 
>    When you have "path/prefix:name", then the semantics seems always to
>    be: "prefix:name" specifies a function which is applied to the
>    result of evaluating "path".
> 
>    This is very similar (in effect) to the case when you use
>    a path "path/template" where template is a Page Template.
>    The template is applied to the result of evaluating "path"
>    (altough in a way different from direct calling).

That's about right, Dieter.

I see it as a way to be explicit about things we have been doing 
implicitly.  "path/mytemplate" is vulnerable to acquiring something 
other than a template if some other thing happens to be named 
"mytemplate".  But let's say you write a prefix called "templates" that 
acquires only templates.  "path/templates:mytemplate" would then let you 
be sure that you're acquiring a template.

Shane




More information about the ZPT mailing list