Resource - Uniform resource identifier (URI)

> (World Wide) Web - (W3|WWW) > Web - Resource

1 - About

A Uniform Resource Identifier (URI) is a compact string of characters for identifying an abstract or physical resource.

A URI is an identifier consisting of a sequence of characters matching the syntax rule named <URI>

Advertising

3 - Specifications

4 - Type (URI, URL and URN)

URIs can be of the type:

  • names
  • locators
  • or both.
Type Description Goal Example
Names Uniform resource name (URN) To defines an item's identity A person's name
Locators Uniform resource locator (URL) To provide a method for finding an item person's street address

5 - Example

5.1 - URL

See Web - URL

5.2 - ISBN

The ISBN system for uniquely identifying books provides a typical example of the use of URNs. ISBN 0486275574 (urn:isbn:0-486-27557-4) cites, unambiguously, a specific edition of Shakespeare's play Romeo and Juliet.

To get this book, a location is needed: a URL address. A typical URL for this book on a Unix-like operating system would be a file path such as file:///home/username/RomeoAndJuliet.pdf, identifying the electronic book saved in a file on a local hard disk.

Advertising

5.3 - List

6 - Classification

6.1 - Opaque

An opaque URI is an absolute URI whose scheme-specific part does not begin with a slash character ('/').

Opaque URIs are not subject to further parsing. Some examples of opaque URIs are:

Advertising

6.2 - Hierarchical

A hierarchical URI is subject to further parsing according to the syntax

[scheme:][//authority][path][?query][#fragment] 

where the characters ,, /,?, and # stand for themselves.

7 - Token

Components of a parsed URL, which is the result of processing a URL through the URL parser

7.1 - Scheme

Each URI begins with a scheme name that refers to a specification for assigning identifiers within that scheme.

As such, the URI syntax is an extensible naming system wherein each scheme's specification defines the syntax and semantics of identifiers using that scheme.

Once the scheme is determined, further scheme-specific parsing can be performed on the components.

Example:

7.2 - Authority

The (URI|Document) - Authority component of a hierarchical URI is, if specified, either:

  • server-based
  • or registry-based.

A server-based authority parses according to the familiar syntax

[[email protected]]host[:port] 

where the characters @ and : stand for themselves.

Nearly all URI schemes currently in use are server-based. An authority component that does not parse in this way is considered to be registry-based.

7.3 - Path

The path component of a hierarchical URI is itself said to be absolute if it begins with a slash character ('/'); otherwise it is relative.

The path of a hierarchical URI that is either absolute or specifies an authority is always absolute.

7.4 - Query

A query string is the part of a URI containing data that does not fit conveniently into the hierarchical path structure.

See URL - Query

7.5 - Fragment

8 - Interpretation and Access

Interpretation is independent of access. “http://localhost/” has the same interpretation for every user of that reference, even though the network interface corresponding to “localhost” may be different for each end-user:

However, an action made on the basis of that reference will take place in relation to the end-user's context.

9 - Global vs user context

An action intended to refer to a globally unique thing must use a URI that distinguishes that resource from all other things. URIs that identify in relation to the end-user's local context should only be used when the context itself is a defining aspect of the resource, such as when an on-line help manual refers to a file on the end-user's file system (e.g., "file:///etc/hosts").

10 - Type

10.1 - Absolute

A URI is absolute if, and only if, it has a scheme component.

Absolute URI = URI without fragment identifier

An absolute hierarchical URI reference follows the pattern: ://?#

absolute-URI  = scheme ":" hier-part [ "?" query ]

More see Absolute URI

10.2 - Relative

A URI that is not absolute is said to be relative

Relative URI references (which are always hierarchical) follow one of two patterns: ?# or //?#

10.3 - Opaque

An opaque URI follows this pattern: :#

11 - Management

11.1 - Encoding

11.2 - Compare

12 - Documentation / Reference

web/resource/uri.txt · Last modified: 2019/04/27 23:40 by gerardnico