Network Working Group J. Borden Internet-Draft The Open Healthcare Group Expires: August 20, 2002 S. St.Laurent February 19, 2002 A generic fragment identifier syntax for URI references draft-borden-frag-00.txt Status of this Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026. 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/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on August 20, 2002. Copyright Notice Copyright (C) The Internet Society (2002). All Rights Reserved. Abstract URI references with fragment identifiers uniquely identify parts of a document. Such identifiers have been specified as SGML/XML IDs e.g. in HTML [6]. The XPointer [2] specification is intended to serve as a fragment identifier syntax for XML documents. IDs conform to the XPointer "raw name" form. Specifications constraining the behavior of user agents such as SMIL [8], XHTML [15], and SVG [10] have all supported this simple fragment naming convention though some extend it. Specifications such as XML Namespaces [4] and RDF [16] use URI references as opaque names. Such usage does not depend on resolution Borden & St.Laurent Expires August 20, 2002 [Page 1] Internet-Draft frag-id February 2002 of the URI. In such usages, no media type is specified and the proper fragment identifier syntax is undefined. As it has become common practice to use URI references as opaque identifiers, this proposal seeks to provide a minimal definition of what might be identified by a URI reference. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Subresource . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4. Numeric fragments . . . . . . . . . . . . . . . . . . . . . . 6 5. Scheme based fragments . . . . . . . . . . . . . . . . . . . . 7 6. Declaration of support for schemes . . . . . . . . . . . . . . 8 7. General Syntax . . . . . . . . . . . . . . . . . . . . . . . . 9 References . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 11 A. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 12 B. Revision History . . . . . . . . . . . . . . . . . . . . . . . 13 Full Copyright Statement . . . . . . . . . . . . . . . . . . . 14 Borden & St.Laurent Expires August 20, 2002 [Page 2] Internet-Draft frag-id February 2002 1. Introduction Frequently URI references [1], which may contain a fragment identifier, are used independent of their resolution into a particular document, or document fragment, at a particular point in time. A notable example is use of a URI reference as an XML Namespace [4] name. In the current situation a the syntax of the fragment identifier part of a URI reference is defined by the MIME media type of the referenced document as in an HTTP transaction. This media type is not fixed, and may change from time to time and from reference to reference, or according to request headers such as with content negotiation. Fragment identifier syntax, in practice, is often constant from media type to media type. In order to enable robust use of fragment identifiers, particularly outside a particular HTTP transaction, we propose a generic, media type independent, fragment identifier syntax. This fragment identifier syntax is compatible with current usage of fragment identifiers, and is generally compatible with future proposed syntaxes such as XPointer [2]. This specification does not itself specify how user agents are to process or interpret fragment identifiers, such as may be specified with individual MIME media type registrations, rather provides a consistent syntax for fragment identifiers and a registration mechanism for schemes associated with fragment identifier syntaxes. Borden & St.Laurent Expires August 20, 2002 [Page 3] Internet-Draft frag-id February 2002 2. Subresource A subresource is identified by a URI reference in the same fashion that a resource is identified by a URI. The relationship between a subresource and fragment of a document entity is the same as the relationship between a resource and the entity returned by resolving the URI. Borden & St.Laurent Expires August 20, 2002 [Page 4] Internet-Draft frag-id February 2002 3. Names The short form of a fragment identifier is a Name. A Name is used as the fragment identifier for HTML, and is equivalent to the Bare Name form of XPointer [2]. This proposal does not define any mechanism of locating document fragments by name, leaving this up to the application Borden & St.Laurent Expires August 20, 2002 [Page 5] Internet-Draft frag-id February 2002 4. Numeric fragments A numeric fragment is of the form: ('/' Number)+ e.g. #/10/24 This conforms to the XPointer [2] Child Sequence syntax, however may be used by non-XML media types. For example a particular frame of a video clip might be represented as: #/100025 ranges are expressed as /1-10 and lists as /1,2,5,20 Borden & St.Laurent Expires August 20, 2002 [Page 6] Internet-Draft frag-id February 2002 5. Scheme based fragments The full form of a fragment identifier uses the Scheme '(' string ')' Form. This form is consistent with the XPointer [2] full xpointer form, hence this valid full XPointers conform to this proposed syntax. This specification defines the following scheme names: xpath: the content is a valid XPath [5] -- xpath(//foo[1]) xmlns: the content defines a namespace prefix mapping -- xmlns(ex=http//example.org/xmlns/) xpointer: the content is a valid XPointer -- xpointer(/foo/bar[1]) Borden & St.Laurent Expires August 20, 2002 [Page 7] Internet-Draft frag-id February 2002 6. Declaration of support for schemes A namespace may declare support for a particular scheme or set of schemes via a RDDL [7] description. The id of a RDDL resource describing a scheme should be the same as the name of the scheme. The RDDL nature or the resource should be URI reference identifying the scheme. The RDDL purpose of the scheme should be the URI: http:/ /www.rddl.org/fragment-syntax#scheme. For example: