This isn't correct. One example is that URIs don't necessarily provide the means of locating a resource. Another example is that the author says there are no URIs which are URNs.
The following example URIs illustrate several URI schemes and
variations in their common syntax components:
ftp://ftp.is.co.za/rfc/rfc1808.txt
http://www.ietf.org/rfc/rfc2396.txt
ldap://[2001:db8::7]/c=GB?objectClass?one
mailto:John.Doe@example.com
news:comp.infosystems.www.servers.unix
tel:+1-816-555-1212
telnet://192.0.2.16:80/
urn:oasis:names:specification:docbook:dtd:xml:4.1.2
I might be reading a different version of the article than you did, but the article agrees with you - URIs are a superset of URNs and URLs. I didn't see where the author says there are no URIs which are URNs - the article specifically says 'a URN is a type of URI with the scheme "urn"'
To add to the mess, the WHATWG now maintains a "URL" spec that covers URIs and declares URIs an outdated term for URLs: https://url.spec.whatwg.org/
So now we have a URL spec from WHATWG that says URI is an old term for URLs, and a URI spec from the IETF that says that URL is just a term for a certain subset of URIs.
That may be true within their bounded context. WhatWG is the web/HTML working group, and a URL is something you can type in the address bar, and this tells the browser how to find it, although the browser's configuration may be used implicitly in the process. URIs the browser can't use to locate something are useless in the context of the web. For example news:comp.lang.c may be considered a URN, but when the browser is configured with a news server, it can also locate it, so for web purposes it's a URL.
I: Identifier, is an identifier. "Oh, that's a [a thing, or a location]."
N: Name, tells what the thing is. "Oh, that's the Sears Tower."
L: Locator, tells how to get to something. "Oh, that's at 233 S. Wacker Drive
Chicago, Illinois 60606"
That was the second example to come into my head (the first was the Bank of America building in San Francisco), and I think it speaks to things that both* examples have changed their names! The Sears Tower is now the "Willia Tower", and the "Bank of America Center" is now "555 California Street".
And even place names don't stay the same! In 2019, Stanford University renamed "Serra Mall" to "Jane Stanford Way": addresses changed; building names did not.
Just goes to show why it's so important to implement redirects, and (in HTTP at least) why the "301 Moved Permanently" response code exists.
> That was the second example to come into my head (the first was the Bank of America building in San Francisco), and I think it speaks to things that both* examples have changed their names! The Sears Tower is now the "Willia Tower", and the "Bank of America Center" is now "555 California Street".
I was under the impression that a URN is an identifier that is not tied to a specific location, in fact it could apply to a resource that exists at many different ones. Is the "Sears Tower" example (or anything that could reasonably be associated with a single location) really the best in this case?
It’s hard to imagine URNs without a DNS based namespace to back up the universality part of it.
urn:catalogue.isbn.org:1234
You could use a URL for information about the book as the URN for the book itself? Or is that “bad” because in 25 years we might not use either https or DNS?
https://isbn.org/catalogue/1234
If the URN is a kind of type prefix for an otherwise meaningless number, are we supposed to use these inline / Hungarian notation types everywhere the number is used?:
This is how XML namespaces work. They're URLs, but they identify resources rather than locating them. Often, conventionally, some information about the identified thing also happens to exist at the URL.
Thank you. Most examples of URNs that I've found use ISBNs to convey their use. I just wish that there was more information out there about use cases. This post's article does make a good reference to one that I found interesting though.
Also somewhat relatedly, XMPP tends to use URNs for the XML namespaces af the various stanzas, which in turn define the various parts of the IM message or what have you.
So how many tools out there use the term "uri" to sound smart but would fall over on their faces of you passed anything but a web URL to their "uri" parameter?
The author does a poor job explaining anything about URI or URN, and says very little about URL beyond naming the components of a hypothetical URL on their website. It is frankly confusing why they published this at all (other than to achieve some SEO goal that concludes with "please try our service").
I was taught never to confuse these three things. Then I started working as a developer, and realized it's a bit like correcting people's grammar. Don't do it.
It pains me greatly that the host name part is in lack of a better name unimportance to significance in domain names, but significance to unimportance in URL paths
That's a very misleading statement. IRIs are for the majority of people in the world whose language isn't written exclusively with the Latin script - more specifically, the ASCII version of the Latin script, which doesn't even include diacritical marks. The IRI https://example.com/menu/pâtés is a lot better than the best equivalent URI: https://example.com/menu/p%C3%A2t%C3%A9s
My only exposure was folks using it to gloss over what could have been expressed in 7 bit clean ascii if you knew the codepage it had been encoded with.
I apologize for the mischaracterization of legitimate use.
This is wrong according to the URI RFC, which the author cites: https://datatracker.ietf.org/doc/html/rfc3986#section-1.1.1
So now we have a URL spec from WHATWG that says URI is an old term for URLs, and a URI spec from the IETF that says that URL is just a term for a certain subset of URIs.
This is the more broadly accepted definition, right?
The obvious counterexample to this is the mailto: URI scheme. It has no location but it is still a useful thing to link to on the web.
The term I would use is "a distinction without a difference", but they're not entirely wrong.
WhatWG wasn't wrong.....
I: Identifier, is an identifier. "Oh, that's a [a thing, or a location]."
N: Name, tells what the thing is. "Oh, that's the Sears Tower."
L: Locator, tells how to get to something. "Oh, that's at 233 S. Wacker Drive Chicago, Illinois 60606"
That was the second example to come into my head (the first was the Bank of America building in San Francisco), and I think it speaks to things that both* examples have changed their names! The Sears Tower is now the "Willia Tower", and the "Bank of America Center" is now "555 California Street".
And even place names don't stay the same! In 2019, Stanford University renamed "Serra Mall" to "Jane Stanford Way": addresses changed; building names did not.
Just goes to show why it's so important to implement redirects, and (in HTTP at least) why the "301 Moved Permanently" response code exists.
I was under the impression that a URN is an identifier that is not tied to a specific location, in fact it could apply to a resource that exists at many different ones. Is the "Sears Tower" example (or anything that could reasonably be associated with a single location) really the best in this case?
I ended up using this for XML namespaces.
Even if the nomenclature was "URL" they still wouldn't necessarily accept all URLs.
https://www.rfc-editor.org/rfc/rfc3986.html#section-1.1.3
https://en.wikipedia.org/wiki/Internationalized_Resource_Ide...
My only exposure was folks using it to gloss over what could have been expressed in 7 bit clean ascii if you knew the codepage it had been encoded with.
I apologize for the mischaracterization of legitimate use.