[Zope3-dev] z3 in z2 land, zcml vs. yaml, and a new year

Phillip J. Eby pje at telecommunity.com
Thu Jan 1 09:52:34 EST 2004


At 04:37 AM 1/1/04 -0500, Shane Hathaway wrote:
>The one thing that's not so obvious is namespaces.  The following
>declaration needs the name "browser" to get mapped to
>"http://namespaces.zope.org/browser" somehow:
>
>
>browser.page:
>     class:      .interfacewidget.InterfaceWidget
>     for:        zope.app.interfaces.component.IInterfaceField
>     name:       edit
>     permission: zope.Public

Heck, at that point you're only one step away from a familiar-looking .ini 
file:

[Declare namespaces]
browser = http://namespaces.zope.org/browser

[browser.page]
class      = .interfacewidget.InterfaceWidget
for        = zope.app.interfaces.component.IInterfaceField
name       = edit
permission = zope.Public

Of course, you won't be able to use ConfigParser to handle this format, as 
it doesn't match its semantics.  But PEAK's ini parser was actually 
modelled on ZCML, from the point of view of being extensible with different 
sorts of "directives" (section types).  So you might be able to steal some 
ideas from there.




More information about the Zope3-dev mailing list