[ info ]   [ edit ]

Namespaces

Namespaces allow a name to take on different meanings, depending on the situtation that they are mentioned. For example, if I go to the pub with my mates, the name "Fred" will refer to our collective friend "Fred". However, at a family gathering, "Fred" can refer to a different person (in this case, a family member). So we have one name ("Fred") referring to two different people. In this example, there are two namespaces, the friend namespace, and the family namespace.

If I want to talk with my family about my friend Fred, then I have to qualify his name, by saying "my friend Fred". If I didn't qualify his name, they would assume I was talking about our relative.

In the Pink Wino wiki, namespaces can be used in a similar way. Imagine I have a set of pages about my interest in chess. I create a page called "Events", where I list all upcoming chess tournaments. I'm also interested in backgammon, and I'd like an events page for that too.

I could create a page called "Chess Events" and "Backgammon Events", but this soon becomes tiresome, as I would have to prefix every page name to ensure that the names didn't coincide.

Instead, I create a chess namespace, and a backgammon namepsace. I can then have an Events page in the backgammon namespace, as well as an Events page in the chess namespace. If I reference the Events page from anywhere within the chess namespace, then it will link to the chess events page (and vice versa).

Creating Links within Namespaces

To create a link to a page within the same namespace, you can ignore the namespace, and just add the link as normal. For example :

Look at the [Events].

If I want to link to a page in a different namespace, then I must explicitly include the namespace and the name like this :

Look at the [chess:Events].

The above is analogous to referring to "My friend Fred", when talking with my family.