[pmwiki-users] PmWiki namespaces

Eemeli Aro eemeli at gmail.com
Sat Aug 29 07:25:29 CDT 2009

I'm working on a new way of handling attachments in PmWiki that would
make file meta information (filesize, mime type, copyright, etc.)
accessible and to some extent editable from within PmWiki (with eg.
{Attach:Site./pmwiki-powered.png$MimeType}). Essentially I'm taking a
new approach at what Attachtable[1] does and re-implementing it in a
more generic manner.

At this point, I haven't decided exactly how to do this, but a vague
structure is forming based on adding a custom PageStore for
attachments, not entirely unlike Sisterly[2]. I do, however, have one
question that'll need to be answered before I can publish anything:

How should namespaces in PmWiki be handled?

To clarify, namespaces as such don't exist at the moment, except in
the context of Sisterly, which lets you refer to pages on other wikis
on the same server. However, once I get this attachment metadata
system working, "Attach:" starts to look much more like a namespace,
and I'm guessing that the code overlap between this and Sisterly will
get to the point where it makes more sense to publish a separate,
third recipe that both of those depend on and which enables namespaces
in general.

Note also that I'm not asking whether namespaces *should* exist; their
non-existance is a problem for me that I intend to solve. What I am
asking for is input for *how* to go about this, and how (if at all!)
the existance of namespaces should affect basic PmWiki functionality.

More specifically, here are two questions to start with:

How should namespaces be identified? With Sisterly I use a prefix
"WikiName:" that matches Attach: and Intermap links, as well as how at
least MediaWiki handles namespaces, but is there a better way?

Should reading and writing pages from specific PageStores in
$WikiLibDirs be supported? In other words, should something like
"WikiLib:Site.EditForm" give you the default edit form that's in the
wikilib.d directory?


[1] http://www.pmwiki.org/wiki/Cookbook/Attachtable
[2] http://www.pmwiki.org/wiki/Cookbook/Sisterly

More information about the pmwiki-users mailing list