Sergiu Dumitriu wrote:
On 3/31/07, *Zeljko Trogrlic*
<zeljko_t(a)post.htnet.hr
<mailto:zeljko_t@post.htnet.hr>> wrote:
Sergiu Dumitriu wrote:
1. We can add a new table, xwikiredirects, which
holds redirect URLs.
2. We add document.getRedirects() (maybe both ways, from and to)
3. We need can change docdoesnotexist.vm to check for redirects.
That would be great. Or, you can take slightly different approach:
Use two tables:
* "dictionary"
* "document" (this is existing table).
In "dictionary" table, store all possible names for document. It could
be used for
* renaming
* synonyms.
Same document can have multiple names, e.g. "IP" and "Internet
Protocol". Both entries in dictionary point to the same entry in
documents.
You mean that pointing to ..../view/Doc/IP will display the
Doc/Internet_Protocol document, but without redirecting? (this is what
MediaWiki does). Otherwise, I don't see the difference with the approach
above. I did not describe the actual structure of the table, but how it
can be used.
I just described what was on my mind, I'm not sure yet is it practical
from both technical and practical point of view.
I think that MediaWiki has a main name + redirections. "Redirected from"
is shown only if you use redirection and you can actually go to the
redirect page by clicking on link.
This is actually closer to your solution, and I think it better than my
idea to keep all synonyms equal, because it will be confusing for the
user if he writes one thing and gets another. This is why "redirected
from" message is important.
If document is renamed, create new entry and add put its name in the
redirect field of the original entry. Original entry becomes
deprecated,
but it is still working.
"It is still working" means that the page content is preserved as it is
at the moment of renaming?
In this approach, documents are independent of their names. "Original
entry" means "original synonym". Document stays alive as long as it has
at least one synonym attached to it.
The point was, if synonym was renamed, XWiki should somehow discourage
user from using it, but it should still work for old links.
Optionally, update all old links.
Optionally, garbage collect old synonyms.
Not automatically, because IP should always be a synonim for Internet
Protocol (until we make a disambiguation page). But anyway, the
redirects/synonyms table should be editable from the wiki interface.
Note that there are two kinds of synonyms:
* "active" snonyms
* renamed synonyms; these should be updated/garbage collected.
Example: you described IPv4 and you gave it synonyms "IP" and "Internet
Protocol". Later you noticed that you have to add IPv6 and that you have
to rename "IP" to "IPv4". After renaming, you have 3 synonyms:
* IPv4 - active
* IP - inactive, marked as replaced by IP, and pointing to the same doc
* Internet protocol - active.
All three synonyms are pointing to the same document.
Synonym will allow some interesting features, like automatic linking. We
could even provide different linking policy: e.g. if term is used more
than once on the page, mark just first occurrence to avoid too much links.