zoukankan      html  css  js  c++  java
  • URI(URN、URL) and IRI

    A Uniform Resource Name (URN) is a Uniform Resource Identifier (URI) that uses the urn scheme, and does not imply availability of the identified resource. Both URNs (names) and URLs (locators) are URIs, and a particular URI may be a name and a locator at the same time.

    A Uniform Resource Locator (URL) is a subset of the Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it. In popular usage and in many technical documents and verbal discussions it is often incorrectly used as a synonym for URI.

    注:URN表达了持久性需求;URL表达了可用性(当然也包括可用位置)。URI就是既可以代表持久性,又可以表示可用位置,他包含了URN和URL两部分。

    A URN is similar to a person's name, while a URL is like a street address. The URN defines something's identity, while the URL provides a location. Essentially, "what" vs. "where".

    URN的格式

    "urn:" <NID> ":" <NSS>

    where <NID> is the Namespace Identifier, and <NSS> is the Namespace Specific String. Phrases enclosed in quotes are REQUIRED. The leading "urn:" sequence is case-insensitive. The Namespace ID determines the syntactic interpretation of the Namespace Specific String.

     

    URI的格式

    <scheme name> : <hierarchical part> [ ? <query> ] [ # <fragment> ]

    URI的一个例子

      foo://username:password@example.com:8042/over/there/index.dtb;type=animal?name=ferret#nose
      \ /   \________________/\_________/ \__/            \___/ \_/ \_________/ \_________/ \__/
       |           |               |       |                |    |       |           |       |
       |       userinfo         hostname  port              |    |       parameter query  fragment
       |    \_______________________________/ \_____________|____|____________/
    scheme                  |                               | |  |
       |                authority                           |path|
       |                                                    |    |
       |            path                       interpretable as filename
       |   ___________|____________                              |
      / \ /                        \                             |
      urn:example:animal:ferret:nose               interpretable as extension
    

     

    URI Scheme

    http://en.wikipedia.org/wiki/URI_scheme#Generic_syntax

    the Internationalized Resource Identifier (IRI) is a generalization of the Uniform Resource Identifier (URI), which is in turn a generalization of the Uniform Resource Locator (URL). While URIs are limited to a subset of the ASCII character set, IRIs may contain characters from the Universal Character Set (Unicode/ISO 10646), including Chinese or Japanese kanji, Korean, Cyrillic characters, and so forth.

  • 相关阅读:
    如何找出数组中重复次数最多的数
    如何计算两个有序整型数组的交集
    如何分别使用递归与非递归实现二分查找算法
    如何用递归算法判断一个数组是否是递增
    如何用一个for循环打印出一个二维数组
    如何用递归实现数组求和
    ElasticSearch安装和head插件安装
    SpringBoot全局异常处理方式
    Redis高级命令操作大全--推荐
    Mysql中FIND_IN_SET和REPLACE函数简介
  • 原文地址:https://www.cnblogs.com/whyandinside/p/1652738.html
Copyright © 2011-2022 走看看