16
votes

I somewhat understand that URNs are used to provide unique and location independent name for the resource. Yet I fail to see their usefulness and how exactly they work:

a) In order for URN to really be unique, there would have to be some central authority (similar to authority for domain names) where we could register URNs and that way ensure they are unique. Since there isn’t any such authority, how else do we make sure that our URNs are unique? And if we can’t. then what’s the point of having them?

b) Also,I don’t understand the reasoning behind URNs having the format urn:NID:NSS. What makes this format more efficient/logical than for example urn:NID:NID1:NSS?

c) And finally, how can URN help us locate a resource on the internet?


EDIT:

I'm not sure what you mean. NID is the Namespace Identifier and NSS is the Namespace Specific String Are you proposing a system of sub-namespaces?

I’m just trying to make sense of why the format URN uses is “superb” to other formats, such as urn:NID:NID1:NSS

3
please don't use HTML to format your SO questionsanon
Are you concerned with URNs in a particular context? You tagged your question with xml and xhtml, but I fail to see why.Greg
If you're trying to understand why a URN is better/more popular than some other scheme, you should specify some examples of alternatives to URN.Avdi
I can't name you alternatives to URN since I don't know any. Anyways, I hope my post didn't come off as argumentative. I'm just trying to make some sense out of itSourceC

3 Answers

27
votes

a) In order for URN to really be unique, there would have to be some central authority... Since there isn’t any such authority, how else do we make sure that our URNs are unique?

There is a central authority, called IANA, to register namespaces (the NID part), and each namespace is responsible for ensuring uniqueness.

b) Also, I don’t understand the reasoning behind URNs having the format urn:NID:NSS. What makes this format more efficient/logical than for example urn:NID:NID1:NSS?

The "urn:NID:NSS" description states the interpretation of NSS depends on the value of NID. For example, if NID is "isbn", then we know to interpret the NSS as an ISBN number, as in "urn:isbn:0451450523".

The NSS part can contain colons, so "urn:example:other:more" is valid syntax. (And in-fact is a valid URN as of 2013-04-24.) For example, given "urn:mpeg:mpeg7:schema:2001", the NSS part is "mpeg7:schema:2001" and we interpret that according to the rules for the "mpeg" namespace.

Had "urn:NID:NID1:NSS" been required, it would have been redundant (some namespaces don't need a nested NID1) and superfluous (the authority for a namespace can already divide the NSS part up, as in the above mpeg example).

c) And finally, how can URN help us locate a resource on the internet?

URNs are not about location, that's a URL.

2
votes

a) In order for URN to really be unique, there would have to be some central authority (similar to authority for domain names) where we could register URNs and that way ensure they are unique. Since there isn’t any such authority, how else do we make sure that our URNs are unique? And if we can’t. then what’s the point of having them?

An ISBN is used an a URN, and is managed by an agency.

b) Also,I don’t understand the reasoning behind URNs having the format urn:NID:NSS. What makes this format more efficient/logical than for example urn:NID:NID1:NSS?

I'm not sure what you mean. NID is the Namespace Identifier and NSS is the Namespace Specific String Are you proposing a system of sub-namespaces?

c) And finally, how can URN help us locate a resource on the internet?

A URN (Uniform Resource Name) doesn't help you locate something on the Internet. A URL (Uniform Resource Locator) does.

Also see What is the difference between URI and URL?

1
votes

URNs

a URN ( Uniform Resource Name ), is supposed to be unique across both ( time and space ).

a URL\URI cannot guarantee his uniqueness, unlike a URN that can be a URI in the same time.

Maybe a URI Resource (X) in path (Y) is a valid URL, because the path can be a location, but the same whole Identifier (Z) can be duplicated in many physical, logical or virtual locations in the world.

``

# Unique only in the same actual location

Z = [Y => X];
A = [B => Z];
C = [D => Z];

But if we add A Uniform U (could be a domain name for example) at the beginning it can be more flexible but not unique (domains can get expired).

# Unique only in the same actual location

Z = [ U => Y => X ];

The same format can be extended and extended by other variables trying to make it as Unique as possible.

Because of this last, we have to make sure a more sophisticated and real unique format is here, that can identify more type of Resources across time and space.

``

"URNs" are not a "URLs" ( exception ofUnique persistant URL used as a name ), because they are not locating a resource, in fact they are more then what your think, they can identify [ *ideas, UUIDs, virtual or physical Objects and more* ], but both of them plus "URCs/data URIs" can be "URIs".

Note :

Take a look into a simple and more clear example of URNs here :

https://stackoverflow.com/a/1984274/5405973

And here is a very informative link :

https://stackoverflow.com/a/28865728/5405973