[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

Steve Alexander steve@cat-box.net
Tue, 04 Mar 2003 09:52:56 +0200


Tres Seaver wrote:
> 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?

Yes. It should look like this:

<zope:zopeConfigure
    xmlns:zope='http://namespaces.zope.org/zope'
    xmlns='http://namespaces.zope.org/browser'
    >

</zope:zopeConfigure>

Perhaps we should get rid of the name 'zopeConfigure' and just use plain 
'configure' in the zope namespace.

So,

   <configure xmlns="http://namespaces.zope.org/zope">
   </configure>

or

   <zope:configure
      xmlns:zope='http://namespaces.zope.org/zope'
      xmlns='http://namespaces.zope.org/browser'
      >
   </zope:configure>



>   - What benefit is there in using a seemingly different namespace
>     for those directives here?

All the directives in that file (except the outer one) are in the 
browser namespace. I'd rather not see a redundant 'browser' on every line.

>  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.

The file this applies to is in zope/app/browser/services.
I think that the rules about all browser code and configration and files 
being in the 'browser' part of a project make the context clear enough.

When people are working with xml, don't they expect namespaces to be 
used to remove redundancy? I find it natural to see the default 
namespace for an element being that of the majority of contained elements.


>     Doesn't the same objection obtain here as to the Python,
>     'from some_module import *'?

I don't see the connection.

--
Steve Alexander