Internet Draft Andrey Shur Intended status: RFC Jerry Dunietz Expiration date: June 2006 Microsoft Corp January 2006 The "pack" URI Scheme Status of this Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 5 of RFC3978. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/1id-abstracts.html The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html Intellectual Property Considerations By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. Copyright Notice Copyright (C) The Internet Society (2006). All Rights Reserved. Abstract A "package" is a single addressable resource, logically containing embedded addressable resources, referred to as "parts". Given the URI for a complete package, the "pack" URI scheme provides for the construction and use of URIs referring to individual parts within the package. It also provides for the use of part's URIs as base URIs for resolving relative references between the parts in a single package. Shur & Dunietz Expires June 2006 [Page 1] Internet Draft The "pack" URI Scheme January 2006 1. Inroduction The purpose of the "pack" URI scheme is: a. To identify a part resource within a package that conforms to Open Packaging Conventions [4]. b. To enable the use of a part's URI as a base URI for resolving relative references to parts within the same package. 2. Terminology The following terms are used as they are defined in RFC 3986 [1]: "URI", "relative reference", "base URI", "scheme", "component", "query", "unreserved", "sub-delims", "pct-encoded", "resource" Section 3.3 of this document defines the terms "authority", "path", and "segment" in a manner that is consistent with, but more restrictive than, RFC 3986 [1]. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [3]. 3. Syntax Rules 3.1. General Syntax The "pack" URI takes the form: "pack://" authority ["/" | path ] The authority component contains an encoded URI that identifies the package resource. The path component identifies a particular part within the package identified by the authority component. When provided, the path component describes a path to a part in the package. When the path component is missing, the "pack" URI identifies the package resource as a whole. 3.2. Examples pack://http:,,www.mysite.com,my.package/a/b/foo.xml pack://http:,,www.mysite.com,my.package pack://http:,,www.mysite.com,my.package/ Shur & Dunietz Expires June 2006 [Page 2] Internet Draft The "pack" URI Scheme January 2006 3.3. Grammar The ABNF [2] (certain values are included by reference from RFC 3986 [1]): pack-uri = "pack://" authority ["/" | path ] authority = *(unreserved | sub-delims | pct-encoded | ":") path = 1*("/" segment ) segment = 1*(unreserved | sub-delims | pct-encoded | ":" | "@") unreserved = // as specified in RFC 3986 sub-delims = // as specified in RFC 3986 pct-encoded = // as specified in RFC 3986 The grammar must fit the following restrictions: a. A segment MUST NOT contain pct-encoded "/" or "\" characters. b. A segment MUST NOT contain pct-encoded unreserved characters. c. A segment MUST NOT end with a dot (".") character. d. A segment MUST include at least one non-dot character. 4. Resolving This section defines the process of resolving a "pack" URI to a resource (either a package or a package part): a. Parse the "pack" URI into the scheme, authority, and path components, following the rules established for these components for generic URI syntax in RFC 3986 [1]. b. In the authority component replace all "," characters with "/". c. In the resulting authority component un-escape all pct-encoded ASCII characters. d. The resulting authority component MUST hold an absolute URI identifying the package resource. e. If the path component is missing, "pack" URI resolves to the package resource identified by the authority component. f. If path component is present, "pack" URI resolves to the part, with the name equal to the path component, within the package identified by the authority component. 5. Equivalence Pack URIs are equivalent if all three of the following conditions hold: a. The scheme components are octet-by-octet identical after they are converted to lowercase. Shur & Dunietz Expires June 2006 [Page 3] Internet Draft The "pack" URI Scheme January 2006 b. The decoded (as it is defined by 4.b, 4.c in this document) authority components are equivalent URIs. The rules for URI equivalence MAY vary by scheme. Those clients that are unaware of equivalence rules for a particular URI scheme, MUST apply case-sensitive ASCII comparison for decoded authority components. c. The path components are equivalent when compared as case- insensitive ASCII strings. 6. Security Considerations a. The "pack" URI scheme is not associated with any particular network protocols. Its grammar is fully compatible with the generic URI syntax defined in RFC 3986 [1]. The "pack" URI scheme does not introduce any specific security issues related to URI parsing and relative reference resolution. b. Because the authority component of a "pack" URI identifies a package, resolving a relative reference that does not begin with "//" against a base "pack" URI will never yield a target URI identifying a resource outside of the package. 7. IANA Considerations This document requires IANA to assign "pack" URI scheme name in an IANA registry before RFC publication. 8. Normative References [1] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005. [2] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997. [3] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. Shur & Dunietz Expires June 2006 [Page 4] Internet Draft The "pack" URI scheme January 2006 9. Informative References [4] Open Packaging Conventions. (Version 0.85, March 30, 2006, http://www.microsoft.com/whdc/xps/xpspkg.mspx) 10. Author's Addresses Andrey Shur Microsoft Corporation One Microsoft Way Redmond, WA 98052-6399 Email: andreysh@microsoft.com Jerry Dunietz Microsoft Corporation One Microsoft Way Redmond, WA 98052-6399 Email: jerryd@microsoft.com 11. Full Copyright Statement Copyright (C) The Internet Society (2005). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. This document and the information contained herein are provided on An "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.