[Zope3-dev] spelling of namespace signifiers
Steve Alexander
steve@cat-box.net
Tue, 04 Jun 2002 22:35:46 +0100
We started with
foo/bar.html;ns=view
abbreviated that to
foo/bar.html;view
and then changed to
foo/view::bar.html
to appease Opera, and make the filename extension clearly the last part
of the URL.
However, foo/view::bar.html has two problems:
1: You have to put a ./ before relative URLs
./view::baz.html
2: The colon is conventionally urlencoded to %3A
This leads to location bars in browsers looking like
http://server.tld/folder/container/view%3A%3Aindex.html
Rather than
http://server.tld/folder/container/view::index.html
Although you can type the latter in, and it will work.
I propose that a URL namespace signifier should
1: Be at the start of a path segment, so as to leave the filename
extension intact
2: Use chararacters that are not conventionally urlencoded
The available characters are
dash -
dot .
under _
as determined by running this bit of python:
>>> import string
>>> import urllib
>>> urllib.quote([chr(a) for a in range(32, 127)])
'%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-./0123456789%3A%3B%3C%3D%3E%3F%40ABCDEF
GHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7E'
>>>
So, what spellings of a namespace signifier would meet my two criteria?
I'll suggest a few, but first repeat the already rejected ones and the
current one:
http://server.tld/folder/container/index.html;ns=view
http://server.tld/folder/container/index.html;view
http://server.tld/folder/container/view::index.html
New suggestions:
http://server.tld/folder/container/view--index.html
http://server.tld/folder/container/view..index.html
http://server.tld/folder/container/__view__index.html
http://server.tld/folder/container/-view-index.html
http://server.tld/folder/container/--view--index.html
Bearing in mind that it will be relatively rare, and generally
get-aroundable-if-you-plan-for-it, to have to use this spelling, I'm
most in favour of the last spelling: --view--index.html.
Any comments?
--
Steve Alexander