INTERNET-DRAFT J. Boynton Produx House, Corp. Expires six months from --> 5 August, 2000 Uniform Object Locator -- UOL 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. Abstract A Uniform Object Locator (UOL) provides a general-purpose identifier for "human" interaction with object oriented data. UOL is designed to meet the recommendations for URI queries laid out in "Uniform Resource Identifiers (URI) Generic Syntax" [RFC2396]. This document defines syntax and semantics of UOL, including both absolute and relative forms, and guidelines for their use; it revises features definitions, and examples, given in "draft-boynton-uol-01" and updates the scheme to provide additional functionality. Boynton Expires February 2001 [page 1] INTERNET-DRAFT Uniform Object Locator 5 August, 2000 Table of Contents 1 Introduction 1.1 Purpose 1.2 General Description 1.3 Terminology 2 UOL Syntactic Components 2.1 Path Components 2.2 Absolute and Relative Form 2.3 Reserved Markers 2.4 Example UOL 3 Object Elements 3.1 Directory Object 3.2 Group Object 3.3 Group Element 3.3.1 Name Element 3.3.2 Resolving Name Elements 3.3.3 Index Name 3.3.4 Default Name 4 Reserved UOL Parameters 5 UOL, XPath, and XML 6 References 7 Author's Address (send comments) 1 Introduction 1.1 Purpose A Uniform Object Locator (UOL) provides an intuitive, hierarchical, "human-readable", identifier for object oriented data. UOL is intended for general-purpose use as a command line argument/ID for retrieval and storage of data through multiple object layers. 1.3 General Description A UOL emulates the internal structure of a data object by providing an object constructor and name fragment. Special elements within the constructor are used to organize it into object groups, directories, and nested object elements. 1.2 Terminology For clarity, the specific role of elements within the UOL are defined below. element A single, un-delimited, string of characters. directory A typical hierarchical string of elements delimited by a '/' (forward slash). attribute A non-hierarchical parameter element following a directory. Boynton Expires February 2001 [page 2] INTERNET-DRAFT Uniform Object Locator 5 August, 2000 schema For this draft, schema is a subset of nodes, directories, or attributes, defined by a schema, DTD(Document Type Definition), or class definition. object A collection of directories and/or attributes defined by a schema. An object can be visualized as a re-usable tree of nodes descending from a single directory. directory object The root element of an object instance with no assigned name. The element MUST have a prefix of "/.". group object The root element of a named object instance. The element MUST have a prefix of "/..". group element A container for named objects having the same parent constructor and schema. constructor A complete collection of directory nodes followed by a single attribute; where no attribute is given, the directory path itself. object name An ordered collection of "." delimited elements that, when used together, provide the full name for an object described by a UOL constructor. name element An individual element within an object name. Its value is mapped to an element representing a group object. 2. UOL Syntactic Components The UOL scheme is derived from widely implemented URL syntax and semantics. A UOL consists of a scheme, authority, constructor (path component) and name fragment. UOL may also be appended to a URI as a query component; [RFC2396]. The UOL scheme, itself, does not contain a query component. # Where used as a query to a URL, the authority and path component of the URL comprise the authority for the UOL ?# Boynton Expires February 2001 [page 3] INTERNET-DRAFT Uniform Object Locator 5 August, 2000 2.1 Path Components The UOL is constructed from a hierarchical list of elements in similar fashion to a URL path component; with the '/' forward slash as the delimiter for directory elements. A "//" (double slash) is used to define an authority element. Object elements, within the path, use the prefix "/." or "/.." to declare their sub-elements to represent a schema defined path; Section 3. Where the form "/.." precedes the object element, an object name is appended to the fragment identifier to name the path instance. The two components are separated by a '#' (crosshatch), and divide the UOL into re-usable parts; an object constructor and object name. 2.2 Absolute and Relative Forms A UOL can be absolute or relative. An absolute UOL will resolve to, or contain, a top level root directory element preceded by two forward slashes "//" (the authority). UOLs beginning with "../", "./", or "/", are resolved in a manner consistent with the behavior for URI path components in Section 5.2 [RFC2396]. The prefix, itself, is not considered an element of the constructor. In addition to the components above, UOL provides two special elements for resolving objects. ".*/" and "..*/" resolve a relative path to the current directory object or group object, respectively. In addition, Special rules for resolving name elements are provided in Section 3.3.2. 2.3 Reserved Markers The UOL scheme reserves the characters '=', '!', '@', '$', and '~' for marking special behavior within a UOL. 2.3.1 Element Markers Elements within a UOL may exist in various states. Among these are persistent, transient, static, constant. Once defined by a schema, an elements state must not change. persistent = "" The persistent state is the default for all elements and does not require a "marker". Persistent elements must be recreated in every object/directory subset defined by a schema. transient = "~" Transient elements may be added or removed freely; regardless of schema. Boynton Expires February 2001 [page 4] INTERNET-DRAFT Uniform Object Locator 5 August, 2000 static = "@" "persistent" elements that reference an identical location/value; regardless of object instance. constant = "$" An element that cannot be moved, translated, or resolved to another path. 2.3.2 Reference Markers Reference markers are reserved for use as a UOL prefix. The meaning for each modifies the entire UOL. link = "=" Identifies the UOL as a linked reference. For example, a variable within formula or data cell. comment = "!" Identifies the UOL as a references to a "comment" value. The comment provides specific details regarding the attribute described by the UOL. Note When used in conjunction with other markers, "=" must always appear first. 2.4 Example UOL The following section provides examples for how object elements are used in a UOL. The examples given are for a fictitious company with branch offices in three cities LA, Dallas, and Tampa. Each office has, three departments sales, accounting, and personnel. The example below shows a UOL referencing the total hours worked by an employee named Jones, from the sales department of the LA branch office. "//..branch/..dept/..log/hours/total#LA.sales.Jones" In the example above, "..branch", "..dept" and "..log" are objects. "..log" is an object modeling a detailed employee record. The next example uses the same constructor to reference the total hours worked by an accounting employee at the Dallas branch. "//..branch/..dept/..log/hours/total#Dallas.accounting.Smith" Like the constructor, object names can also be re-used. In the example below, a constructor is modified to retrieve several records for a personnel associate in Tampa. "//..branch/..dept/..log/hours/total#Tampa.personnel.Carter" "//..branch/..dept/..log/hours/overtime#Tampa.personnel.Carter" "//..branch/..dept/..log/hours/vacation#Tampa.personnel.Carter" Boynton Expires February 2001 [page 5] INTERNET-DRAFT Uniform Object Locator 5 August, 2000 The next example shows a UOL for the employee above (Carter). The record also introduces a directory object called "car". The object is only used once per instance of log. It, therefore, does not need a name. "/..dept/..log/.car/miles#personnel.Carter" 3. Object Elements In the UOL scheme, an object is a directory element that declares its sub-elements to represent a tree of nodes, directories, or attributes, defined by a schema, DTD(Document Type Definition), or class definition. An object element MUST have a prefix of "." or "..". It is important to note that the values "./", "../", ".*/", and "..*/" are reserved for resolving a relative UOL path to an absolute form and are NOT considered object elements; Section 2.2. This similarity, however, does not make the reference ambiguous. An object declaration is always followed by one or more characters describing the object. A special elements is always followed by "/" (forward slash) or the end of the constructor. object reference "/..object/dir/attr#name" or "/.object/dir/attr" relative reference "../dir/attr" or "./dir/attr" 3.1 Directory Object An object element with a prefix of "." (dot) is interpreted as a "directory object". A directory object represents a single, un-named object instance. A directory object is used and resolved in the same manner as a directory element. However, it declares its child elements to represent a schema. The schema used for a directory object is interchangeable with that of a group object having a lexicographically identical description. 3.2 Group Object An object element with a prefix of ".." (two dots) is interpreted as a "group object". A group object represents a named instance of an object schema. All group objects descend from a group element. Group objects are analogous to rows in a spreadsheet. For example, each row contains a range of cells, or attributes, corresponding to a column heading. In this case, each numbered row represents a named instance of a row object. reference to column "a" in row "2" "//data/..row/col_a#[2]" or "//data/..row/..col#[2].a Boynton Expires February 2001 [page 6] INTERNET-DRAFT Uniform Object Locator 5 August, 2000 3.3 Group Element The group element provides a branching node for related group objects. Its object name (if any) is inherited from its parent directory. Object elements, within the group are named by extending the name of the group; Section 3.3.1. The element used to define a group is the same element used to define a group object. That is, the two elements overlap and are viewed as a single element. This is possible because object naming semantics guarantee that both object and group will have different names. Therefore, defining a separate directory would add unnecessary length to the UOL. To facilitates parsing, direct references to group elements are disambiguated by removing the trailing forward slash "/". group reference "//authority/..object1/..object2#name1" object reference "//authority/..object1/..object2/#name1.name2" 3.3.1 Name Element Each group object is assigned a unique name. The name is appended to the object name (if any) inherited from the parent directory. The object name is appended to the end of the UOL following the fragment delimiter "#". The new object name is then inherited by all sub-directories of the object element. "/..object/sub_dir/field#name" object elements, contained by a parent ("nested object"), inherit the name of their parent. The name element assigned to the nested object is appended to the parent name. The nested name element is delimited from the object name by a "." (dot). "/..parent_object/..nested_object/field#parent_name.nested_name" 3.3.2 Resolving Name Elements In general, the constructor elements of a UOL are resolved in the same manner as elements within a URL; Section 5.2 [RFC2396]. Care should be taken, however, to maintain proper relationships between object elements and their assigned names. example Where an absolute UOL is equal to: "//..obj1/dir/..obj2/field#name1.name2" rel UOL = field_2 result = "//..obj1/dir/..obj2/field_2#name1.name2" Boynton Expires February 2001 [page 7] INTERNET-DRAFT Uniform Object Locator 5 August, 2000 rel UOL = ..obj3/field_3#name3 result = "//..obj1/dir/..obj2/..obj3/field_3#name1.name2.name3" rel UOL = ../field_2 result = "//..obj1/dir/field_2#name1" rel UOL = ../..obj3/field_3#name3 result = "//..obj1/dir/..obj3/field_3#name1.name3" rel UOL = ../dir_2/field_4 result = "//..obj1/dir/dir_2/field_4#name1" 3.3.3 Index Names UOL allows name substitution with index values. The index name is inclosed by "[" and "]" (open and closed square brackets). For any list of object names, the integer index, corresponding to a name in the list, may be used in place of the actual name. Where no list is given, the name element will be parsed to the string value of the index number (i.e. [9] == "9"). It is envisioned that index brackets may contain platform dependant code such as functions, arithmetic operators, and variables. Therefore, parsers should not attempt to interpret the bracket contents directly. Also, because such content is likely to include reserved and unsafe characters, bracketed content should be converted to "x-form-url-encoded" strings. Characters outside of the bracket, but within the element, should be removed. 3.3.4 Default Name The name "DEFAULT" (all upper case) is reserved for naming a default object element. Applications can use the default object for storing schemas or default values. Applications that do not wish to provide this function should return a value equivalent to "" when a default value is requested. 4 Reserved UOL Parameters Though UOL does not define a language for sorting objects, it does reserve a small set of static parameters for this purpose. Each parameter is a reference to a static list of elements available from any directory. Objects created from the same schema should reference the same list. These parameters are optional and reserved. Applications are not required to implement them but MUST prevent alternate use. @NAMES = Used to interact with a line delimited string of elements. Each represent a "human readable" extension to the current directory. An application can use this list to allocate resources and/or perform special functions prior to loading data. Boynton Expires February 2001 [page 8] INTERNET-DRAFT Uniform Object Locator 5 August, 2000 Special rules for group elements: A list of names for any group element is unique to the group and will only contain object names for the group. The names provided are extensions to the name inherited from the group element. The full object name is represented by a combination of the two. The example below returns a list of names for "object2". group names "/..object1/..object2@NAMES#objectName1" @SCHEMA = Used to interact with a line delimited list of UOL strings representing a complete schema for sub-elements of the current directory. The list provides partial UOL constructors that will resolve correctly when combined with the current path. Each element path is enumerated in turn. The object name fragment (if any) is removed. This list is "read-only". @AKA (Also Known As) = Used to interact with a line delimited string of alternate object references. For example an object called "records" could use @AKA="journal/nlog" to improve interpretability between schemas. Note: this parameters is only supported for object and group elements. @FUNCTIONS = Used to retrieve or update a line delimited list of functions used to interact with object data. functions should be stated in a form consistent with a "classid" URI; Section 13.3 [REC html 4.01]. 5 UOL, XPath, and XML User interaction with parsed XML data is one possible use for the UOL scheme. However, UOL is NOT proposed for referencing attributes from within XML schemas, DTDs, or payload. This functionality is provided by XML Path Language which was specifically written for this task. At the time this draft was updated, the W3C recommendation for XML Path Language was [XPath10]; 6 References [RFC2396] T. Berners-Lee, R. Fielding, and L. Masinter. "Uniform Resource Identifiers (URI) Generic Syntax". IETF RFC 2396 August 1998. [HTML401] D. Raggett, A. Le Hors, and I. Jacobs, Editors, "HTML 4.01 Specification". W3C Recommendation HTML401, 24 December 1999. [XPath10] J. Clark, and S. DeRose, Editors, "XML Path Language (XPath) Version 1.0". W3C Recommendation XPath10, 16 November 1999. Boynton Expires February 2001 [page 9] INTERNET-DRAFT Uniform Object Locator 5 August, 2000 7 Author's Address Jon L. Boynton Produx House, Corp. 19300 Nalle Rd. North Ft.Myers, FL 33917 Phone 941 543 4491 Email Comments to jon@datamessenger.com Boynton Expires February 2001 [page 10]