MeatballWiki |
RecentChanges |
Random Page |
Indices |
Categories
One of the most fascinating properties of the original
WikiWikiWeb and most of its followers (systems, clones) is automatic page linking. I'll try to analyze automatic page linking and try to draw a picture about its variations and how to cope with them using
AutoLinkStrategies. --
HelmutLeitner
Basically a wiki software does its magic in two steps: recognize page names and decide how to link them.
Everyone knows the most basic form:
- recognize CamelCase page names and
- link
- to existing page or
- link to the edit new page form
But both steps have many useful variations.
Recognizing page names:
- CamelCase
- a free link syntax, e. g. <nowiki>[[page xy]] {{page xy}}</nowiki>
- an absolute or relative subpage syntax, e. g. /subpage /Subpage /SubPage Page/Subpage
- an interwiki (namespace?) syntax, e.g. Wiki:WardCunningham
- any uppercase word, e. g. Wiki
- any word, e. g. subpage
- ...
Automatic word linking is an interesting area. It is often useful (look e. g. into TolkienWiki) and it more or less enforced the idea of positive linking. This means that a link is only created if the corresponding page exists (otherwise this last sentence alone might create 13 begging page links).
Linking may look for single connections:
- T top level page
- D subpages (down linking)
- B brother pages
- U to peers of parent page (up linking)
- S sister site linking
Linking may use lists to look for matches:
- B{categories} leaf pages
- P{list:page [...]} list of optional parent pages
- ...
Most but not all of these alternatives come from having subpages enabled.
AutoLinkStrategies now means to configure a wiki to follow a certain definable path in trying to establish links to existing pages.
Example:
For example "AutoLinkStrategies=B;D;T;P{list:Glossary FAQ}" might mean:
- link to existing page on the same level if it exists
- otherwise link to existing subpage if it exists
- otherwise link to existing primary page if it exists
- otherwise link to existing subpage of page "Glossary" if it exists
- otherwise link to existing subpage of page "FAQ" if it exists
- otherwise link to an "edit page" with a time-stamped link entry of the (MetaWiki-) Search-Engine(s) that produced zero or more hits
It's clear that one needs an efficient way to check for the existance of the hypothetical page names that the system has to check.
Possible extensions:
Further ideas (some inspired by, though not implemented in, PeriPeri):
- word reordering (link <nowiki>LanguagePerl? to PerlLanguage?</nowiki>)
- node reordering (link <nowiki>Tree/Math to Math/Tree</nowiki>) PeriPeri links Tree/Math/Biology to Tree/Biology/Math, but not Tree/Math to Math/Tree
- syntax variations (use Math:Tree for Tree/Math)
- ...
Conflict resolution (if you don't want to stop at the first match):
- multiple linking in case of linking
- multiple joining in case of insertion (transclusion)
- ...
Replace fixed lists in the AutoLinkStrategies by:
- dynamic sets (list of all categories)
- sets from context (categories on current page)
- ...
Applications:
tbc
Analysis of the PeriPeri spike
Using this way of thinking, the PeriPeri uses special ALS combining:
- subpage list (D{category})
- I have to confess, I have no idea what this means, and thus whether it's true. "[The] list is extracted from context"? Do you mean "the link is chosen from the list by context"? -- ChrisPurcell
- When a page Tree contains the categories C.Math and C.Biology, then we can say that we create the list (Math Biology) from the classification context. Next we check from this list whether the subpages Tree/Math or Tree/Biology are available and link to them. I separated these two steps, because there might be many other ways to construct the list and there are at least two ways to use it. -- HelmutLeitner
- I think part of what's confusing me is whether the "subpages" mentioned are subpages of, or linked to by, the "page" mentioned. -- ChrisPurcell
- The hierarchical file system paradigma provides both the syntactical element "page/subpage" (visible to the user) and the implementation element (subpage is actually stored in the directory page) for me. It looks as if you would store the facet as a subpage but use the subpage:page namespace syntax. But maybe I'm wrong. How would you describe your implementation? -- HelmutLeitner
- Yes, that's right, but not my point. When you say "the optional subpage list...the categories of the page" it sounds like "the subpage list" lists subpages of "the page", and/or is solely derived from "the categories" of that page. I would suggest:
- the optional subpage list is filtered by the "classification context", or categories, of the linking page
- I may be missing something, though. -- ChrisPurcell
- I think there's no difference (intersection commutative) between
- generating an optional link list from categories_list filtered by a subpage_list (my preference)... or
- generating an optional link list from subpage_list filtered by a categories_list
- I prefer the first because the categories_list is cheaper (and the list is typically smaller) than accessing the directory for existing files. -- HelmutLeitner
- But there is a difference: the link list may have categories in it not found in the classification context, but it will never be more than a subset of the subpage list.
- I don't understand. Would you give an example? -- HelmutLeitner
- Suppose page A, in category C, links to page B, which has subpage C+D:B. Page A may well link to this subpage, even though its categories list is only C.
- If you mean (in subpage syntax):
- A (category C) (contain B, links automatically to B/C+D)
- B (no category)
- B/C+D (no category) showing as C+D:B (facet syntax)
- then I agree, for I havn't yet worked though the complexities that come from the "C+D" idea. One workaround would be to explicitely have B/C and B/D but let B/D contain just a redirect to B/C. BTW where to you link to when you have subpages B/C+D, B/D+C and let's say B/E+C+D ?- HelmutLeitner
- Work-around to what? As to your question: a) B/C+D and B/D+C are the same, and would be picked, being smaller; b) if you meant "B/C+D, B/C+E and B/E+C+D" then none would be picked since there is no way to show a preference between the first two
- top level wiki page (T)
- sister site (S)
If this is true one could invent a syntax and specify this as:
A first example of working AutoLinkStrategies can be seen on the page (4 standard wiki page names link according to 4 different options).