[Zope] Re: + in url /zope object name
Tres Seaver
tseaver at palladion.com
Wed Apr 5 19:20:46 EDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andreas Jung wrote:
>
>
> --On 5. April 2006 14:12:15 -0400 Brian Sullivan
> <briansullivan at gmail.com> wrote:
>
>>>>
>>
>> Starting with a "+"? What about containing a "+"?
>>
>> What about Zope 2?
>>
>> The reason this is an issue for me is that I have a whole bunch of
>> content that has directories using "+" in the name that I would like
>> to upload.
>
>
> Basically: things are as they are. If you want something different try
> to patch the code as you mentioned in your first mail...patch it and try
> it out.
Zope maps URL traversal onto at least three separate kinds of things:
- object attributes
- container items
- software lookup (typically views)
On the filesystem, you only have to deal with *one* of these, which is
why there are no (or fewer) restrictions.
For non-containers, the clash between attribute and software lookup is
usually resolvable in an unambiguous way. However, for containers whos
items can be named arbitrarily by the users (your case), there is no
clear way to resolve whether a particular path element should refer to
an item or a view. Reserving some portion of the namespace for view /
software lookup (leading '@@' for views, leading '++<namespacename>++'
for other fancy traversal) is a compromise for coping with the problem.
Zope2 *doesn't* cope well with it, which led to *lots* of grief: the
classic example is that you add an object named 'target' and suddenly
your ZMI tabs all break. Zope2 applications have therefore often
imposed harsher restrictions on naming container items, trying to reduce
such conflicts.
Zope2 also had a policy (going back to Bobo) that "private" methods
(whose names traditionally start with '_' in Python) would not be
publishable, which is the origin of the restriction on leading underscores.
The case the OP referred to *is* pluggable in Zope3: the "adding" name
doesn't have to be '+', and you can register a different name-checker
component for your containers than the default one.
Tres.
- --
===================================================================
Tres Seaver +1 202-558-7113 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFENFDO+gerLs4ltQ4RApIkAJ4kuldPkavrLolxdoVxbQfm0ue9sQCfW7s3
LnwicjBdOUFQyYXEctVhsas=
=re4Q
-----END PGP SIGNATURE-----
More information about the Zope
mailing list