Moin2 Namespaces
Contents
Syntax
Names in markup would look like this (wn is wikiname, ns is namespace, pn is pagename):
PageName (simple, local pagelink, as in 1.9) WikiName:PageName (interwiki, as in 1.9) namespace:PageName (local pagelink to another namespace) WikiName:namespace:PageName (interwiki link with namespace) namespace:namespace2:PageName (local pagelink with hierarchical namespaces) WikiName:namespace:namespace2:PageName (interwiki pagelink with h. ns)
Storage and namespaces
We can map namespaces to backends, so we can store multiple namespaces' revisions into same backend.
wikiconfig:
# map namespaces to backends map = { '': BEdefault, 'ns1': BE1, 'ns1:ns11': BE1, # can be also another BE 'userprofiles': BE2, 'files': BE3, }
we store the namespace info into revision metadata, like the wikiname key.
Interwiki and namespaces
We can extend interwiki map a bit:
WikiName http://wikiserver/ WikiName:ns1 http://wikiserver/ns1/ # or whatever the other wiki wants WikiName:ns1:ns11 http://wikiserver/ns1/ns11/ # or whatever the other wiki wants Note: using this interwikimap (and our own namespace map), we can know what namespaces the remote wiki has, so by doing some lookups into the map, we can decide what's the interwiki:ns1:ns11 part and what is maybe a strange foo:bar finnish word.
Previous discussions
Development
There is a branch namespaces in moin2 repo.
Discussion
these are notes, I have not compared to the current implementation if they are already solved. I just don't want to miss one
results of http://hg.moinmo.in/moin/2.0/file/e1f9d9b5da57/MoinMoin/apps/frontend/views.py should be separated for namespaces
- quicklinks need to be aware of namespaces too
- subscriptions needs to know namespace