【この記事の所要時間 : 約 7 分


URIはURLとURNを含む言葉であり、リソースの場所や名前を示すものだと分かりました。また、URLはURIのうちの主にリソースの場所を示す部分集合であるということも分かり、URIとURLの違いを理解できました。よって、リソースを識別するための言葉として用いるならば、より上位に位置する URIを用いたほうが適切ではないかと思います。

Uniform Resource Identifier – Wikipedia

URI には、以下の2つのサブセットがある。
Uniform Resource Locator (URL)
Uniform Resource Name (URN)
リソースの「名前」を識別する。もしネットワーク上にリソースが無くなっても、一意で永続的な識別を行えるようにする。例えば urn:ietf:rfc:2648 という URN は、RFC 2648 への参照を示す。
ただし、W3C が2001年9月に発表した『URIs, URLs, and URNs: Clarifications and Recommendations 1.0』では上記を古典的な見解とし、現在の見解は URL や URN といった区別をせず、これらの語は非公式な概念だとしている。

URIs, URLs, and URNs: Clarifications and Recommendations 1.0 ( RFC 3305 )

1.1 Classical View
During the early years of discussion of web identifiers (early to mid 90s), people assumed that an identifer type would be cast into one of two (or possibly more) classes. An identifier might specify the location of a resource (a URL) or its name (a URN) independent of location. Thus a URI was either a URL or a URN. There was discussion about generalizing this by addition of a discrete number of additional classes; for example, a URI might point to metadata rather than the resource itself, in which case the URI would be a URC (citation). URI space was thus viewed as partitioned into subspaces: URL and URN, and additional subspaces, to be defined. The only such additional space ever proposed was URC and there never was any buy-in; so without loss of generality it’s reasonable to say that URI space was thought to be partitioned into two classes: URL and URN. Thus for example, “http:” was a URL scheme, and “isbn:” would (someday) be a URN scheme. Any new scheme would be cast into one or the other of these two classes.
1.2 Contemporary View
Over time, the importance of this additional level of hierarchy seemed to lessen; the view became that an individual scheme does not need to be cast into one of a discrete set of URI types such as “URL”, “URN”, “URC”, etc. Web-identifer schemes are in general URI schemes; a given URI scheme may define subspaces. Thus “http:” is a URI scheme. “urn:” is also a URI scheme; it defines subspaces, called “namespaces”. For example, the set of URNs of the form “urn:isbn:n-nn-nnnnnn-n” is a URN namespace. (“isbn” is an URN namespace identifier. It is not a “URN scheme” nor a “URI scheme”).
Further according to the contemporary view, the term “URL” does not refer to a formal partition of URI space; rather, URL is a useful but informal concept: a URL is a type of URI that identifies a resource via a representation of its primary access mechanism (e.g., its network “location”), rather than by some other attributes it may have. Thus as we noted, “http:” is a URI scheme. An http URI is a URL. The phrase “URL scheme” is now used infrequently, usually to refer to some subclass of URI schemes which exclude URNs.

  • このエントリーをはてなブックマークに追加


メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください