On 8/7/06, Stephen Bain stephen.bain@gmail.com wrote:
You're piping the link with "ISBN <number>", which the parser is picking up as a magic word and rewriting. I've edited the page to break that action - it now works as you intended.
Yeah, intriguing. I've restored the original code below for comparison. What's really bizarre is the treatment of [[test|ISBN 52859844893549]]...
In summary, it looks like: * Plain text like "ISBN 123" gets mapped to http://en.wikipedia.org/wiki/Special:Booksources/isbn123 * Plain text with slashes or hyphens or whatever are mapped to different URLs (slashes, fwiw, are mapped to underscores), which all behave identically - extraneous characters are treated as though they're not there http://en.wikipedia.org/wiki/Special:Booksources/isbn1_2-3 * You can access this page via [[Special:Booksources/isbn123]] * When a link to an ISBN page like that is piped via an "ISBN" text, the actual link is ignored, and the piped label is used instead: [[Special:Booksources/isbn123|ISBN 456]] actually links to the ISBN page for 456, and the link reads "ISBN 456".
So far so good? Well, it's odd, but explainable by the "ISBN ..." text being parsed and treated later in the cycle. Now, here's the killer: *[[Test|ISBN 456]] links to Test!
(see the example at http://en.wikipedia.org/wiki/User:Stevage/sandbox )
That's the one I can't understand - putting "ISBN xxx" in the piped part of a link only overrides the actual link if it it's to an ISBN page. This is most unexpected. I suppose it has some strange "prevent misleading ISBN links" benefit, but it's just...odd.
To be honest, the fact that the piped label gets "interpreted" for magic words at all just looks like a bug, or an oversight, or a misfeature or whatever. From some more testing it looks like some "magic word" behaviour gets interpereted in piped links and some doesn't - http:// links *don't* override the actual link for instance.
Note that directly linking to [[Special:Booksources]] is more flexible than the magic word behaviour; it allows you to use slashes, for example.
Yes, though my insistance on slashes was a bit misguided, they're apparently not used.
{{ ISBN | <number> }} which maps to [[ Special:Booksources / <number> ]] is useful, it provides a way to abstract the link to the booksources page.
However {{ ISBN | <number> }} which maps to "ISBN <number>" is not useful; the magic word syntax is already an abstraction layer, there is no need to lay another one over the top, if it does not perform any additional function of its own. Do you see my point?
I'm not convinced that a wrapper function has to perform any additional functionality to be useful. Simply homogenising an interface for the end user can be beneficial. In this case, placing a "good" abstraction layer on top of a "bad" abstraction layer (to whatever extent "ISBN xxx" is really "bad"...) achieves that, at least. But I don't feel very strongly about it.
You should ask the developers why this was implemented as a magic word in the first place, I'm not really sure of their reasons.
Most likely it was a very quick and easy way to make a large number of existing ISBN numbers suddenly come to life.
Steve