[Pmwiki-users] Hierarchical groups - possible notation

John Feezell JohnFeezell
Wed Jun 9 02:32:40 CDT 2004


On Tue, 8 Jun 2004 17:42:07 -0600, Patrick R. Michaud <pmichaud at pobox.com>  
wrote:

> I'm still looking into the possibility of dealing with hierarchical  
> groups,
> or at least offering it as an optional feature.
>
> The issue I've generally had with hierarchical groups is dealing with
> relative links between pages.  Absolute links where the entire
> group name is specified are no problem.  But if we want to allow
> relative links, where only a part of the path needs to be specified,
> then it gets a bit tricky.  For example, if we're currently on a page
> called "NFL.Teams.Patriots.Playoffs", then how do the following
> resolve...?
>
> 1. [[SeasonOpen]] links to NFL.Teams.Patriots.SeasonOpen (standard  
> wikiword)
> 2. [[Teams.WorkingTogether]] links to Teams.WorkingTogether or
>       NFL.Teams.WorkingTogether or  
> NFL.Teams.Patriots.Teams.WorkingTogether?
> 3. [[Patriots.Washington]] links to NFL.Teams.Patriots.Washington or
>       Patriots.Washington or NFL.Teams.Patriots.Patriots.Washington?
> 4. [[Playoffs.WildCard]] links to NFL.Teams.Patriots.Playoffs.WildCard,
>       or Playoffs.WildCard?
----
snipped
----

Perhaps the following notation, or some variation of it, could work
for hierarchical groups with relative references.

  Let
    the last name always be the existing pagename
    [[pagename]] resolve to replacement for existing pagename
    [[.group.pagename]] resolve to replacement for existing pagename
    [[/group.pagename]] resolve to top level group with pagename
    [[group.group.pagename]] resolve to one-to-one replacement
                             beginning at right most position
                             with group clusters.
    [[(group.group).pagename]]

  Given: NFL.Teams.Patriots.Playoffs

  Resolve the following:
  [[Teams.WorkingTogether]]  => NFL.Teams.Teams.WorkingTogether
  [[(Washington.Patriots).WorkingTogether]] =>  
NFL.Teams.Washington.Patriots.WorkingTogether
  [[SeasonOpen]] => NFL.Teams.Patriots.SeasonOpen
  [[Patriots.Washington]] => NFL.Teams.Patriots.Washington
  [[Stats.Washington]] => NFL.Teams.Stats.Washington
  [[(Stats.Washington)]] => NFL.Teams.Patriots.Stats.Washington
  [[.Patriots.Washington]] => NFL.Teams.Patriots.Patriots.Washington
  [[Stats.Patriots.Washington]] => NFL.Stats.Patriots.Washington
  [[PR.Stats.Patriots.Washington]] => PR.Stats.Patriots.Washington
  [[.PR.Stats.Patriots.Washington]] =>  
NFL.Teams.Patriots.PR.Stats.Patriots.Washington
  [[.PR.Stats.Washington]] => NFL.Teams.Patriots.PR.Stats.Washington
  [[/PR.Stats.Washington]] => PR.Stats.Washington
  [[.Washington.Stats]] => NFL.Teams.Patriots.Washington.Stats
  [[Playoffs.WildCard]] => NFL.Teams.Playoffs.WildCard
  [[/Playoffs.WildCard]] => Playoffs.WildCard
  [[.Playoffs.WildCard]] => NFL.Teams.Patriots.Playoffs.WildCard
  [[.Teams.WorkingTogether]] => NFL.Teams.Patriots.Teams.WorkingTogether
  [[/NFL.Playoffs.WildCard]] => NFL.Playoffs.WildCard


/JF



More information about the pmwiki-users mailing list