[Zope3-dev] zcml prefix dot syntax oddity?

Jim Fulton jim@zope.com
Sun, 30 Jun 2002 16:18:30 -0400


Gary Poster wrote:
> The zcml prefix dot syntax--as in
>       factory=".ServiceAdding."
> seems to be acting oddly and I just want to make sure that it is not 
> performing as designed before I choose between (a) trying to figure out 
> the error or (b) lobbying against the design. :-)
> 
> Sometimes the prefix dot seems to be doing what I expect--starting from 
> the current package--and sometimes it seems to be starting higher.  In 
> particular, in 
> Zope/App/OFS/Services/ServiceManager/Views/Browser/configure.zcml the 
> behavior seems to be what I expect, looking in ...Browser.  However, in 
> Zope/App/OFS/Content/Folder/Views/Browser/configure.zcml the zcml 
> appears to think that its current folder is actually two folders up, in 
> Zope/App/OFS/Content/Folder.
> 
> What's up with that?

You can override the package used by providing a package attribute
in the zopeConfigure element. Without reseting the package, view
configurations tend to have to use long paths to refer to components and
interfaces in the content package. Setting the base pacjage to the
content package avoids this.

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