URN should be perfect for this; I would expect to do the i18n by replacing a Norwegian account number "12345678902" with "urn:bban:NO:12345678902", or a Danish company number "987322431" with "urn:business:DK:CRV:987322431".
However, the list of URN namespaces is very lacking. I'd expect to at least see "urn:msisdn: What I see looking around is a lot of home made solutions that make inferences about ID spaces based on "country" that usually holds but not always; or solutions coming from the XML world that seem very complicated to figure out (like ISO 6523 which declares '0037' for the Finnish company registry, and the syntax around it is XML or home-grown). URN would have been such a simple and nice solution. Why has it not catched on?
Conversely, there are non-URN URI schemes that still represent only names (like doi), and there are URL schemes that, despite the "L", are also used for non-locator names (the http scheme in particular, e.g. in RDF and for XML namespaces). So it's all a wash.
In either case (URN or non-URN), you would have to register the URN namespace or the URI scheme, if you want to use it publicly. Often http is used instead, where the domain name serves the role of the namespace, because usually a suitable domain name is already registered. Of course, this latter practice has the drawback that one has to infer from context that it is a name and not an HTTP web resource.
Unfortunately, dots are not allowed in NIDs. Otherwise it would have been possible to introduce the free use of "urn:
* A UK company: `urn:oid:1.2.826.0.1.`
* IBAN account: `urn:oid:1.0.13616:` (note that there's also a URI scheme for this)
* A publication: `urn:isbn:`
Chances are that a URN exists, or, if not, you can get a PEN from IANA and then use the `urn:oid` scheme.However, the reason URNs don't have much traction is that, because they require interpretation to be meaningful, using 'correct' URNs is of little or no benefit. Besides purism, does your app _really_ benefit from using something like `urn:isbn:123` instead of `isbn:123`, `isbn-123` or simply `123`? In all cases you need additional logic to interpret the data. An advantage may be when interacting with other systems, but most likely you'll need to transform your data anyhow.
Adding to the issue above, another issue is that there might be several 'correct' URNs for the same external entity. For example, `urn:iso:std:iso:3166:USA`, `urn:oid:2.16.840` and `urn:oid:1.2.840` all refer to the same country (as well as `urn:uuid:7f5f8e3e-6f89-4903-a9c1-0fdb030ddb13`, that I just made up).
An overall comment about a lot of the replies: A lot seem to say "you do not want to use URN because X" in much the same way I think that one might criticise JSON when JSON was launched:
What is the point of using JSON? Don't you realize that both systems still need to agree on a custom protocol?
Yet JSON is wildly successful.
I could have worded my initial request better (and the comments make me realize that, and brings my thinking forward, so thanks for that!)
What I am really after is: I want to have is a standard way to refer to "an ID taken from an existing public registry", in such a way that readers realize
A) they are looking at an ID in a registry
B) they see which registry
C) in a way that is mostly self-documentary (unlike OID!)
That is only solving a single one from a ton of issues; much like two systems cannot communicate just because they both speak JSON.
which are fine for cases where you want to publish the data on the web but not for the much more common case of "our own private data".It is straightforward in principle to use URNs, but it is not easy to find examples or discussion of best practices with URNs. For one thing you can always write
so you can generate as many unique ids as you need.
For the same reason that lots of general-purpose classification schemes are not popular: they are brittle and unstable. They smear information out into awkward and hard-to-reuse hierarchies. I refer you to https://www.gwern.net/docs/technology/2005-04-shirky-ontolog...
For widely standardized things URNs make complete sense e.g. ISBN for books.
Is there not a version of URN that allows you to use a registered domain name or IP address as a scope or scheme?
Something in the spirit of:
urn://mycompany.com/Whatever/I/Want
urn:mycompany.com://192.168.0.1/Whatever/I/Want
Semantically, a "uniform" private resource identifier that's "uniformly" parsable while avoiding the unpleasantness of IANA registrations.I've scraped with IANA protocol registrations before. It wasn't fun at all. I can't imagine doing it for schema or urn schema registration.
Granted, anything can be made to look like a mess, but it seems that JSON is much more enjoyable than XML, and such preferences tend to make a whole lot more impact on what is going to be used than technical/academic prowess. Applies to most things, and factors in to what kind/type of person you get when you talk to developers at a startup, a bank, general commerce, a FAANG or a technology provider. Not everyone seems to enjoy the kinds of people that "exclusively write complex systems software" or "exclusively write business software for the money" just like not everyone likes "exclusively writes software because they enjoy it", and that's fine. But it directly impact adoption of stuff.
URNs, URIs, and UTIs (and UBL) are all fine examples of technology designed to solve a thing, but also fine examples of not getting the adoption you'd thing it gets when it is "technically correct".
The a good example of this is the Google Places API[0] - if you just want to fetch the region of a place in a country, what you might actually be looking for could be one of several different things. Google abstracts this to a "region" that can be 4 different things: sublocality, locality, and administrative_area_level_1 (or 2).
So now on top of your URN you might either be missing extra specifity (e.g. this is a locality and not a province) or you need to find a way to add that somewhere.
A colloquial-vs-technical example as well is tel vs msisdn.
[0]: https://developers.google.com/maps/documentation/places/web-...
i18n: short for internationalization
URN: Uniform Resource Name, a specific type of URI
Explain it as an "ID", leave out any mentioning of RDF or semantic web and the deal is made.
What utility does URN have in your application? Why do you need your URNs to be globally recognizable?
1. Usability: a developer must register a URN with IANA which is a huge hurdle compared with minting a URI which only requires control over an email address or domain name. <http://enwp.org/Tag_URI_scheme>
2. Cumulative advantage: everyone knows how to dereference an IRI/URI/URL with the HTTP scheme because the software capable of doing so is deployed million-fold, and dereferencing may also lead to a representation describing the resource which is readable by humans and machines. One can't really do the same with URNs, or at the very least it's much less convenient.
3. Flexibility: if you mint a PURL <http://enwp.org/PURL> with an extremely long lived redirecting service (e.g. <http://w3id.org> or <http://purl.org>), you are able to point the identifier to different resources, this indirection leaves you with options over the time of its existence. URNs have no redirects, they need to be perfect from the start, which is not a reasonable assumption when humans are involved.
Also, the same rationale that led to the closure of the registry foe the somewhat similar info: scheme registry [1] likely contribute to limited registration for URN NIDs.
[0] tel: (RFC 3966) https://www.ietf.org/rfc/rfc3966.txt
It's probably the most popular data type out there, both in data and in codebases. URNs don't bring a lot more than strings on the table, so people go to the easy route.
* LEIs for companies
* IBANs for bank accounts
* ISINs for securities (independent of country)
* SEDOL for securities (country dependent)
Because ontology is fucking garbage.
All ontology fails, it always has.
Why are we still discussing this?
> Why are URNs not more popular?
Wiki - "URNs are globally unique persistent identifiers assigned within defined namespaces so they will be available for a long period of time, even after the resource which they identify ceases to exist or becomes unavailable"
Why do I care about this for data? Why would I constrain myself? It's bureaucratic nonsense for people to have meetings on. I'm not a library putting angels on a pinhead, real world data is messy.