urluriterminologyurn

How can a URI contain a URN as well as a URL?


Are there any examples of a URI that contains both a URN and URL?

https://www.rfc-editor.org/rfc/rfc3986#section-1.1.3

A URI can be further classified as a locator, a name, or both.

And which would be the URI scheme then? "urn:" or a URL specific scheme?

Or am I reading it wrong and does it mean a URL can be a URN (or vice versa), e.g. the URI can be used as URN as well as URL.


Solution

  • Read the rest of that section of that RFC:

    ###1.1.3. URI, URL, and URN A URI can be further classified as a locator, a name, or both.  The term "Uniform Resource Locator" (URL) refers to the subset of URIs that, in addition to identifying a resource, provide a means of locating the resource by describing its primary access mechanism (e.g., its network "location").  The term "Uniform Resource Name" (URN) has been used historically to refer to both URIs under the "urn" scheme [RFC2141], which are required to remain globally unique and persistent even when the resource ceases to exist or becomes unavailable, and to any other URI with the properties of a name.

    An individual scheme does not have to be classified as being just one of "name" or "locator". Instances of URIs from any given scheme may have the characteristics of names or locators or both, often depending on the persistence and care in the assignment of identifiers by the naming authority, rather than on any quality of the scheme. Future specifications and related documentation should use the general term "URI" rather than the more restrictive terms "URL" and "URN" [RFC3305].

    Which is to say, URIs can be URLs or URNs, or in some cases, qualify as both at the same time. "URL" and "URN" are just terms for how the URI is intended to be interpreted and used in a given context.