Last modified: 2014-11-17 10:36:13 UTC
This is similar in concept to the magic ISBN numbers we already have, but I think a different implementation would be superior. LCCNs have two forms. Regular form that you would find in books (89-456), and normalized form, used for machine-readable stuff (89000456). See http://www.loc.gov/marc/lccn-namespace.html for the normalization rules. We have a template {{LCCN}} to handle them now, but, since we have no string manipulation capabilities on the user side, it's ugly and hard to use. The magic ISBN feature is nice, but instead of "LCCN 71-143545" being rendered directly as a link, I'd rather just have a flexible parserfunction like urlencode to convert regular form into normalized form. Like "{{lccn:n78-89035}}" would output "n78089035". Then the numbers can be used in different ways in different places. The standard template's link target and display formatting could remain controllable by users, while the normalized number could be used by itself in machine-readable COinS tags in citation templates, for instance.
{{Template:LCCN}} still seems to fit the bill, and a parserfunction for LCCN in MediaWiki core sounds a bit of an overkill. I wonder whether this is a wontfix.
(In reply to Quim Gil from comment #1) > I wonder whether this is a wontfix. I agree. The Lua string manipulation capabilities now available provide the functionality requested by this bug.