[Pmwiki-users] Wikilink tree syntax

J. Meijer commentgg
Mon Jul 26 17:29:02 CDT 2004


Below I'll be describing the wikilink syntax I'll be implementing for use
with multi-dimensional namespaces, i.e. trees. I think it is the syntax
Patrick was looking for. Skip ahead, 'cause there's 'off-topic' stuff coming
up now.

-

PmWiki gaining nestable namespaces is a major step forward. There are lots
of folks checking out wiki's and pmwiki in particular. Probably namespaces
will make them want to look no further and stay. That too would be a big
step forward, bringing in the expertise required for the next generation.

PmWiki. Clean, configurable, capable, compact. Compatible with the future.
Built on the determination to share. If you can't contribute, please
consider donating.

-jm



I'd wish mailing-lists would come with an opt-in meta-list for non-tech
topics like "ourselves", professionally or passionately. So we could get to
know each other -and live- a bit more. The 'just work' restriction is just
plain unfair. Stupid world! Besides being able to meet the good guys, the
girls might just like it. Yepp, it's a stupid world. But it's the only one
we have. Now onto the on-topic stuff..



==============
 Wikilink tree syntax
==============

For my site I'll be going with a group.page scheme where the group can have
structure, f.e. "A.B.C". That structure I'll still treat as a group even
though it now has internal structure. Wikilinks are resolved in the
following manner.

Simple wikilinks. From within "Group.Page" the following wikilinks become:
 [PeerPage] ___________Group*PeerPage
 [PeerGroup.Page] ______PeerGroup.Page
 [Higher.Group.Page] ____Higher.Group.Page

Using this form of wikilinks, the current pmwiki pagenames can be created,
but now also at any desired depth. The asterisks '*' is used to visualize
the point where defaulting from the current path ends.

>From within "Top.Middle.Group.Page" the same wikilinks become:
 [PeerPage] ___________Top.Middle.Group*PeerPage
 [PeerGroup.Page] ______Top.Middle*PeerGroup.Page
 [Higher.Group.Page] ____Top*Higher.Group.Page

All the above simple wikilinks are relative to the current group.

Going up in a tree. Begin the wikilink with the separator. In the example it
is used to anchor the starting level to 'Middle', wherever it is located
within the path:
 [.Middle] _____________Top*Middle
 [.Middle.Page] _________Top*Middle.Page
Idem, but at the cost of an additional separator (probably not worth it):
 [Middle>] _____________Top*Middle
 [Middle>PeerGrp.Page] __Top*Middle.PeerGrp.Page

Going deeper. Use an anchor, here '/' is chosen, to denote the current
groundlevel:
 [/Sub] _______________Top.Middle.Group.Page*Sub
 [/Sub.Note] ___________Top.Middle.Group.Page*Sub.Note

Going to a subpage in any peer (=page at same depth but in another group).
Use the groundlevel anchor:
 [Peer/Sub] ____________Top.Middle.Group*Peer.Sub
 [Group.Peer/Sub.Note] __Top.Middle*Group.Peer.Sub.Note

Making a global reference. Only required from within a complex tree. Include
the wikilink after two anchors (my choice for simplicity):
 [//Top.Middle] _________*Top.Middle
 [//Top.Middle.Group] ____*Top.Middle.Group
Alternatively embed the wikilink in anchors:
 [/Top.Middle/] _________*Top.Middle
Or use a special character like ':' or  '@' to mark the rootlevel ('&' is a
bad choice here):
 [:Top.Middle] __________*Top.Middle
 [@Top.Middle]  ________*Top.Middle

The above pair of tokens '.' and '/' can of course be substituted by any
other pair, such as '/' and '//'. Other popular separators are '::', '<',
'>', '->' and '?'.

Considerations
I opt to use current wikilinks as relative links (instead of them being
global links) because these are the most useful within trees. Most of the
scope of operating inside a tree can effectively be ignored. A full 2-level
pmwiki f.e. can be moved into a group called 'OldSite' and all links
continue to function. Global links do not allow this kind of flexibility.
Uninitiated users are likely to think in terms of global links, so they are
in for a (hopefully welcome) surprise.
I hope to migrate to persistent links, so when a page is renamed or moved,
all links to it are reformulated to stay intact. Internally a page-id will
be used.

The END.

======================================
How do I get the current pmwiki to create and accept long names? I think the
solution already passed the list. I'd just like the most up-to-date info
(Jason?).

I'll probably be 'severely off-line'..

-jm


ps As an example of how Outlook Express accumulates junk in its emails, I
trimmed this email down to 6.6k instead of the OE formatted 16k full of
useless <FONT blabla></FONT> tags with /nothing/ in them. To care or not to
care, that is the question.




More information about the pmwiki-users mailing list