INTERNET-DRAFT J. Boynton Produx House, Corp. Expires six months from --> 5 February, 1999 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-00" and updates the scheme to provide additional functionality. Boynton Expires August 2000 [page 1] INTERNET-DRAFT Uniform Object Locator 5 February, 1999 Table of Contents 1 Introduction 1.1 Purpose 1.2 Terminology 1.3 General Description 1.3.1 Construction 1.3.2 Reserved Markers 1.3.3 Absolute and Relative Form 1.3.4 Practical Examples 2 Objects 2.2 Object Element 2.2.1 Assigning Names 2.2.2 Nested Objects 2.2.3 Resolving Name Elements 2.3 Group Element 2.4 Default Object 3 Reserved UOL Parameters 3.1 Group Parameters 3.2 Directory Parameters 3.3 Name Element Parameters 4 UOL, XPath, and XML 5 References 6 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.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, and ending with, a '/' (forward slash). attribute A non-hierarchical parameter element. constructor The full directory and/or object path described by the UOL, followed by a single attribute; where no attribute is given, the path itself. Boynton Expires August 2000 [page 2] INTERNET-DRAFT Uniform Object Locator 5 February, 1999 object A named collection of directories and attributes with an object element as its root directory. object name An ordered collection of '.' (dot) delimited elements that, when used together, provide the full name for an object described by the constructor. name element An individual element within an object name. Its value is mapped to an object element. persistent element A directory, or attribute, that must be present in all named instances of its parent object. transient element A directory, or attribute, that may, or may not, be present in all named instances of its parent object. An optional element. object element A directory element with an assigned name element. An object element MUST have a prefix of ".." (dot,dot). group element A directory element containing a collection of object elements. A group element MUST have a prefix of ".." (dot,dot). 1.3 General Description The UOL scheme is derived from widely implemented URL syntax and semantics. A UOL, may be used alone or as a query component to a URI; [RFC2396]. A UOL emulates the internal structure of a data object by providing a hierarchical object constructor and object name. Special elements within the constructor are used to organize it into object groups. All constructor elements within a UOL object are marked as having either a persistent or transient state. Persistent elements must be recreated in every named instance of an object. Note: Once defined by a schema or DTD(Document Type Definition), an elements persistent or transient state must not change. 1.3.1 Construction 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. The UOL path component describes the location of data while a fragment identifier is used to hold names associated with object Boynton Expires August 2000 [page 3] INTERNET-DRAFT Uniform Object Locator 5 February, 1999 elements within the path. The fragment is separated from the constructor by a '#' (crosshatch). Names elements are delimited by '.' (dots). This scheme divides the UOL into two re-usable components; an object constructor and object name. 1.3.2 Reserved Markers The UOL scheme reserves the characters '=', '!', '@', and '~' for marking special behavior within a UOL. '=' (equal sign) - Reserved for use as a UOL prefix. The character identifies the UOL as a linked reference. This feature allows the UOL to be used as a variable within a formula or data cell. '!' (exclamation point) - Reserved for use as a UOL prefix. The character identifies the UOL as a references to a "comment" value. The comment provides specific details regarding the attribute described by the UOL, such as object type, format, general characteristics, or formulas. '@' - Reserved for use as a directory or attribute prefix. The character identifies the element as transient or "optional". Transient elements are not guaranteed to persist within a containing object. This identifier can be used to safely mark elements generated from loosely formed schemas and DTD(Document Type Definition). '~' (tilde) - Reserved for use as a directory or attribute prefix following a group element. The character is used to disambiguate a group element path from an object element path. Section 2.3. Other use, as a prefix inside a UOL, is unsafe. Note: When two or more of the identifiers are used at the beginning of a UOL, the order of occurrence shall be '=' then '!' then '@' then '~'. 1.3.3 Absolute and Relative Forms A UOL can be absolute or relative. An absolute UOL MUST contain a top level root directory element preceded by two forward slashes ("//"). UOLs with the prefix "../", "./", 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. Special rules for resolving name elements are provided in Section 2.2.3. 1.3.4 Practical Examples The following section provides simplified examples for how a UOL could be used in "real world" application. The examples given are for a fictitious company with branch offices in three cities LA, Dallas, and Tampa. Each office has, three departments sales, Boynton Expires August 2000 [page 4] INTERNET-DRAFT Uniform Object Locator 5 February, 1999 accounting("ACCT"), and customer service("CS"). 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 nested 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.ACCT.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 customer service associate in Tampa. "//..branch/..dept/..log/hours/total#Tampa.CS.Carter" "//..branch/..dept/..log/hours/overtime#Tampa.CS.Carter" "//..branch/..dept/..log/hours/vacation#Tampa.CS.Carter" The next example shows a relative UOL for the employee above (Carter). The record also introduces a transient object called "car". The object is identified as transient because all employees under the "log" object do not have company cars. "/..dept/..log/@..car/miles#CS.Carter.ford22" 2 Objects 2.1 Object Element An object element is a directory that declares its sub-elements to collectively represent a data object. An object element MUST have a prefix of ".." (dot,dot) and, is always accompanied by a trailing "/" (forward slash). Note The value "../" is reserved for resolving a partial UOL and is NOT considered an object element. 2.2.1 Assigning Names Each object element is assigned a name element. The name element is appended to the object name(if any) inherited from the parent director. The object name is appended to the end of the UOL following the fragment delimiter "#" (cross hatch). The new object name is then inherited by all sub-directories of the object element. example "/..object/sub_dir/field#name" Boynton Expires August 2000 [page 5] INTERNET-DRAFT Uniform Object Locator 5 February, 1999 2.2.2 Nested Objects Any object element contained by another is a "nested" object. The name element assigned to the nested object is appended to the object name inherited from its parent. The nested name element is delimited from the object name by a '.'(dot) character. example "/..parent_object/..nested_object/field#parent_name.nested_name" 2.2.3 Resolving Name Elements In general, the object constructor of a UOL is resolved the same 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: "//..object1/sub_dir/..object2/field#name1.name2" rel UOL = field_2 result = "//..object1/sub_dir/..object2/field_2#name1.name2" rel UOL = ..object3/field_3#name3 result = "//..object1/sub_dir/..object2/..object3/field_3#name1.name2.name3" rel UOL = ../field_2 result = "//..object1/sub_dir/field_2#name1" rel UOL = ../..object3/field_3#name3 result = "//..object1/sub_dir/..object3/field_3#name1.name3" rel UOL = ../sub_dir_2/field_4 result = "//..object1/sub_dir/sub_dir_2/field_4#name1" 2.3 Group Elements The group element provides a three dimensional branching node for collecting related named 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 2.2.1. The group element is defined with the same directory reference as the object elements it contains. This is possible because object naming semantics guarantee that all will have different names. Therefore, defining a separate directory would add unnecessary length to the UOL. A '~' is used to directly reference a group element. Use of this marker helps facilitates parsing and preserve "human readability" by making the reference unambiguous; Section 1.3.2. Boynton Expires August 2000 [page 6] INTERNET-DRAFT Uniform Object Locator 5 February, 1999 example group element = "/..object1/..object2/~#objectName1" object element = "/..object1/..object2/#objectName1.objectName2" 2.4 Default Object The name "DEFAULT" (all upper case) is reserved for naming a default object element. Applications can use the default object for storing schemas or a DTD. The default object also provides a container for default values. Applications that do not wish to provide this function should return a value equivalent to null when a default value is requested. 3 Reserved UOL Parameters This section provides an extendable set of UOL parameters and defines their use. The parameters add command and function capability to the UOL scheme. 3.1 Group Parameters UOL reserves the following terms to provide interaction with objects contained in a group element directory. ~NAMES or NAMES = Used to retrieve or update a line delimited string of names. Each name represents a named object element in the group. The names provided in the string are extensions to the name inherited from the group element. The full object name is represented by a combination of the two. An application can use this list to allocate resources and/or perform special functions prior to loading data. This is a dynamic list that, when updated, will create\remove objects. The example below returns a list of names for "object2". example group element = "/..object1/..object2/~NAMES#objectName1" ~SCHEMA = Used to retrieve or define a line delimited list of UOL strings representing a schema or DTD for Objects in the group. The list provides partial UOL constructors that will resolve correctly when combined with the group element path. Each element path is enumerated in turn. The object name fragment (if any) is removed. Elements below nested group elements (if any) are ignored. ~AKA (Also Known As) = Used to retrieve or update a line delimited string of alternate object references. For example an object called "records" could use ~AKA="journal,log" to improve interpretability between schemas. ~FUNCTIONS = Used to retrieve or update a line delimited list of functions used to interact with object data. functions should be Boynton Expires August 2000 [page 7] INTERNET-DRAFT Uniform Object Locator 5 February, 1999 stated in a form consistent with a "classid" URI; Section 13.3 [REC html 4.01]. ~function() = refers to any function contained in a list returned by invoking "~FUNCTIONS". Where a function requires or permits a UOL value, a partial UOL will resolve to the group directory. 3.2 Directory Parameters UOL reserves the following terms to provide information about the structure and content of a directory element. * = Used to retrieve a line delimited string of elements. Each element represents a directory element or attribute within the current directory. Directories are indicated by a leading '/' (forward slash). This parameter is "read-only". The example below returns a list of elements for "object2". example group element = "/..object1/*#objectName1" SCHEMA = Used to retrieve a line delimited list of UOL strings representing a schema or DTD for the directory. Each element path is enumerated in turn. If the directory is in an object, the object name is removed. Elements below nested group elements (if any) are ignored. This parameter is "read-only". FUNCTIONS = Used to retrieve 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 [HTML401]. This parameter is "read-only". Note: The parameters above are "read-only". Updating of lists should only occur at the object level. function() = refers to any function contained in a list returned by invoking "FUNCTIONS". Where a function requires or permits a UOL value, a partial UOL will resolve to the directory. 3.3 Name Element Parameters UOL reserves the following to facilitate naming and retrieving objects. * = wild card object name. Used to retrieve all objects within an object group. [++] = inserts or retrieves an object at the last index position plus one. The objects name is equal to the string value of the position. The example below inserts a name for "object2". Boynton Expires August 2000 [page 8] INTERNET-DRAFT Uniform Object Locator 5 February, 1999 example group element = "/..object1/..object2/attribute#objectName1.[++]" [value] = inserts or retrieves an object at the specified index position. If inserting, the objects name is equal to the string value of the index and the previous objects(if any) is moved to the next higher index. Note: An index value less than '0' or greater than the size of the group should cause an error. 4 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]; 5 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. 6 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 August 2000 [page 9]