[dokuwiki] Re: Purple Numbers
- From: Anika Henke <anika@xxxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Tue, 12 May 2009 23:02:27 +0100
Christopher Smith wrote:
On 10 May 2009, at 15:30, Anika Henke wrote:
Purple Numbers are (in this case) granular hierarchical IDs applied to
each <p>, <li>, <pre> and <table>. As all <hx> already have their
I would have thought the variable nature of wiki pages would make a
paragraph number linking system problematic. Someone edits a page and
the link accuracy could well be destroyed - unless the link is also to a
particular revision.
Yes, indeed. Purple Numbers make more sense for static texts that have a
"published" state (like books or articles). Therefore it's probably not
reasonable to use them in a typical wiki environment, but more in
CMS-like environment or a blog.
There are two different concepts for Purple Numbers: HIDs and NIDs.
* NIDs (= Node IDs) are *permanent* IDs that will never change. That
could even be used with text that constantly changes. (I suppose that
could be easier to implement in a database-driven wiki engine.)
* But the concept used for DokuWiki are HIDs (= Hierarchical IDs). The
accuracy of the resulting links with these will at least not be
destroyed too often, as adding or removing a paragraph in a lower level
of a a well-structured document would only lead to the re-declaration of
a few IDs and not all of them. (An example: If you removed the sentence
'Vertical tableheaders are possible, too.' from
http://www.dokuwiki.org/syntax#tables, only 8 IDs would be affected -
and not all 137 instances.)
I haven't thought of linking to a particular revision. For old revisions
this already works automatically. But for a link to an anchor of the
current revision, DokuWiki lacks the concept of a permalink to the
current revision ...
* Unfortunately I couldn't figure out how the <pre>s from GeSHi can be
manipulated.
The GeSHi <pre> is stripped and replaced by a DokuWiki wrapper element,
usually <pre> in p_xhtml_cached_geshi (inc/parserutils.php). You could
extend that function to take an "id" as well as a wrapper tag and if
present add the id to the wrapper element.
Thanks for the pointer. I will take a look at it.
Anika
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
Other related posts: