[Zope3-dev] Re: [Zope3-checkins] CVS: Zope3/src/zope/app/browser/services -
add_svc_config.pt:1.2 useconfiguration.pt:1.2 useconfiguration.py:1.2
configure.zcml:1.21 service.py:1.7 add_service_1.pt:NONE
add_service_2.pt:NONE
Tres Seaver
tseaver@zope.com
03 Mar 2003 20:41:47 -0500
On Mon, 2003-03-03 at 18:16, Guido van Rossum wrote:
<snippage>
> - Some miscellaneous cleanup (e.g. made the browser namespace the
> default namespace in zope/app/browser/services/configure.zcml).
This part worries me, for two reasons:
- Doesn't the "default namespace" declaration on the outermost
element put that element into that namespace as well?
- What benefit is there in using a seemingly different namespace
for those directives here? Wouldn't clarity be better served
by making 'browser:page' the normative spelling everywhere? I
realize that expat has no problem with a different default
namespace, but humans have to parse ZCML too, and changing
the default makes them work harder than they should need to.
Doesn't the same objection obtain here as to the Python,
'from some_module import *'?
<more snippage>
> === Zope3/src/zope/app/browser/services/configure.zcml 1.20 => 1.21 === (930/1030 lines abridged)
> --- Zope3/src/zope/app/browser/services/configure.zcml:1.20 Fri Feb 21 09:50:05 2003
> +++ Zope3/src/zope/app/browser/services/configure.zcml Mon Mar 3 18:16:04 2003
> @@ -1,33 +1,34 @@
> <zopeConfigure
> - xmlns='http://namespaces.zope.org/zope'
> - xmlns:browser='http://namespaces.zope.org/browser'
> + xmlns='http://namespaces.zope.org/browser'
> >
>
> <!--Error Reporting Service -->
>
> - <browser:pages
> + <pages
> for="zope.app.interfaces.services.error.IErrorReportingService"
> permission="zope.Public"
> class="zope.app.browser.services.error.EditErrorLog">
>
> - <browser:page name="index.html" template="error.pt" />
> - <browser:page name="edit.html" attribute="updateProperties" />
> - <browser:page name="showEntry.html" template="errorentry.pt"/>
> - <browser:page name="showTextTBEntry.html"
> + <page name="index.html" template="error.pt" />
> + <page name="edit.html" attribute="updateProperties" />
> + <page name="showEntry.html" template="errorentry.pt"/>
> + <page name="showTextTBEntry.html"
> template="texttbentry.pt"/>
> - </browser:pages>
> + </pages>
>
> - <browser:menuItem menu="add_component"
> + <menuItem
> + menu="add_service"
> for="zope.app.interfaces.container.IAdding"
> - action="ErrorReportingService" title='Error Reporting Service'
> - description='Error Reporting Service for Logging Errors'
> + action="ErrorReportingService"
> + title="Error Reporting Service"
> + description="Error Reporting Service for Logging Errors"
> />
>
> - <browser:icon name="zmi_icon"
> + <icon name="zmi_icon"
> for="zope.app.interfaces.services.error.IErrorReportingService"
> file="error_service.gif" />
>
> - <browser:menuItem
> + <menuItem
> for="zope.app.interfaces.services.error.IErrorReportingService"
> menu="zmi_views"
> title="Errors"
>
> [-=- -=- -=- 930 lines omitted -=- -=- -=-]
>
> +<page
> name="index.html"
> menu="zmi_views" title="Control"
> permission="zope.ManageServices"
> @@ -831,18 +846,41 @@
> attribute="index"
> />
>
> - <browser:menuItem
> - menu="add_component"
> + <menuItem
> + menu="add_service"
> for="zope.app.interfaces.container.IAdding"
> action="ObjectHub"
> - title='ObjectHub'
> + title="ObjectHub Service"
> description="An object hub, for cataloging, unique object ids, and
> more: use sparingly"
> />
>
> - <browser:icon
> + <icon
> name="zmi_icon"
> for="zope.app.interfaces.services.hub.IObjectHub"
> file="hub.gif" />
> +
> +
> +<!-- "Add Service" menu -->
> +
> +<menuItem
> + menu="add_component"
> + for="zope.app.interfaces.container.IAdding"
> + action="../AddService"
> + title="Service"
> + description="Takes you to a menu of services to add"
> + permission="zope.ManageServices"
> + />
> +
> + <view
> + name="AddService"
> + for="zope.app.interfaces.services.package.IPackage"
> + permission="zope.ManageServices"
> + class="zope.app.browser.services.service.ServiceAdding">
> +
> + <page name="index.html" attribute="index" />
> + <page name="action.html" attribute="action" />
> +
> + </view>
>
> </zopeConfigure>
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com