[pmwiki-users] Making a domain name a wiki page

Patrick R. Michaud pmichaud at pobox.com
Thu Jun 1 09:37:48 CDT 2006


On Thu, Jun 01, 2006 at 01:16:23PM +0200, christian.ridderstrom at gmail.com wrote:
> On Wed, 31 May 2006, Patrick R. Michaud wrote:
> 
> >>I've been wondering if some sort of escaping mechanism couldn't be used
> >>here, so that something like [[Group\.Name.Ver\ 1\.2]] could produce a
> >>link like
> >>
> >>  http://www.somewiki.org/Group.Name/Ver 1.2/
> 
> >A *very* useful idea.  I'll keep it in mind.
> 
> It is useful, but with the drawback that it'd not favour the authors, who 
> has to escape the special characeters in name. An alternative, not sure 
> if you intended this above, is to escape the separator between group and 
> name.

That would seem to be even less favorable to authors.  Which is more
commonly used -- the '.' as separator or as a character in a group
or name?  For PmWiki I'm fairly sure it's more common as a separator
than as a component of a name.  Put another way, we don't want to
make people always have to write things like [[Main\.HomePage]], which
invites a lot of confusion (and is imo more author unfriendly).

> A question though... is '/' a valid characeter within a path component of 
> a URI? I'm guessing not, which means that we don't loose that much if we 
> never let '/' be an (easily) allowed character in a page name.

Your question is a bit misleading.  The strict answer to your question
is that yes, '/' is a valid character within the path component of a
URI.  For example, in "http://www.example.com/path/to/file.gif", the
path component is "/path/to/file.gif" and obviously contains slashes.

I think what you meant to ask is if '/' would be a valid character
in one of the pieces of the path, and the URI specification doesn't
make any restrictions about that.  It's entirely up to the application
or webserver that receives the path component in the request to decide
how that is parsed and used.  Of course, what most webservers do is
to translate the path component into a filesystem path somehow, and
most filesystems don't allow slashes in filenames, so that's where
the restriction comes.  But that's a feature of webservers and
filesystems, not the URI specification. 

> >At the moment I'm thinking that we'll establish an equivalence
> >between underscores and spaces, so that
> >
> >   [[Group.Name with spaces]]
> >
> >will generate a url like
> >
> >   http://www.example.com/wiki/Group/Name_with_spaces
> 
> How will the collision with the old style be handled? I mean,
> 	[[Name with spaces]]
> used to link to .../NameWithSpaces?

I'm still working that out.  I'm thinking there will be a
sequence of checks -- it'll first look for "Name_with_spaces"
(case insensitive), and if that's not found it'll check for 
"NameWithSpaces" (probably also case insensitive).

> And how will this be treated
> 	[[Name     with     spaces]]

Multiple spaces would be treated the same as a single space.

> This seems quite difficult in general. 

I did say this wasn't trivial; that's one of the reasons it's taking
a while to work out.  :-) :-)

Pm




More information about the pmwiki-users mailing list