Internet Draft Andrey Shur Intended status: Informational Jerry Dunietz Creation date: August 7, 2008 Microsoft Corp Expiration date: February 2009 The "pack" URI Scheme Status of this Memo 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. 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 This document may not be modified, and derivative works of it may not be created, except to publish it as an RFC and to translate it into languages other than English. Abstract A package is a logical entity that holds a collection of 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 August 2008 [Page 1] Internet Draft The "pack" URI Scheme August 2008 1. Introduction The material in this document is also included within the "Office Open XML File Formats" ECMA-376 Standard (http://www.ecma- international.org/publications/standards/Ecma-376.htm, Part 2),and is being presented as an IETF RFC for informational purposes. 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 as it is defined in RFC 3986, section 5.2 [1]. 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 August 2008 [Page 2] Internet Draft The "pack" URI Scheme August 2008 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*( pchar ) unreserved = // as specified in RFC 3986 sub-delims = // as specified in RFC 3986 pct-encoded = // as specified in RFC 3986 pchar = // 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. Shur & Dunietz Expires August 2008 [Page 3] Internet Draft The "pack" URI Scheme August 2008 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. b. The decoded (as it is defined by 4.b, 4.c in this document) authority components are equivalent URIs (the equivalency rules by scheme, as per RFC 3986). 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 The IANA registry for URI schemes SHOULD be updated to include an entry for the "pack" URI scheme (under Provisional URI Schemes) when the "pack" URI scheme is accepted for publication as an RFC. This entry SHOULD contain the following values: Scheme Name: pack Description: "pack" URI scheme provides for the construction and use of URIs referring to individual parts within the package. Reference: RFC TBD Shur & Dunietz Expires August 2008 [Page 4] Internet Draft The "pack" URI scheme August 2008 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 4234, October 2005. [3] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [4] Open Packaging Conventions. (Standard ECMA-376 "Office Open XML File Formats", Part 2, December 2006) 9. 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 Full Copyright Statement Copyright (C) The IETF Trust (2007). 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, THE IETF TRUST 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. Shur & Dunietz Expires August 2008 [Page 5] Internet Draft The "pack" URI scheme August 2008 Intellectual Property The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Acknowledgment Funding for the RFC Editor function is provided by the IETF Administrative Support Activity (IASA).