[Pmwiki-users] hierarchy syntax suggestion

J. Meijer commentgg
Mon Jun 14 17:40:26 CDT 2004


I couldn't make much sense of the discussion on hierarchical groups, so this
is my entry. Written off-line as usual, based on list-facts up to june 9th,
FWIW.
My vote is alternative IV.

Alternative I
Imagine the '/' marker to denote the ground-level. Now one can have this
structure:

  PmWiki.LotsOfPages

  PmWiki.Windows
  PmWiki.Windows/Installation

  PmWiki.Installation
  PmWiki.Installation/Windows
  PmWiki.Installation/Windows/Step1
  PmWiki.Installation/Windows/Step2

  PmWiki.Installation/Linux
  PmWiki.Installation/Linux/Step1
  PmWiki.Installation/Linux/Step2

  Windows.Installation
  Windows.Instalation/Step1

Note that between levels below the ground-level, '/' is used. Suppose on is
in PmWiki.Installation (or lower, that makes no difference at all):

  [[/Windows]]        goto PmWiki.Installation/Windows
  [[Windows]]         goto PmWiki.Windows
  [[/Linux/Step1]]              goto PmWiki.Installation/Linux/Step1
  [[Windows/Installation]]  goto PmWiki.Windows/Installation
  [[Windows.Installation/Step1]]  goto Windows.Installation/Step1

Almost compatible with current PmWiki standards.

Alternative II
Another convention is possible. Now '//' is used when a toplevel group must
be taken. Otherwise the '/' reference is assumed to operate at
'groundlevel':

  [[/Windows]]        goto PmWiki.Installation/Windows
  [[Windows]]         goto PmWiki.Windows
  [[/Linux/Step1]]              goto PmWiki.Installation/Linux/Step1
  [[Windows/Installation]]  goto PmWiki.Windows/Installation
  [[//Windows/Installation/Step1]]  goto Windows.Installation/Step1

But this changes the PmWiki standard possibly introducing lots of '//'.

Alternative III
To avoid this one can use '//' to denote the groundlevel (but only when a
shortcut is required):

  [[//Windows]]        goto PmWiki.Installation/Windows
  [[Windows]]         goto PmWiki.Windows
  [[//Linux/Step1]]              goto PmWiki.Installation/Linux/Step1
  [[Windows//Installation]]  goto PmWiki.Windows/Installation
  [[Windows/Installation//Step1]]  goto Windows.Installation/Step1
  [[Windows/Installation/Step1]]   same as above, toplevel is implied by >=2
levels without '//'.

All PmWiki references continue to work as normal. Maybe priviliges could top
out at the sub-page level, so '//' divides the reference between the part
that can have restrictions and the part that cannot. Don't know, but the
notation would allow it.

Alternative IV
As a 4th alternative one may consider 'floating' tree-references to be
always bounded by '/' and to have a preference for staying inside the tree,
descending and ascending as required. Suppose one is in PmWiki.Installation:

  [[/Windows/]]       descend to PmWiki.Installation/Windows
  [[/Windows/Installation/]] goto PmWiki.Windows/Installation
  [[Windows/Installation]]   goto Windows.Installation
  [[Windows]]         goto PmWiki.Windows
  [[/Linux/Step1/]]              to PmWiki.Installation/Linux/Step1
  [[Windows/Installation/Step1]]  goto Windows.Installation/Step1

This system is entirely compatible with the current PmWiki standard. It just
extends it with '/.../' style 'floating' references of arbitrary size.
Within these references even the current '.' operator can be used to allow
parts of the ref to be selectively displayed. I think this alternative is
the most future-proof.

Avoiding wiki-trees
Hierarchical group users should consider a relational database because it
gives them *much* more power to work with. A simple database front-end would
be a cool thing to have in PmWiki and reduce the pressure on hierarchies.
Decent SQL comes cheap these days (SQLite) and included with PHP5.

But I respect the desire for hierarchies, for even the PHP-docs can be
imagined to have been written as a wiki. A database back-end may even end up
invisibly feeding a wiki front-end, so hierarchy issues are there to be
resolved.

-jm








More information about the pmwiki-users mailing list