I'm currently working on integrating the Mediawiki parser into Drupal. The basics work: formatting, links, templates, images.
Two major things are still missing: category links and namespaces. Cagegory associations can easily be mapped into taxonomy module. The question remains for namespaces.
In my implementation, namespaces are mostly mapped onto node types. The main namespace (or no namespace) is mapped to a node type 'wiki', the template namespace is mapped to a node type 'template' and the image namespace is mapped to the image module. The user namespace can be mapped to the user profile page and Talk namespaces are ignored since Drupal handles this via comments.
But Mediawiki defines a couple of other namespaces: "Help", "Project", "Mediawiki" and actually any number of user defined namespaces. This brought me to the realisation that a simple mapping onto node types is not good enough. There are various ideas to have a different kind of mappings which could also be dependent on the namespace:
- A namespace is a whole node type (e.g. 'image', maybe 'template')
- A namespace is a term of a category (e.g. a category with 'Main', 'Help', 'Project' and any number of user defined terms)
- A namespace is a group (organic groups)
- Maybe something else
This would be a quite flexible approach as you can define your namespaces and the granularity of the namespaces.
But I realised that when I use Mediawiki, I never use anything except the "Main" namespace. I never used "Help" or "Project" or defined my own namespace. So the question is:
Would you use namespaces? And what for?
I would say that categorisation is enough (that's why I never used a custom namespace with Mediawiki), but maybe someone has a good use case for namespaces. The use on mediawiki.org (http://www.mediawiki.org/wiki/Project:Namespaces) could probably be replaced by a simple categorisation as well, I don't think there are many pages with the same name in these namepsaces.

Comments
How about two separate
How about two separate taxonomy categories (keyword and namespace) in conjunction with pathauto?
The keyword taxonomy could be used to categorise posts. The namespace taxonomy would be used in conjunction with Pathauto to create the appearance (illusion?) of namespaces.
With that said, I agree with your assessment: categorization is enough.
Cheers,
Bill
FunnyMonkey
Tools for Teachers
FunnyMonkey
The importance of Namespaces
First I want to say that this is very good news. I'm very much looking forward to test this module.
(Anything available for testing yet?)
Regarding the namespaces, technically I second Bill's suggestion for how to use the taxonomies, that seems like a sensible way of doing it, but I want to call attention to the importance of namespaces. For example, we use namespaces both as a way of separating content into separate title spaces, as well as search spaces. These two applications both have their points.
Multiple title spaces: This enables us to automatically mass-generate presentation articles filled with template calls to data with the same identifier (Title), but from different sources (e.g. multiple languages/different bible translations/different dictionaries et.c. et.c... you name it.)
Multiple search spaces: In MediaWiki the only way to separate content into "search spaces" is to separate it into Namespaces,
Example
Both these uses are implemented at RIL Bible (http://en.rilbible.org/wiki/).
If you look at a chapter, like http://en.rilbible.org/wiki/Gen_1, what you see is a composition of content from multiple articles, and namespaces. Each verse is stored in it's own article, and depending on bible translation, also belongs to it's corresponding namespace. See for example http://en.rilbible.org/wiki/KJV:Genesis_1:1 and http://en.rilbible.org/wiki/1917:Genesis_1:1, which are two translations/languages of the same verse, and can easily be parsed together in "run-time" in one article, using auto-created templates with transclusion calls that goes like:
<table><tr><td>{{:KJV:{{PAGETITLE}}}}</td><td>{{:1917:{{PAGETITLE}}}}</td>
</tr></table>
At the searchpage (http://en.rilbible.org/wiki/Special:Search?search=&fulltext=Search) you can see how you're able to select which translations to search (KJV, 1917, PR33-38):
So, with all this said, I would think namespaces are quite indispensable.
Best Regards,
Samuel
Ril Partner AB - MediaWiki and Drupal services
Samuel Lampa
RIL Partner AB
AFAIK mediawiki namespaces
AFAIK mediawiki namespaces are basically a way to partition content into totally separate sections, most important aspect would be how the same WikiName/WikiLink/WikiTerm on different namespaces points at different pages.
I'd say it makes more sense to implement namespaces as content types in drupal, since they reflect totally different content partitions they might have different fields or workflow.
Taxonomy has advantages...
alaa wrote:
... most important aspect would be how the same WikiName/WikiLink/WikiTerm on different namespaces points at different pages.
I might have misunderstood you now, but a certain wiki link will always point to the (globally) same page, independent of in which namespace it is written. In order to point to a page in a specific namespace you will have to include the namespace in the link (like
namespace:title-of-article(between double squares)).alaa wrote:
I'd say it makes more sense to implement namespaces as content types in drupal, since they reflect totally different content partitions they might have different fields or workflow.
Namespaces are actually not exclusively used for technically differing content (see for example my example above), so "content types" doesn't actually 100% match "namespaces".
Furthermore, taxonomy gives much more flexibility and power for combining other ways of using Drupal (for example using multiple content types within one namespace et.c.), so summing up the pros and cons of both options, to me, taxonomy seems to be the most reasonable choice.
Best Regards,
// Samuel
RIL Partner AB - MediaWiki and Drupal Services
Samuel Lampa
RIL Partner AB
To have multiple search
To have multiple search spaces in Drupal you can use taxonomy. So this leaves us with title spaces.
Using taxonomy to separate namespaces instead of node types gives the additional flexibility to have different kinds of nodes in the same namespace. I would go with both solutions, so a namespace can either be a whole node type or a taxonomy term. The reason is mostly the 'image' namespace of Mediawiki. I don't want to tag every image with 'image' just to add it to the namespace. But for all the other namespaces it makes more sense to use a taxonomy to separate them (Except if you only have one additional namespace, then again the node type separation is good enough).
About the module: I plan to upload it to drupal.org in the next couple of days, probably this weekend.
I agree
rötzi wrote:
I would go with both solutions, so a namespace can either be a whole node type or a taxonomy term. The reason is mostly the 'image' namespace of Mediawiki. I don't want to tag every image with 'image' just to add it to the namespace. But for all the other namespaces it makes more sense to use a taxonomy to separate them
Yes, I agree. Thanks for the clarification. That is how I was thinking too, but I didn't put it very clearly.
Samuel Lampa
RIL Partner AB
Module translation
Thanks for putting in the effort to create this much needed module.
Never having done something like this before, I was wondering, how easy would it be for me to translate this module (into Hebrew), and would having the node names in a non-English character set be an issue?
Test version?
Is there a test version available?
Or else, where will the module be published when it is ready?
Samuel Lampa
RIL Partner AB