views:

825

answers:

5

It's been explained to me numerous times that all URLs are URIs but not all URIs are URLs. Can anyone give an example of something that is a URI but is not a URL?

+3  A: 

A Uniform Resource Name (URN) is a URI that identifies a resource by name in a particular namespace. A URN can be used to talk about a resource without implying its location or how to access it. For example, the URN urn:isbn:0-395-36341-1 is a URI

From: Wikipedia: http://en.wikipedia.org/wiki/Uniform_Resource_Identifier

bendewey
those are also URLshttp://en.wikipedia.org/wiki/File_URI_scheme
zak23
A: 

A common case would be a URN, such as urn:namespace-id:resource-id.

Jeffrey Hantin
+5  A: 

urn:isbn:0451450523

http://en.wikipedia.org/wiki/Uniform_Resource_Name

zak23
A: 

Example stolen from here (where there is also a description of the differences):

URL     http://www.pierobon.org/iis/review1.htm
URN     www.pierobon.org/iis/review1.htm#one
URI     http://www.pierobon.org/iis/review1.htm.html#one
TofuBeer
A: 

XML Schemas are often identified with a URI and while they may be formatted similarly there is no guarantee that there is anything there because it is not a URL.

The ability to identify the correct XML schema is necessary if you must validate an XML file. A means of identification must be shared between the content and the schema authors before successful validation can mean anything useful. URIs fill this need as good as anything else. Keep in mind that the schema is not necessarily needed in order to make use of the XML file. Therefore it does not need to be universal locatable or available, it simply needs to be identifiable. The semantics of a URI avoid the implication that the resource must be located "here", as would be the case with a URL, and with good reason. Such a detail is irrelevant to the task of identification.

Schema publishers will often base the URI off of a URL which they own. I can imagine there are many reason for doing this, but for one, it helps avoid naming conflicts without an intermediary. When using such a convention it is hard to resist hosting the definition at the location the URI would point to if it where a URL. While by know means necessary, I believe doing so marks an appreciated effort, and is an example of good information architecture, but this fact remains unrelated to needs filled by a URI.

Blake Taylor