Tech-invite3GPPspaceIETFspace
959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 8141

Uniform Resource Names (URNs)

Pages: 40
Proposed Standard
Obsoletes:  21413406
Part 1 of 3 – Pages 1 to 15
None   None   Next

Top   ToC   RFC8141 - Page 1
Internet Engineering Task Force (IETF)                    P. Saint-Andre
Request for Comments: 8141                                      Filament
Obsoletes: 2141, 3406                                         J. Klensin
Category: Standards Track                                     April 2017
ISSN: 2070-1721


                     Uniform Resource Names (URNs)

Abstract

A Uniform Resource Name (URN) is a Uniform Resource Identifier (URI) that is assigned under the "urn" URI scheme and a particular URN namespace, with the intent that the URN will be a persistent, location-independent resource identifier. With regard to URN syntax, this document defines the canonical syntax for URNs (in a way that is consistent with URI syntax), specifies methods for determining URN- equivalence, and discusses URI conformance. With regard to URN namespaces, this document specifies a method for defining a URN namespace and associating it with a namespace identifier, and it describes procedures for registering namespace identifiers with the Internet Assigned Numbers Authority (IANA). This document obsoletes both RFCs 2141 and 3406. Status of This Memo This is an Internet Standards Track document. This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841. Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc8141.
Top   ToC   RFC8141 - Page 2
Copyright Notice

   Copyright (c) 2017 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.
Top   ToC   RFC8141 - Page 3

Table of Contents

1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 1.2. Design Trade-offs . . . . . . . . . . . . . . . . . . . . 6 1.2.1. Resolution . . . . . . . . . . . . . . . . . . . . . 8 1.2.2. Character Sets and Encodings . . . . . . . . . . . . 9 2. URN Syntax . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1. Namespace Identifier (NID) . . . . . . . . . . . . . . . 10 2.2. Namespace Specific String (NSS) . . . . . . . . . . . . . 10 2.3. Optional Components . . . . . . . . . . . . . . . . . . . 12 2.3.1. r-component . . . . . . . . . . . . . . . . . . . . . 12 2.3.2. q-component . . . . . . . . . . . . . . . . . . . . . 13 2.3.3. f-component . . . . . . . . . . . . . . . . . . . . . 15 3. URN-Equivalence . . . . . . . . . . . . . . . . . . . . . . . 16 3.1. Procedure . . . . . . . . . . . . . . . . . . . . . . . . 16 3.2. Examples . . . . . . . . . . . . . . . . . . . . . . . . 17 4. URI Conformance . . . . . . . . . . . . . . . . . . . . . . . 18 4.1. Use in URI Protocol Slots . . . . . . . . . . . . . . . . 18 4.2. Parsing . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.3. URNs and Relative References . . . . . . . . . . . . . . 19 4.4. Transport and Display . . . . . . . . . . . . . . . . . . 19 4.5. URI Design and Ownership . . . . . . . . . . . . . . . . 20 5. URN Namespaces . . . . . . . . . . . . . . . . . . . . . . . 20 5.1. Formal URN Namespaces . . . . . . . . . . . . . . . . . . 22 5.2. Informal URN Namespaces . . . . . . . . . . . . . . . . . 23 6. Defining and Registering a URN Namespace . . . . . . . . . . 24 6.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 24 6.2. Registration Policy and Process: Community Registrations 25 6.3. Registration Policy and Process: Fast Track for Standards Development Organizations, Scientific Societies, and Similar Bodies . . . . . . . . . . . . . . . . . . . . . 26 6.4. Completing the Template . . . . . . . . . . . . . . . . . 27 6.4.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . 27 6.4.2. Syntax . . . . . . . . . . . . . . . . . . . . . . . 28 6.4.3. Assignment . . . . . . . . . . . . . . . . . . . . . 29 6.4.4. Security and Privacy . . . . . . . . . . . . . . . . 29 6.4.5. Interoperability . . . . . . . . . . . . . . . . . . 30 6.4.6. Resolution . . . . . . . . . . . . . . . . . . . . . 30 6.4.7. Additional Information . . . . . . . . . . . . . . . 30 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31 7.1. URI Scheme . . . . . . . . . . . . . . . . . . . . . . . 31 7.2. Registration of URN Namespaces . . . . . . . . . . . . . 31 7.3. Discussion List for New and Updated NID Registrations . . 31 8. Security and Privacy Considerations . . . . . . . . . . . . . 32 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 32 9.1. Normative References . . . . . . . . . . . . . . . . . . 32 9.2. Informative References . . . . . . . . . . . . . . . . . 32
Top   ToC   RFC8141 - Page 4
   Appendix A.  Registration Template  . . . . . . . . . . . . . . .  37
   Appendix B.  Changes from RFC 2141  . . . . . . . . . . . . . . .  38
     B.1.  Syntax Changes from RFC 2141  . . . . . . . . . . . . . .  38
     B.2.  Other Changes from RFC 2141 . . . . . . . . . . . . . . .  39
   Appendix C.  Changes from RFC 3406  . . . . . . . . . . . . . . .  39
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  40
   Contributors  . . . . . . . . . . . . . . . . . . . . . . . . . .  40
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  40

1. Introduction

A Uniform Resource Name (URN) is a Uniform Resource Identifier (URI) [RFC3986] that is assigned under the "urn" URI scheme and a particular URN namespace, with the intent that the URN will be a persistent, location-independent resource identifier. A URN namespace is a collection of such URNs, each of which is (1) unique, (2) assigned in a consistent and managed way, and (3) assigned according to a common definition. (Some URN namespaces create names that exist only as URNs, whereas others assign URNs based on names that were already created in non-URN identifier systems, such as ISBNs [RFC3187], ISSNs [RFC3044], or RFCs [RFC2648].) The assignment of URNs is done by an organization (or, in some cases, according to an algorithm or other automated process) that has been formally delegated a URN namespace within the "urn" scheme (e.g., a URN in the "example" URN namespace [RFC6963] might be of the form "urn:example:foo"). This document rests on two key assumptions: 1. Assignment of a URN is a managed process. 2. The space of URN namespaces is itself managed. While other URI schemes may allow resource identifiers to be freely chosen and assigned, such is not the case for URNs. The syntactical correctness of a name starting with "urn:" is not sufficient to make it a URN. In order for the name to be a valid URN, the namespace identifier (NID) needs to be registered in accordance with the rules defined here, and the remaining parts of the assigned-name portion of the URN need to be generated in accordance with the rules for the registered URN namespace.
Top   ToC   RFC8141 - Page 5
   So that information about both URN syntax and URN namespaces is
   available in one place, this document does the following:

   1.  Defines the canonical syntax for URNs in general (in a way that
       is consistent with URI syntax), specifies methods for determining
       URN-equivalence, and discusses URI conformance.

   2.  Specifies a method for defining a URN namespace and associating
       it with a particular NID, and describes procedures for
       registering URN NIDs with the Internet Assigned Numbers Authority
       (IANA).

   For URN syntax and URN namespaces, this document modernizes and
   replaces the original specifications for URN syntax [RFC2141] and for
   the definition and registration of URN namespaces [RFC3406].  These
   modifications build on the key requirements provided in the original
   functional description for URNs [RFC1737] and on the lessons of many
   years of experience.  In those original documents and in the present
   one, the intent is to define URNs in a consistent manner so that,
   wherever practical, the parsing, handling, and resolution of URNs can
   be independent of the URN namespace within which a given URN is
   assigned.

   Together with input from several key user communities, the history
   and experiences with URNs dictated expansion of the URN definition to
   support new functionality, including the use of syntax explicitly
   reserved for future standardization in RFC 2141.  All URN namespaces
   and URNs that were valid under the earlier specifications remain
   valid, even though it may be useful to update the definitions of some
   URN namespaces to take advantage of new features.

   The foregoing considerations, together with various differences
   between URNs and URIs that are locators (specifically URLs) as well
   as the greater focus on URLs in RFC 3986 as the ultimate successor to
   [RFC1738] and [RFC1808], may lead to some interpretations of RFC 3986
   and this specification that appear (or perhaps actually are) not
   completely consistent, especially with regard to actions or semantics
   other than the basic syntax itself.  If such situations arise,
   discussions of URNs and URN namespaces should be interpreted
   according to this document and not by extrapolation from RFC 3986.

   Summaries of changes from RFCs 2141 and 3406 appear in Appendices B
   and C, respectively.  This document obsoletes both [RFC2141] and
   [RFC3406].  While it does not explicitly update or replace [RFC1737]
   or [RFC2276], the reader who references those documents should be
   aware that the conceptual model of URNs in this document is slightly
   different from those older specifications.
Top   ToC   RFC8141 - Page 6

1.1. Terminology

The following terms are distinguished from each other as described below: URN: A URI (as defined in RFC 3986) using the "urn" scheme and with the properties of a "name" as described in that document as well as the properties described in this one. The term applies to the entire URI including its optional components. Note to the reader: the term "URN" has been used in other contexts to refer to a URN namespace, the namespace identifier, the assigned-name, and URIs that do not use the "urn" scheme. All but the last of these is described using more specific terminology elsewhere in this document, but, because of those other uses, the term should be used and interpreted with care. Locator: An identifier that provides a means of accessing a resource. Identifier system: A managed collection of names. This document refers to identifier systems outside the context of URNs as "non-URN identifier systems". URN namespace: An identifier system that is associated with a URN NID. NID: The identifier associated with a URN namespace. NSS: The URN-namespace-specific part of a URN. Assigned-name: The combination of the "urn:" scheme, the NID, and the namespace specific string (NSS). An "assigned-name" is consequently a substring of a URN (as defined above) if that URN contains any additional components (see Section 2). The term "name" is deliberately not defined here and should be (and, in practice, is) used only very informally. RFC 3986 uses the term as a category of URI distinguished from "locator" (Section 1.1.3) but also uses it in other contexts. If those uses are treated as definitional, they would conflict with, e.g., the idea of URN namespace names (i.e., NIDs) and with terms associated with non-URN identifier systems. This document uses the terms "resource", "identifier", "identify", "dereference", "representation", and "metadata" roughly as defined in the URI specification [RFC3986].
Top   ToC   RFC8141 - Page 7
   This document uses the terms "resolution" and "resolver" in roughly
   the sense in which they were used in the original discussion of
   architectural principles for URNs [RFC2276], i.e., "resolution" is
   the act of supplying services related to the identified resource,
   such as translating the persistent URN into one or more current
   locators for the resource, delivering metadata about the resource in
   an appropriate format, or even delivering a representation of the
   resource (e.g., a document) without requiring further intermediaries.
   At the time of this writing, resolution services are described in
   [RFC2483].

   On the distinction between representations and metadata, see
   Section 1.2.2 of [RFC3986].

   Several other terms related to "normalization" operations that are
   not part of the Unicode Standard [UNICODE] are also used here as they
   are in RFC 3986.

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   [RFC2119].

1.2. Design Trade-offs

To a degree much greater than when URNs were first considered and their uses outlined (see [RFC1737]), issues of persistent identifiers on the Internet involve fundamental design trade-offs that are much broader than URNs or the URN approach and even touch on open research questions within the information sciences community. Ideal and comprehensive specifications about what should be done or required across the entire universe of URNs would require general agreement about, and solutions to, a wide range of such issues. Although some of those issues were introduced by the Internet or computer-age approaches to character encodings and data abstraction, others predate the Internet and computer systems by centuries; there is unlikely to be agreement about comprehensive solutions in the near future. Although this specification consequently contains some requirements and flexibility that would not be present in a more perfect world, this has been necessary in order to produce a consensus specification that provides a modernized definition of URNs (the unattractive alternative would have been to not modernize the definition in spite of widespread deployment). The following sub-sections describe two of the relevant issues in greater detail.
Top   ToC   RFC8141 - Page 8

1.2.1. Resolution

One issue that is specific to URNs (as opposed to naming systems in general) is the fairly difficult topic of "resolution", discussed in Sections 1.1, 2.3.1, 6.4.6, and elsewhere below. With traditional Uniform Resource Locators (URLs), i.e., with most URIs that are locators, resolution is relatively straightforward because it is used to determine an access mechanism that in turn is used to dereference the locator by (typically) retrieving a representation of the associated resource, such as a document (see Section 1.2.2 of [RFC3986]). By contrast, resolution for URNs is more flexible and varied. One important case involves the mapping of a URN to one or more locators. In this case, the end result is still a matter of dereferencing the mapped locator(s) to one or more representations. The primary difference here is persistence: even if a mapped locator has changed (e.g., a DNS domain name has changed hands and a URL has not been modified to point to a new location or, in a more extreme and hypothetical case, the DNS is replaced entirely), a URN user will be able to obtain the correct representation (e.g., a document) as long as the resolver has kept its URN-to-locator mappings up to date. Consequently, the relevant relationships can be defined quite precisely for URNs that resolve to locators that in turn are dereferenced to a representation. However, this specification permits several other cases of URN resolution as well as URNs for resources that do not involve information retrieval systems. This is true either individually for particular URNs or (as defined below) collectively for entire URN namespaces. Consider a namespace of URNs that resolve to locators that in turn are dereferenced only to metadata about resources because the underlying systems contain no representations of those resources; an example might be a URN namespace for International Standard Name Identifiers (ISNIs) as that identifier system is defined in the relevant standard [ISO.27729.2012], wherein by default a URN would be resolved only to a metadata record describing the public identity identified by the ISNI. Consider also URNs that resolve to representations only if the requesting entity is authorized to obtain the representation, whereas other entities can obtain only metadata about the resource; an example might be documents held within the legal depository collection of a national library.
Top   ToC   RFC8141 - Page 9
   Finally, some URNs might not be intended to resolve to locators at
   all; examples might include URNs identifying XML namespace names
   (e.g., the "dgiwg" URN namespace specified by [RFC6288]), URNs
   identifying application features that can be supported within a
   communications protocol (e.g., the "alert" URN namespace specified by
   [RFC7462]), and URNs identifying enumerated types such as values in a
   registry (e.g., a URN namespace could be used to individually
   identify the values in all IANA registries, as provisionally proposed
   in [IANA-URN]).

   Various types of URNs and multiple resolution services that may be
   available for them leave the concept of "resolution" more complicated
   but also much richer for URNs than the straightforward case of
   resolution to a locator that is dereferenced to a representation.

1.2.2. Character Sets and Encodings

A similar set of considerations apply to character sets and encodings. URNs, especially URNs that will be used as user-facing identifiers, should be convenient to use in local languages and writing systems, easily specified with a wide range of keyboards and local conventions, and unambiguous. There are trade-offs among those goals, and it is impossible at present to see how a simple and readily understandable set of rules could be developed that would be optimal, or even reasonable, for all URNs. The discussion in Section 2.2 defines an overall framework that should make generalized parsing and processing possible but also makes recommendations about rules for individual URN namespaces.

2. URN Syntax

As discussed above, the syntax for URNs in this specification allows significantly more functionality than was the case in the earlier specifications, most recently [RFC2141]. It is also harmonized with the general URI syntax [RFC3986] (which, it must be noted, was completed after the earlier URN specifications). However, this specification does not extend the URN syntax to allow direct use of characters outside the ASCII range [RFC20]. That restriction implies that any such characters need to be percent- encoded as described in Section 2.1 of the URI specification [RFC3986]. The basic syntax for a URN is defined using the Augmented Backus-Naur Form (ABNF) as specified in [RFC5234]. Rules not defined here (specifically: alphanum, fragment, and pchar) are defined as part of the URI syntax [RFC3986] and used here to point out the syntactic relationship with the terms used there. The definitions of some of
Top   ToC   RFC8141 - Page 10
   the terms used below are not comprehensive; additional restrictions
   are imposed by the prose that can be found in sections of this
   document that are specific to those terms (especially r-component in
   Section 2.3.1 and q-component in Section 2.3.2).

      namestring    = assigned-name
                      [ rq-components ]
                      [ "#" f-component ]
      assigned-name = "urn" ":" NID ":" NSS
      NID           = (alphanum) 0*30(ldh) (alphanum)
      ldh           = alphanum / "-"
      NSS           = pchar *(pchar / "/")
      rq-components = [ "?+" r-component ]
                      [ "?=" q-component ]
      r-component   = pchar *( pchar / "/" / "?" )
      q-component   = pchar *( pchar / "/" / "?" )
      f-component   = fragment

   The question mark character "?" can be used without percent-encoding
   inside r-components, q-components, and f-components.  Other than
   inside those components, a "?" that is not immediately followed by
   "=" or "+" is not defined for URNs and SHOULD be treated as a syntax
   error by URN-specific parsers and other processors.

   The following sections provide additional information about the
   syntactic elements of URNs.

2.1. Namespace Identifier (NID)

NIDs are case insensitive (e.g., "ISBN" and "isbn" are equivalent). Characters outside the ASCII range [RFC20] are not permitted in NIDs, and no encoding mechanism for such characters is supported. Sections 5.1 and 5.2 impose additional constraints on the strings that can be used as NIDs, i.e., the syntax shown above is not comprehensive.

2.2. Namespace Specific String (NSS)

The NSS is a string, unique within a URN namespace, that is assigned and managed in a consistent way and that conforms to the definition of the relevant URN namespace. The combination of the NID (unique across the entire "urn" scheme) and the NSS (unique within the URN namespace) ensures that the resulting URN is globally unique.
Top   ToC   RFC8141 - Page 11
   The NSS as specified in this document allows several characters not
   permitted by earlier specifications (see Appendix B).  In particular,
   the "/" character, which is now allowed, effectively makes it
   possible to encapsulate hierarchical names from non-URN identifier
   systems.  For instance, consider the hypothetical example of a
   hierarchical identifier system in which the names take the form of a
   sequence of numbers separated by the "/" character, such as
   "1/406/47452/2".  If the authority for such names were to use URNs,
   it would be natural to place the existing name in the NSS, resulting
   in URNs such as "urn:example:1/406/47452/2".

   Those changes to the syntax for the NSS do not modify the encoding
   rules for URN namespaces that were defined in accordance with
   [RFC2141].  If any such URN namespace whose names are used outside of
   the URN context (i.e., in a non-URN identifier system) also allows
   the use of "/", "~", or "&" in the native form within that identifier
   system, then the encoding rules for that URN namespace are not
   changed by this specification.

   Depending on the rules governing a non-URN identifier system and its
   associated URN namespace, names that are valid in that identifier
   system might contain characters that are not allowed by the "pchar"
   production referenced above (e.g., characters outside the ASCII range
   or, consistent with the restrictions in RFC 3986, the characters "/",
   "?", "#", "[", and "]").  While such a name might be valid within the
   non-URN identifier system, it is not a valid URN until it has been
   translated into an NSS that conforms to the rules of that particular
   URN namespace.  In the case of URNs that are formed from names that
   exist separately in a non-URN identifier system, translation of a
   name from its "native" format to a URN format is accomplished by
   using the canonicalization and encoding methods defined for URNs in
   general or specific rules for that URN namespace.  Software that is
   not aware of namespace-specific canonicalization and encoding rules
   MUST NOT construct URNs from the name in the non-URN identifier
   system.

   In particular, with regard to characters outside the ASCII range,
   URNs that appear in protocols or that are passed between systems MUST
   use only Unicode characters encoded in UTF-8 and further encoded as
   required by RFC 3986.  To the extent feasible and consistent with the
   requirements of names defined and standardized elsewhere, as well as
   the principles discussed in Section 1.2, the characters used to
   represent names SHOULD be restricted to either ASCII letters and
   digits or to the characters and syntax of some widely used models
   such as those of Internationalizing Domain Names in Applications
   (IDNA) [RFC5890], Preparation, Enforcement, and Comparison of
   Internationalized Strings (PRECIS) [RFC7613], or the Unicode
   Identifier and Pattern Syntax specification [UAX31].
Top   ToC   RFC8141 - Page 12
   In order to make URNs as stable and persistent as possible when
   protocols evolve and the environment around them changes, URN
   namespaces SHOULD NOT allow characters outside the ASCII range
   [RFC20] unless the nature of the particular URN namespace makes such
   characters necessary.

2.3. Optional Components

This specification includes three optional components in the URN syntax. They are known as r-component, q-component, and f-component and are described in more detail below. Because this specification focuses almost exclusively on URN syntax, it does not define detailed semantics of these components for URNs in general. However, each of these components has a distinct role that is independent of any given URN and its URN namespace. It is intended that clients will be able to handle these components uniformly for all URNs. These components MAY be used with URNs from existing URN namespaces, whether or not a URN namespace explicitly supports them. However, consistent with the approach taken in RFC 3986, the behavior of a URN that contains components that are undefined or meaningless for a particular URN namespace or resource is not defined. The following sections describe these optional components and their interpretation in greater detail.

2.3.1. r-component

The r-component is intended for passing parameters to URN resolution services (taken broadly, see Section 1.2) and interpreted by those services. (By contrast, passing parameters to the resources identified by a URN, or to applications that manage such resources, is handled by q-components as described in the next section.) The URN r-component has no syntactic counterpart in any other known URI scheme. The sequence "?+" introduces the r-component. The r-component ends with a "?=" sequence (which begins a q-component) or a "#" character (number sign, which begins an f-component). If neither of those appear, the r-component continues to the end of the URN. Note that characters outside the ASCII range [RFC20] MUST be percent-encoded using the method defined in Section 2.1 of the generic URI specification [RFC3986]. As described in Section 3, the r-component SHALL NOT be taken into account when determining URN-equivalence. However, the r-component SHALL be supplied along with the URN when presenting a request to a URN resolution service.
Top   ToC   RFC8141 - Page 13
   This document defines only the syntax of the r-component and reserves
   it for future use.  The exact semantics of the r-component and its
   use in URN resolution protocols are a matter for potential
   standardization in separate specifications, presumably including
   specifications that define conventions and a registry for resolution
   service identifiers.

   Consider the hypothetical example of passing parameters to a
   resolution service (say, an ISO alpha-2 country code [ISO.3166-1] in
   order to select the preferred country in which to search for a
   physical copy of a book).  This could perhaps be accomplished by
   specifying the country code in the r-component, resulting in URNs
   such as:

      urn:example:foo-bar-baz-qux?+CCResolve:cc=uk

   While the above should serve as a general explanation and
   illustration of the intent for r-components, there are many open
   issues with them, including their relationship to resolution
   mechanisms associated with the particular URN namespace at
   registration time.  Thus, r-components SHOULD NOT be used for URNs
   before their semantics have been standardized.

2.3.2. q-component

The q-component is intended for passing parameters to either the named resource or a system that can supply the requested service, for interpretation by that resource or system. (By contrast, passing parameters to URN resolution services is handled by r-components as described in the previous section.) The URN q-component has the same syntax as the URI query component but is introduced by "?=", not "?" alone. For a URN that may be resolved to a URI that is a locator, the semantics of the q-component are identical to those for the query component of that URI. Thus, URN resolvers returning a URI that is a locator for a URN with a q-component do this by copying the q-component from the URN to the query component of the URI. An example of the copying operation appears below. This specification does not specify a required behavior in the case of URN resolution to a URI that is a locator when the original URN has a q-component and the URI has a query string. Different circumstances may require different approaches. Resolvers SHOULD document their strategy in such cases.
Top   ToC   RFC8141 - Page 14
   If the URN does not resolve to a URI that is a locator, the
   interpretation of the q-component is undefined by this specification.
   For URNs that may be resolved to a URI that is a locator, the
   semantics of the q-component are identical to those for queries to
   the resource located via that URI.

   For the sake of consistency with RFC 3986, the general syntax and the
   semantics of q-components are not defined by, or dependent on, the
   URN namespace of the URN.  In parallel with RFC 3986, specifics of
   syntax and semantics, e.g., which keywords or terms are meaningful,
   of course may depend on a particular URN namespace or even a
   particular resource.

   The sequence "?=" introduces the q-component.  The q-component ends
   with a "#" character (number sign, which begins an f-component).  If
   that character does not appear, the q-component continues to the end
   of the URN.  The characters slash ("/") and question mark ("?") may
   represent data within the q-component.  Note that characters outside
   the ASCII range [RFC20] MUST be percent-encoded using the method
   defined in Section 2.1 of the generic URI specification [RFC3986].

   As described in Section 3, the q-component SHALL NOT be taken into
   account when determining URN-equivalence.

   URN namespaces and associated information placement in syntax SHOULD
   be designed to avoid any need for a resolution service to consider
   the q-component.  Namespace-specific and more generic resolution
   systems MUST NOT require that q-component information be passed to
   them for processing.

   Consider the hypothetical example of passing parameters to an
   application that returns weather reports from different regions or
   for different time periods.  This could perhaps be accomplished by
   specifying latitude and longitude coordinates and datetimes in the
   URN's q-component, resulting in URNs such as the following.

      urn:example:weather?=op=map&lat=39.56
         &lon=-104.85&datetime=1969-07-21T02:56:15Z

   If this example resolved to an HTTP URI, the result might look like:

      https://weatherapp.example?op=map&lat=39.56
         &lon=-104.85&datetime=1969-07-21T02:56:15Z
Top   ToC   RFC8141 - Page 15

2.3.3. f-component

The f-component is intended to be interpreted by the client as a specification for a location within, or region of, the named resource. It distinguishes the constituent parts of a resource named by a URN. For a URN that resolves to one or more locators that can be dereferenced to a representation, or where the URN resolver directly returns a representation of the resource, the semantics of an f-component are defined by the media type of the representation. The URN f-component has the same syntax as the URI fragment component. If a URN containing an f-component resolves to a single URI that is a locator associated with the named resource, the f-component from the URN can be applied (usually by the client) as the fragment of that URI. If the URN does not resolve to a URI that is a locator, the interpretation of the f-component is undefined by this specification. Thus, for URNs that may be resolved to a URI that is a locator, the semantics of f-components are identical to those of fragments for that resource. For the sake of consistency with RFC 3986, neither the general syntax nor the semantics of f-components are defined by, or dependent on, the URN namespace of the URN. In parallel with RFC 3986, specifics of syntax and semantics, e.g., which keywords or terms are meaningful, of course may depend on a particular URN namespace or even a particular resource. The f-component is introduced by the number sign ("#") character and terminated by the end of the URI. Any characters outside the ASCII range [RFC20] that appear in the f-component MUST be percent-encoded using the method defined in Section 2.1 of the generic URI specification [RFC3986]. As described in Section 3, the f-component SHALL NOT be taken into account when determining URN-equivalence. Clients SHOULD NOT pass f-components to resolution services unless those services also perform object retrieval and interpretation functions. Consider the hypothetical example of obtaining resources that are part of a larger entity (say, the chapters of a book). Each part could be specified in the f-component, resulting in URNs such as: urn:example:foo-bar-baz-qux#somepart


(next page on part 2)

Next Section