[Zope3-dev] spelling of namespace signifiers
Jim Fulton
jim@zope.com
Wed, 05 Jun 2002 10:09:02 -0400
Shane Hathaway wrote:
>
> Casey Duncan wrote:
> > Here's a crazy idea, how about:
> >
> > http://server/folder/container;view=index.html
> >
> > I think this states the intent better because we are interested in the
> > container object (not a subobject) and we really just want an alternate
> > view of it which we can specify as a parameter.
> >
> > An you still get the file extension at the end.
>
> Another alternative:
>
> http://server/folder/container;views/index.html
This is kind of neat. It has two disadvantages:
- The first, and biggest, is that it makes relative URLs
hard you generate. Suppose you were in index.html and you wanted to
give a link to:
http://server/folder/container;etc/Services
How would you spell the relative link? You'd have to
use:
../container;etc/Services
but then you'd need to know the container name.
Of course, if you were in ZPT, you could use:
tal:attributes="href string:${content;view/absolute_ur};etc/Services"
A related issue issue is how to do traversal given a container using
the Python traveral API. You'd need to traverse from folder. I suppose
you could traverse with:
".;views/index.html"
but this seems rather messy.
- ;views doesn;t seem to qualify the right thing, which is
index.html. But this might not be so bad. It sort of qualifies the
namespace, rather than the name.
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