[pmwiki-users] hierarchical groups, revisited
Joachim Durchholz
jo at durchholz.org
Fri May 26 03:30:03 CDT 2006
Brehmer, Daniel schrieb:
>
> On Thursday, May 25, 2006 at 2:53 PM, Patrick R. Michaud wrote:
>> On Thu, May 25, 2006 at 10:41:51PM +0200, Joachim Durchholz wrote:
>>> Actually the "correct" way for going from Animal.Canine to
>>> Animal.Canine.Terrier would be [[Canine/Terrier]]. Here are the
>>> analogies that hint in the direction:
>>> Going from Animal.Canine to Animal.Feline: [[Feline]].
>>> Going from Animal.Canine to Animal.Feline.Housecat:
>> [[Feline.Housecat]].
>>> Going from Animal.Canine to Animal.Canine.Terrier:
>> [[Canine.Terrier]].
>>
>> I don't disagree; it just seems odd/annoying to be constantly
>> repeating the name "Canine" on the "index page" in order to be
>> able to reach the various types of canines. I'm sure it's one
>> of the first things people would want to eliminate.
>
> I agree that this is odd/annoying because it does not match the way
> we typically move through a directory structure. It seems that the
> only way to make this work is if all pages are equivalent, just like
> folders in a directory structure. How do I change from the directory
> /Animal/Canine to /Animal/Feline? -- cd ../Feline not just Feline!
> Thus:
>
> Absolute link: [[/Animal/Canine]]
> Link to parent: [[..]]
> Link to sibling: [[../Feline]]
> Link to child: [[Bulldog]]
Hmm... I agree with the theory, but it seems unnatural to link to a
sibling by "going up a level" first.
Seems like the problem is that people have totally different
expectations depending on whether they think "I'm inside a directory"
(they expect ../Feline) or "I'm inside a file" (then they expect just
Feline).
Maybe we should simply invent a totally new relative path syntax, simply
to make sure that people don't assume filesystem semantics and get
subtly wrong ideas.
E.g.
Sibling: [[Feline]] (special case)
Nephew: [[Feline/Cat]]
Child: [[*/Bulldog]] (* for "here". Put in something better.)
Grandchild: [[*/Bulldog/Fifi]]
Parent: [[..]] (ends up in "Animal")
Uncle: [[../Mineral]]
Cousin: [[../Mineral/Granite]]
Absolute: [[/Animal/Canine]]
Justification:
1. Common cases should be simple. The standard case is linking to a
sibling, so this should have "no syntax", just the page/group name.
2. Relative links that go to subpages are the next less frequent case
(probably common uses: trails, and group pages that are introductions
with explicit subpage mentions). That's why the subpage syntax should be
simple.
3. Actually I still think that ./Bulldog would be just fine. It means
(literally) "start 'here', then decend down into Bulldog". We could make
the difference between Bulldog and ./Bulldog a FAQ (the first is a
sibling, the second is a subpage).
Unless I'm mistaken, that's the only place where filesystem and
hierarchical-page intuitions diverge anyway, so this can indeed be
handled via a FAQ. Or even simpler, by expanding the line on the editing
tips section of the edit form:
References: [[sibling page]], [[./subpage]], [[http://www.example.com]],
[[another page | link text]], [[#anchor]]
Oh, I just note that the [[another page | link text]] thing should be
[[link | link text]] BTW.
> Or, from above:
> Going from Animal.Canine to Animal.Feline: [[..Feline]]
> Going from Animal.Canine to Animal.Feline.Housecat: [[..Feline.Housecat]]
> Going from Animal.Canine to Animal.Canine.Terrier: [[Terrier]].
Just-dots syntax, eh? Interesting approach, but we'd need the full
spectrum of cases to judge how well it stands up:
Sibling: [[Feline]] (special case)
Nephew: [[Feline.Cat]] (ah, I'm already different here)
Child: [[.Bulldog]]
Grandchild: [[.Bulldog.Fifi]]
Parent: [[..]] (ends up in "Animal")
Uncle: [[..Mineral]]
Cousin: [[..Mineral.Granite]]
Absolute: Oops. [[Animal.Canine]] already has a meaning.
[[.Animal.Canine]], too.
For Absolute, we need to invent something rather arbitrary.
Maybe [[/Animal.Canine]] or [[:Animal.Canine]].
Either way, links will look ugly.
That's not too much of a concern for editing, but it makes the links
less useful for direct unformatted display.
Yet another possibility: reserve the group name "Start" to mean "Root of
the group hierarchy", so absolute links are simply relative links from
"Start". This gives us absolute links like [[Start.Animal.Canine]].
I'm a bit reluctant to take such a common word from the group namespace,
but it does give us nice breadcrumb trail formatting options.
As Patrick said: to be useful, a proposal *should* include the full
array of possibilities. (I'm going to add a template on the HG-Proposals
page today. Have to return to paid work for now.)
Regards,
Jo
More information about the pmwiki-users
mailing list