view Side-By-Side changes
SIMPLE J. Rosenberg Internet-Draft dynamicsoft Expires:August 15, 2004 February 15,January 14, 2005 July 16, 2004 The Extensible Markup Language (XML) Configuration Access Protocol (XCAP)draft-ietf-simple-xcap-02draft-ietf-simple-xcap-03 Status of this MemoThis document is an Internet-DraftBy submitting this Internet-Draft, I certify that any applicable patent or other IPR claims of which I am aware have been disclosed, andisany of which I become aware will be disclosed, infull conformanceaccordance withall provisions of Section 10 of RFC2026.RFC 3668. 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 athttp:// www.ietf.org/ietf/1id-abstracts.txt.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 onAugust 15, 2004.January 14, 2005. Copyright Notice Copyright (C) The Internet Society (2004). All Rights Reserved. Abstract This specification defines the Extensible Markup Language (XML) Configuration Access Protocol (XCAP). XCAP allows a client to read, write and modify application configuration data, stored in XML format on a server. XCAPis not a new protocol. XCAPmaps XML document sub-trees and element attributes to HTTP URIs, so that these components can be directly accessed by HTTP. Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page 1] Internet-Draft XCAPFebruaryJuly 2004 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Overview of Operation . . . . . . . . . . . . . . . . . . . 5 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . 6 4. Definitions . . . . . . . . . . . . . . . . . . . . . . . . 7 5. Application Usages . . . . . . . . . . . . . . . . . . . .7 4.1. 9 5.1 Application Usage ID (AUID) . . . . . . . . . . . . . . .7 4.29 5.2 Data Validation . . . . . . . . . . . . . . . . . . . . .7 4.39 5.3 Data Semantics . . . . . . . . . . . . . . . . . . . . . .8 4.411 5.4 Naming Conventions . . . . . . . . . . . . . . . . . . . .8 4.5 Data11 5.5 Resource Interdependencies . . . . . . . . . . . . . . . .. . 8 4.611 5.6 Authorization Policies . . . . . . . . . . . . . . . . . .8 4.712 5.7 Data Extensibility . . . . . . . . . . . . . . . . . . . .9 4.7.1 XML Schema12 5.8 Documenting Application Usages . . . . . . . . . . . . . . 13 5.9 Guidelines for Creating Application Usages . . . . . . . . 13 6. URI Construction . . .10 4.8 Documenting Application Usages. . . . . . . . . . . . . .10 5. URI Construction. . . . . 16 6.1 XCAP Root . . . . . . . . . . . . . . . .11 5.1 Identifying the XML. . . . . . . . 16 6.2 Document Selector . . . . . . . . . . . . . . .11 5.2 Identifying the XML Nodes. . . . . 16 6.3 Node Selector . . . . . . . . . . .12 6.. . . . . . . . . . . 18 7. Client Operations . . . . . . . . . . . . . . . . . . . .15 6.1. 22 7.1 Create or Replace a Document . . . . . . . . . . . . . . .15 6.223 7.2 Delete a Document . . . . . . . . . . . . . . . . . . . .15 6.323 7.3 Fetch a Document . . . . . . . . . . . . . . . . . . . . .15 6.423 7.4 Create or Replace an Element . . . . . . . . . . . . . . .16 6.523 7.5 Delete an Element . . . . . . . . . . . . . . . . . . . .17 6.625 7.6 Fetch an Element . . . . . . . . . . . . . . . . . . . . .17 6.726 7.7 Create or Replace an Attribute . . . . . . . . . . . . . .17 6.826 7.8 Delete an Attribute . . . . . . . . . . . . . . . . . . .18 6.927 7.9 Fetch an Attribute . . . . . . . . . . . . . . . . . . . .18 6.10 Read/Modify/Write Transactions27 7.10 Conditional Operations . . . . . . . . . . . . . .19 6.11 Reading Server Assigned Data. . . 27 8. Server Behavior . . . . . . . . . . . .19 7. Server Behavior. . . . . . . . . . 29 8.1 POST Handling . . . . . . . . . . .21 7.1 POST Handling. . . . . . . . . . . 29 8.2 PUT Handling . . . . . . . . . . .21 7.2 PUT Handling. . . . . . . . . . . . 29 8.2.1 Locating the Parent . . . . . . . . . . .22 7.2.1 Detailed Conflict Reports. . . . . . 30 8.2.2 Verifying Document Content . . . . . . . . . .23 7.2.1.1 XML Schema. . . . 30 8.2.3 Creation . . . . . . . . . . . . . . . . . . . .25 7.3 GET Handling. . . 31 8.2.4 Replacement . . . . . . . . . . . . . . . . . . . .27 7.4 DELETE Handling. 32 8.2.5 Validation . . . . . . . . . . . . . . . . . . . .28 7.5 Managing Etags. . 33 8.2.6 Resource Interdependencies . . . . . . . . . . . . . . 33 8.3 GET Handling . . . . . .28 8. Examples. . . . . . . . . . . . . . . . . 34 8.4 DELETE Handling . . . . . . . .30 9. Security Considerations. . . . . . . . . . . . . 34 8.5 Managing Etags . . . .33 10. IANA Considerations. . . . . . . . . . . . . . . . . . 35 9. Detailed Conflict Reports .34 10.1 XCAP Application Usage IDs. . . . . . . . . . . . . . . .34 10.2 application/xml-fragment-body MIME Type36 9.1 Document Structure . . . . . . . . . .34 10.3 application/xml-attribute-value MIME Type. . . . . . . .35 10.4 application/xcap-error+xml MIME Type. . 36 9.2 XML Schema . . . . . . . . . . . . . . . . .36 10.5 URN Sub-Namespace Registration for urn:ietf:params:xml:ns:xcap-must-understand. . . . . . . 3710.6 URN Sub-Namespace Registration for10. XCAP Server Capabilities . . . . . . . . . . . . . . . . . . 41 10.1 Application Usage ID (AUID) . . . . . . . . . . . . . . 41 Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page 2] Internet-Draft XCAPFebruaryJuly 2004urn:ietf:params:xml:ns:xcap-error10.2 XML Schema . . . . . . . . . . . . . .38 10.7 XCAP Error Schema Registration. . . . . . . . . 41 10.3 MIME Type . . . . .38 10.8 XCAP Mandatory Namespace Schema Registration. . . . . . .39 11. Acknowledgements. . . . . . . . . . . 43 10.4 Validation Constraints . . . . . . . . . .40 Normative References. . . . . . . 43 10.5 Data Semantics . . . . . . . . . . . .41 Informative References. . . . . . . . . 43 10.6 Naming Conventions . . . . . . . . . . . . . . . . . . . 43Author's Address10.7 Resource Interdependencies . . . . . . . . . . . . . . . 43 10.8 Authorization Policies . . . . . . . . . . . . . . . . . 43 11. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 44Intellectual Property and Copyright Statements12. Security Considerations . . . . . .45 Rosenberg Expires August 15, 2004 [Page 3] Internet-Draft. . . . . . . . . . . . 47 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . 48 13.1 XCAPFebruary 2004 1. Introduction In many communications applications, such as Voice over IP, instant messaging, and presence, it is necessary for network servers to access per-userApplication Usage IDs . . . . . . . . . . . . . . . 48 13.2 MIME Types . . . . . . . . . . . . . . . . . . . . . . . 48 13.2.1 application/xcap-el+xml MIME Type . . . . . . . . . 48 13.2.2 application/xcap-att+xml MIME Type . . . . . . . . . 49 13.2.3 application/xcap-error+xml MIME Type . . . . . . . . 50 13.2.4 application/xcap-caps+xml MIME Type . . . . . . . . 50 13.3 URN Sub-Namespace Registrations . . . . . . . . . . . . 51 13.3.1 urn:ietf:params:xml:ns:xcap-error . . . . . . . . . 51 13.3.2 urn:ietf:params:xml:ns:xcap-caps . . . . . . . . . . 51 13.4 XML Schema Registrations . . . . . . . . . . . . . . . . 52 13.4.1 XCAP Error Schema Registration . . . . . . . . . . . 52 13.4.2 XCAP Capabilities Schema Registration . . . . . . . 52 14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 53 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 54 15.1 Normative References . . . . . . . . . . . . . . . . . . . 54 15.2 Informative References . . . . . . . . . . . . . . . . . . 55 Author's Address . . . . . . . . . . . . . . . . . . . . . . 56 Intellectual Property and Copyright Statements . . . . . . . 57 Rosenberg Expires January 14, 2005 [Page 3] Internet-Draft XCAP July 2004 1. Introduction In many communications applications, such as Voice over IP, instant messaging, and presence, it is necessary for network servers to access per-user information in the process of servicing a request. This per-user information resides within the network, but is managed by the end user themselves. Its management can be done through a multiplicity of access points, including the web, a wireless handset, or a PC application. Examples of per-user information are presence [18] authorization policy and presence lists. Presence lists are lists of users whose presence is desired by a watcher [26]. One way to obtain presence information for the list of is to subscribe to a resource which represents that list [21]. In this case, the Resource List Server (RLS) requires access to this list in order to process a SIP [15]SUBSCRIBE [28] request for it. Another way to obtain presence for the users on the list is for a watcher to subscribe to each user individually. In that case, it is convenient to have a server store the list, and when the client boots, it fetches the list from the server. This would allow a user to access their resource lists from different clients. Requirements for manipulation of presence lists and authorization policies have been specified by the SIMPLE working group [22]. This specification describes a protocol that can be used to manipulate this per-user data. It is called the Extensible Markup Language (XML) Configuration Access Protocol (XCAP). XCAP is a set of conventions for mapping XML documents and document components into HTTP URIs, rules for how the modification of one resource affects another, data validation constraints, and authorization policies associated with access to those resources. Because of this structure, normal HTTP primitives can be used to manipulate the data. XCAP is based heavily on ideas borrowed from the Application Configuration Access Protocol (ACAP) [25], but it is not an extension of it, nor does it have any dependencies on it. Like ACAP, XCAP is meant to support the configuration needs for a multiplicity of applications, rather than just a single one. Rosenberg Expires January 14, 2005 [Page 4] Internet-Draft XCAP July 2004 2. Overview of Operation Each application that makes use of XCAP specifies an application usage (Section 5). This application usage defines the XML schema [2] for the data used by the application, along with other key pieces of information. The principal task of XCAP is to allow clients to read, write, modify, create and delete pieces of that data. These operations are supported using HTTP 1.1 [5]. An XCAP server acts as a repository for collections of XML documents. There will be documents stored for each application. Within each application, there are documents stored for each user. Each user can have a multiplicity of documents for a particular application. To access some component of one of those documents, XCAP defines an algorithm for constructing a URI that can be used to reference that component. Components refer to any element or attribute within the document. Thus, the HTTP URIs used by XCAP point a document, or to pieces of information that are finer grained than the XML document itself. An HTTP resource which follows the naming conventions and validation constraints defined here is called an XCAP resource. Since XCAP resources are also HTTP resources, they can be accessed using HTTP methods. Reading an XCAP resource is accomplished with HTTP GET, creating or modifying one is done with HTTP PUT, and removing one of the resources is done with an HTTP DELETE. Properties that HTTP associates with resources, such as entity tags, also apply to XCAP resources. Indeed, entity tags are particularly useful in XCAP, as they allow a number of conditional operations to be performed. Rosenberg Expires January 14, 2005 [Page 5] Internet-Draft XCAP July 2004 3. Terminology In this document, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in RFC 2119 [6] and indicate requirement levels for compliant implementations. Rosenberg Expires January 14, 2005 [Page 6] Internet-Draft XCAP July 2004 4. Definitions The following terms are used throughout this document: XCAP Resource: An HTTP resource representing an XML document, an element within an XML document, or an attribute of an element within an XML document that follows the naming and validation constraints of XCAP. XCAP Server: An HTTP server that understands how to follow the naming and validation constraints defined in this specification. Application: A collection of software components within a network whose operation depends on data managed and stored on an XCAP server. Application Usage: Detailed information on the interaction of an application with the XCAP server. Application Unique ID (AUID): A unique identifier that differentiates XCAP resources accessed by one application from XCAP resources accessed by another. Naming Conventions: The part of an application usage that specifies well-known URIs used by an application, or more generally, specifies the URIs that are typically accessed by an application during its processing. XCAP User Identifier (XUI): The XUI is a string, valid as a path element in an HTTP URI, that is associated with each user served by the XCAP server. XCAP Root: A context that contains all of the documents across all application usages and users that are managed by the server. Document Selector: A sequence of path segments, with each segment being separated by a "/", that identify the XML document within an XCAP root that is being selected. Node Selector: A sequence of path segments, with each segment being separated by a "/", that identify the XML node (element or attribute) being selected within a document. Path Separator: A single path segment equal to two tilde characters (~~) that is used to separate the document selector from the node selector within an HTTP URL. Document URI: The HTTP URI containing the XCAP root and document selector, resulting in the selection of a specific document. As a result, performing a GET against the document URI would retrieve the document. Node URI: The HTTP URI containing the XCAP root, document selector, path separator and node selector, resulting in the selection of a specific XML node. XCAP Root URI: An HTTP URI that representing the XCAP root. Although a valid URI, the XCAP Root URI does not correspond to an actual resource. Rosenberg Expires January 14, 2005 [Page 7] Internet-Draft XCAP July 2004 Global Tree: A URI that represents the parent for all global documents for a particular application usage within a particular XCAP root. Home Directory: A URI that represents the parent for all documents for a particular user for a particular application usage within a particular XCAP root. Positional Insertion: A PUT operation that results in the insertion of a new element into a document such that its position relative to other children of the same parent is set by the client. Rosenberg Expires January 14, 2005 [Page 8] Internet-Draft XCAP July 2004 5. Application Usages Each XCAP resource on a server is associated with an application. In order for an application to use those resources, application specific conventions must be specified. Those conventions include the XML schema that defines the structure and constraints of the data, well known URIs to bootstrap access to the data, and so on. All of those application specific conventions are defined by the application usage. 5.1 Application Usage ID (AUID) Each application usage is associated with a name, called an Application Unique ID (AUID). This name uniquely identifies the application usage, and is different from AUIDs used by other applications. AUIDs exist in one of two namespaces. The first namespace is the IETF namespace. This namespace contains a set of tokens, each of which is registered with IANA. These registrations occur with the publication of standards track RFCs [27] based on the guidelines in Section 13. The second namespace is the vendor-proprietary namespace. Each AUID in that namespace is prefixed with the reverse domain name name of the organization creating the AUID, followed by a period, followed by any vendor defined token. As an example, the example.com domain can create an AUID with the value "com.example.foo" but cannot create one with the value "org.example.foo". AUIDs within the vendor namespace do not need to be registered with IANA. The vendor namespace is also meant to be used in lab environments where no central registry is needed. The syntax for AUIDs, expressed in ABNF [11] (and using some of the BNF defined in RFC 2396 [12]) is: AUID = global-auid / vendor-auid global-auid = auid auid = alphanum / mark vendor-auid = rev-hostname "." auid rev-hostname = toplabel *( "." domainlabel ) domainlabel = alphanum / alphanum *( alphanum / "-" ) alphanum toplabel = ALPHA / ALPHA *( alphanum / "-" ) alphanum 5.2 Data Validation One of the responsibilities of an XCAP server is to validate the content of each XCAP resource when an XCAP client tries to modify one. This is done using two mechanisms. Firstly, all application usages MUST describe their document contents using XML schema [2]. Rosenberg Expires January 14, 2005 [Page 9] Internet-Draft XCAP July 2004 The application usage MUST also identify the MIME type for documents compliant to that schema. Unfortunately, XML schemas cannot represent every form of data constraint. As an example, one XML element may contain an integer which defines the maximum number of instances of another element. This constraint cannot be represented with XML schema. However, such constraints may be important to the application usage. The application usage defines any additional constraints beyond those in the schema. Of particular importance are uniqueness constraints. In many cases, an application will require that there only be one instance of some element or attribute within a particular scope. Each uniqueness constraint needs to be specified by identifying the field, or combinations of fields, that need to be unique, and then identifying the scope in which that uniqueness applies. One typical scope is the set of all elements of a certain name within the same parent. Another typical scope is the set of all URIs valid within a particular domain. In some cases these constraints can be specified using XML schema, which provides the <unique> element for this purpose. Other uniqueness constraints, such as URI uniqueness across a domain, cannot be expressed by schema. Whether or not the schema is used to express some of the uniqueness requirements, the application usage MUST specify all uniqueness requirements when it defines its data validation needs. For example, the resource lists application usage [23] requires that each <list> element have a unique value for the "name" attribute within a single parent. As another example, the RLS services application usage [23] requires that the value of the "uri" attribute of the <service> element be a URI that is unique within the domain of the URI. Another form of constraint are URI constraints. These are constraints on the scheme or structure of the scheme specific part of the URI. These kinds of constraints cannot be expressed in an XML schema. If these constraints are important to an application usage, they need to be explicitly called out. As an example, the resource lists application usage requires that the URI present in the "uri" attribute of the <entry> element be either a SIP or pres URI [24]. Another important data constraint is referential integrity. Referential integrity is important when the name or value of an element or attribute is used as a key to select another element or attribute. An application usage MAY specify referential integrity constraints. However, XCAP servers are not a replacement for Relational Database Management Systems (RDBMS), and therefore servers Rosenberg Expires January 14, 2005 [Page 10] Internet-Draft XCAP July 2004 are never responsible for maintaining referential integrity. XCAP clients are responsible for making all of the appropriate changes to documents in order to maintain referential integrity. The data validation information is consumed by both clients, which use them to make sure they construct requests that will be accepted by the server, and by servers, which validate the constraints when they receive a request (with the exception of referential integrity constraints, which are not validated by the server). 5.3 Data Semantics For each application usage, the data present in the XML document has a well defined semantic. The application usage defines that semantic, so that a client can properly construct a document in order to achieve the desired result. They are not used by the server, as it is purposefully unaware of the semantics of the data it is managing. The data semantics are expressed in English prose by the application usage. 5.4 Naming Conventions In addition to defining the meaning of the document in the context of a particular application, an application usage has to specify how the applications obtain the documents they need. In particular, it needs to define any well-known URIs used for bootstrapping purposes, and document any other conventions on the URIs used by an application. It should also document how documents reference each other. These conventions are called naming conventions. As an example, the RLS services application usage allows an RLS to obtain the contents of a resource list when the RLS receives a SUBSCRIBE request for a SIP URI identifying an RLS service. The application usage specifies that the list of service definitions is present within a specific document with a specific name within the global tree. This allows the RLS to perform a single XCAP request to fetch the service definition for the service associated with the SIP URI in a SUBSCRIBE request. Naming conventions are used by XCAP clients to construct their URIs. The XCAP server does not make use of them. 5.5 Resource Interdependencies When a user modifies an XCAP resource, the content of many other resources is affected. For example, when a user deletes an XML element within a document, it does so by issuing a DELETE request against the URI for the element resource. However, deleting this Rosenberg Expires January 14, 2005 [Page 11] Internet-Draft XCAP July 2004 element also deletes all child elements and their attributes, each of which is also an XCAP resource. As such, manipulation of one resource affects the state of other resources. For the most part, these interdependencies are fully specified by the XML schema used by the application usage. However, in some application usages, there is a need for the server to relate resources together, and such a relationship cannot be specified through a schema. This occurs when changes in one document need to affect another document. Typically, this is the case when an application usage is defining a document that acts as a collection of information defined in other documents. As an example, when a user creates a new RLS service (that is, it creates a new <service> element within an RLS services document), the server adds that element to a read-only global list of services maintained by the server in the global tree. This read-only global list is accessed by the RLS when processing a SIP SUBSCRIBE request. Resource interdependencies are used by both XCAP clients and servers. 5.6 Authorization Policies By default, each user is able to access (read, modify, and delete) all of the documents below their home directory, and any user is able to read documents within the global directory. However, only trusted users, explicitly provisioned into the server, can modify global documents. The application usage can specify a different authorization policy that applies to all documents associated with that application usage. An application usage can also specify whether another application usage is used to define the authorization policies. An application usage for setting authorization policies can also be defined subsequent to the definition of the the main application usage. In such a case, the main application usage needs only to specify that such a usage will be defined in the future. If an application usage does not wish to change the default authorization policy, it can merely state that the default policy is used. The authorization policies defined by the application usage are used by the XCAP server during its operation. 5.7 Data Extensibility An XCAP server MUST understand an application usage in order to Rosenberg Expires January 14, 2005 [Page 12] Internet-Draft XCAP July 2004 process an HTTP request made against a resource for that particular application usage. However, it is not required for the server to understand all of the contents of a document used by an application usage. A server is required to understand the baseline schema defined by the application usage. However, those schemas can define points of extensibility where new content can be added from other namespaces and corresponding schemas. Sometimes, the server will understand those namespaces and therefore have access to their schemas. Sometimes, it will not. A server MUST allow for documents that contain elements from namespaces not known to the server. In such a case, the server cannot validate that such content is schema compliant; it will only verify that the XML is well-formed. If a client wants to verify that a server supports a particular namespace before operating on a resource, it can query the server for its capabilities using the XCAP Capabilities application usage, discussed in Section 10. 5.8 Documenting Application Usages Application usages are documented in specifications which convey the information described above. In particular, an application usage specification MUST provide the following information: o Application Usage ID (AUID): If the application usage is meant for general use on the Internet, the application usage MUST register the AUID into the IETF tree using the IANA procedures defined in Section 13. o XML Schema o MIME Type o Validation Constraints o Data Semantics o Naming Conventions o Resource Interdependencies o Authorization Policies 5.9 Guidelines for Creating Application Usages The primary design task when creating a new application usage is to define the schema. Although XCAP can be used with any XML document, intelligent schema design will improve the efficiency and utility of the document when it is manipulated with XCAP. XCAP provides three fundamental ways to select elements amongst a set of siblings - by the name of the element, by its position, or by the value of a specific attribute. Positional selection always allows a client to get exactly what it wants. However, it requires a client Rosenberg Expires January 14, 2005 [Page 13] Internet-Draft XCAP July 2004 to cache a copy of the document in order to construct the predicate. Furthermore, if a client performs a PUT, it requires the client to reconstruct the PUT processing that a server would follow in order to update its local cached copy. Otherwise, the client will be forced to re-GET the document after every PUT, which is inefficient. As such, it is a good idea to design schemas such that common operations can be performed without requiring the client to cache a copy of the document. Without positional selection, a client can pick the element at each step by its name or the value of an attribute. Many schemas include elements that can be repeated within a parent (often, minOccurs equals zero or one, and maxOccurs is unbounded). As such, all of the elements have the same name. This leaves the attribute value as the only way to select an element. Because of this, if an application usage expects user to manipulate elements or attributes that are descendants of an element which can repeat, that element SHOULD include, in its schema, an attribute which can be suitably used as a unique index. Furthermore, the naming conventions defined by that application usage SHOULD specify this uniqueness constraint explicitly. URIs often make a good choice for such unique index. They have fundamental uniqueness properties, and are also usually of semantic significance in the application usage. However, care must be taken when using a URI as an attribute value. URI equality is ususally complex. However, attribute equality is performed by the server using XML rules, which are based on case sensitive string comparison. Thus, XCAP will match URIs based on lexical equality, not functional equality. In such cases, an application usage SHOULD consider these implications carefully. XCAP provides the ability of a client to operate on a single element, attribute or document at a time. As a result, it may be possible that common operations the client might perform will require a sequence of multiple requests. This is inefficient, and introduces the possibility of failure conditions when another client modifies the document in the middle of a sequence. In such a case, the client will be forced to detect this case using entity tags (discussed below in Section 7.10), and undo its previous changes. This is very difficult. As a result, the schemas SHOULD be defined so that common operations generally require a single request to perform. Consider an example. Lets say an application usage is defining permissions for users to perform certain operations. The schema can be designed in two ways. The top level of the tree can identify users, and within each user, there can be the permissions associated with the user. In an Rosenberg Expires January 14, 2005 [Page 14] Internet-Draft XCAP July 2004 alternative design, the top level of the tree identifies each permission, and within that permission, the set of users who have it. If, in this application usage, it is common to change the permission for a user from one value to another, the former schema design is better for xcap; it will require a single PUT to make such a change. In the latter case, either the entire document needs to be replaced (which is a single operation), or two PUT operations need to occur - one to remove the user from the old permission, and one to add the user to the new permission. Naming conventions form another key part of the design of an application usage. The application usage should be certain that XCAP clients know where to "start" to retrieve and modify documents of interest. Generally, this will involve the specification of a well-known document at a well-known URI. That document can contain references to other documents that the client needs to read or modify. Rosenberg Expires January 14, 2005 [Page 15] Internet-Draft XCAP July 2004 6. URI Construction In order to manipulate an XCAP resource, the data must be represented by an HTTP URI. XCAP defines a specific naming convention for constructing these URIs. The URI is constructed by concatenating the XCAP root with the document selector with the path separator with a escape coded form of the node selector. The XCAP root is the enclosing context in which all XCAP resources live. The document selector is a path that identifies a document within the XCAP root. The path separator is a path segment with a value of double tilde (~~). It is piece of syntactic sugar that separates the document selector from the node selector. The node selector is an expression that identifies an XML element within a document. The sections below describe these components in more detail. 6.1 XCAP Root The root of the XCAP hierarchy is called the XCAP root. It defines the context in which all other resources exist. The XCAP root is represented with an HTTP URI, called the XCAP Root URI. This URI is a valid HTTP URL; however, it doesnt point to any resource that actually exists on the server. Its purpose is to identify the root of the tree within the domain where all XCAP documents are stored. It can be any valid HTTP URL, but MUST NOT contain a query string. As an example, http://xcap.example.com/services might be used as the XCAP root URI within the example.com domain. Typically, the XCAP root URI is provisioned into client devices. A server or domain MAY support multiple XCAP root URIs. In such a case, it is effectively operating as if it were serving separate domains. There is never information carryover or interactions between resources in different XCAP root URIs. 6.2 Document Selector Each document within the XCAP root is identified by its document selector. The document selector is a sequence of path segments, separated by a slash ("/"). These path segments define a hierarchical structure for organizing documents within any XCAP root. The first path segment MUST be the XCAP AUID. So, continuing the example above, all of the documents used by the resource lists application would be under http://xcap.example.com/services/resource-lists. It is assumed that each application will have data that is set by users, and/or it will have global data that applies to all users. As a result, beneath each AUID there are two sub-trees. One, called "users", holds the documents that are applicable to specific users, Rosenberg Expires January 14, 2005 [Page 16] Internet-Draft XCAP July 2004 and theprocessother, called "global", holds documents applicable to all users. The subtree beneath "global" is called the global tree. The path segment after the AUID MUST either be "global" or "users". Within the "users" tree are zero or more sub-trees, each ofservicingwhich identifies documents that apply to arequest. This per-user information resides withinspecific user. Each user known to thenetwork, butserver ismanaged byassociated with a username, called theend user themselves. Its management canXCAP User Identifier (XUI). This XUI MUST bedone through a multiplicity of access points, includingused as theweb, a wireless handset, orpath segment beneath the "users" segment. The subtree beneath an XUI for aPC application. Examples of per-user information are presence [17] authorization policy and presence lists. Presence lists are lists of users whose presenceparticular user isdesired bycalled their home directory. "User" in this context should be interpreted loosely; awatcher. One wayuser might correspond toobtain presence informationdevice, forthe list of isexample. XCAP does not itself define what it means for documents tosubscribe"apply" to aresourceuser, beyond specification of a baseline authorization policy, described below in Section 8. Each application usage can specify additional authorization policies whichrepresents that list [20]. In this case,depend on data used by theResource List Server (RLS) requires access toapplication itself. The remainder of the document selector (the path following "global" or the XUI) is not constrained by thislist in order to process a SIP [15]SUBSCRIBE [25] request for it. Another wayspecification. The application usage MAY introduce constraints, or may allow any structure toobtain presence forbe used. The final path segment in the document selector identifies theusers onactual document in thelisthierarchy. This isfor a watcher to subscribeequivalent toeach user individually. Ina filename, except thatcase, it is convenient to haveXCAP does not require that its document resources be stored as files in aserver storefile system. However, thelist, and whenterm "filename" is used to describe theclient boots, it fetchesfinal path segment in thelist fromdocument selector. In traditional filesystems, theserver. Thisfilename wouldallow a user to access their resource lists from different clients. Requirements for manipulation of presence lists and authorization policieshavebeen specified by the SIMPLE working group [21]. This specification describesaprotocolfilename extension, such as ".xml". There is nothing in this specification thatcan berequires or prevents such extensions from being usedto manipulate this per-user data. It is calledin theExtensible Markup Language (XML) Configuration Access Protocol (XCAP). XCAP is not a new protocol. Rather, it isfilename. In some cases, the application usage will specify aset of conventionsnaming convention formapping XML documentsdocuments, anddocument components into HTTP URIs, rules for howthose naming conventions may or may not specify a file extension. For example, in themodification of one resource affects another, data validation constraints, and authorization policies associatedRLS services application usage [23], documents in the user's home directory withaccess to those resources. Because of this structure, normal HTTP primitives canthe filename "index" will be used by the server tomanipulatecompute thedata. XCAPglobal index, which isbased heavily on ideas borrowed fromalso a document with theApplication Configuration Access Protocol (ACAP) [23], butfilename "index". When the naming conventions in an application usage do not constrain the filename conventions (or, more generally, the document selector), an application will know the filename (or more generally, the document selector) because it isnot an extension of it, nor does it have any dependencies on it. Like ACAP, XCAPincluded as a reference in a document which ismeant to supportat a well known location. As another example, within theconfiguration needs forindex document defined by RLS services, the <service> element has amultiplicity of applications, rather than justchild element called <resource-list> whose content is asingle one.URI pointing to a resource list within the users home directory. Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page4]17] Internet-Draft XCAPFebruaryJuly 20042. Overview of Operation Each applicationAs a result, if the user creates a new document, and then references thatmakes use of XCAP specifies an application usage (Section 4). This application usage definesdocument from a well-known document (such as theXML schema [2] forindex document above), it doesn't matter whether thedata used byuser includes an extension in theapplication, along with other key pieces of information. The principal task of XCAP is to allow clients to read, write, modify, create and delete pieces of that data. These operations are supported using HTTP 1.1 [5]. An XCAP server actsfilename or not, asa repository for collections of XML documents. There will be documents stored for each application. Within each application, there are documents stored for each user. Eachlong as the usercan have a multiplicity of documents for a particular application. To access some componentis consistent and maintains referential integrity. Indeed, it doesn't even matter what the rest ofonethe filename is, independent ofthose documents, XCAP defines an algorithm for constructingwhether it has aURI that can be used to reference that component. Components refer to any subtreefilename extension or not. 6.3 Node Selector The node selector specifies specific nodes of thedocument,XML document which are to be accessed. A node refers to either an XML element oranyan attributefor anyof an element. The node selector is an expression which identifies an elementwithinor attribute. Its grammar is: node-selector = element-selector ["/" attribute-selector] element-selector = step *( "/" step) step = by-name / by-pos / by-attr / by-pos-attr by-name = NameorAny by-pos = NameorAny "[" position "]" position = 1*DIGIT by-attr = NameorAny "[" "@" att-name "=" <"> att-value <"> "]" by-pos-attr = NameorAny "[" position "]" "[" "@" att-name "=" <"> att-value <"> "]" NameorAny = QName / "*" ; QName from XML Namespaces att-name = QName att-value = AttValue ; from XML specification attribute-selector = "@" att-name The QName grammar is defined thedocument. Thus,XML namespaces [3] specification, and theHTTP URIs used by XCAP point to pieces of information that are finer grained thanAttValue grammar is defined in the XMLdocument itself. With a standardized naming convention for mapping components ofspecification XMLdocuments to HTTP URIs, the basic operations for accessing1.0 [1]. Note that thedataleft bracket, right bracket, and double quote characters, which areprovided by existing HTTP primitives. Reading one ofmeaningful to XCAP, cannot be directly represented in thecomponents is accomplished withHTTPGET, creating or modifying one ofURI. As a result, they are escape coded when placed within thecomponents is done with anHTTPPUT, and removing one ofURI. Similarly, thecomponents is done with an HTTP DELETE. To provide atomic read/ modify/write operations, HTTP entity tags are used. Rosenberg Expires August 15, 2004 [Page 5] Internet-Draft XCAP February 2004 3. Terminology In this document,XML specification defines the QName production for thekey words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",grammar for element and"OPTIONAL"attribute names, and the AttValue production for the attribute values. Unfortunately, the characters permitted by these productions include some that aretonot allowed for pchar, which is the production for the allowed set of characters in path segments in the URI. The AttValue production allows many such characters within the US-ASCII set, including the space. Those characters MUST beinterpreted as describedescaped coded when placed inRFC 2119 [6]the URI. Furthermore, QName andindicate requirement levels for compliant implementations.Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page6]18] Internet-Draft XCAPFebruaryJuly 20044. Application Usages A central concept in XCAP is that of an application usage. An application usage defines the way in which a specific application makes useAttValue allow many Unicode characters, outside ofXCAP. 4.1 Application Usage ID (AUID) Each application usage is associated with a name, called an AUID. This name uniquely identifies the application usage, and is different from all other AUIDs. AUIDs existUS-ASCII. When these characters need to be represented inone of two namespaces. The first namespace istheIETF namespace. This namespace contains a set of tokens, each of which is registered with IANA. These registrations occur withHTTP URI, they are escape coded. To do this, thepublication of standards track RFCs [24] based ondata should be encoded first as octets according to theguidelinesUTF-8 character encoding [17] and then only those octets that do not correspond to characters inSection 10. The second namespace isthevendor-proprietary namespace. Each AUID in that namespace is prefixed withunreserved set should be percent-encoded. For example, thereverse domain name name ofcharacter A would be represented as "A", theorganization creatingcharacter LATIN CAPITAL LETTER A WITH GRAVE would be represented as "%C3%80", and theAUID, followed by a period, followed by any vendor defined token.character KATAKANA LETTER A would be represented as "%E3%82%A2". Asan example,a result, theexample.com domain can create an AUID withgrammar above represents thevalue "com.example.foo" but cannot create one withexpressions processed by thevalue "org.example.foo". AUIDs withinXCAP server internally after it has un-escape-coded thevendor namespace do not need to be registered with IANA.URL. Thevendor namespace is also meant to be used in lab environments where no central registryon-the-wire format isneeded. The syntax for AUIDs, expressed in ABNF [11] (and using some of the BNF defined indictated by RFC 2396[12]) is: AUID = global-auid / vendor-auid global-auid = auid auid = alphanum / mark vendor-auid = rev-hostname "." auid rev-hostname = toplabel *( "." domainlabel ) domainlabel = alphanum / alphanum *( alphanum / "-" ) alphanum toplabel = ALPHA / ALPHA *( alphanum / "-" ) alphanum 4.2 Data Validation One of[12]. In theresponsibilities ofdiscussions an examples below, theserver isnode selectors are presented in their internal format prior tovalidateencoding when not part of an HTTP URL. If an example includes a node selector within an HTTP URL, it is presented in its escape coded form. The node selector is based on thedata generated byconcepts in XPath [9]. Indeed, theclient. Thisnode selector expression, before it isdone using two mechanisms. Firstly, all application usages MUST describe their document contents using XML schema [2]. Unfortunately, XML schemas cannot represent every formescape coded for representation in the HTTP URL, happens to be a valid XPath expression. However, XPath provides a set ofdata constraint. As an example, onefunctionality far richer than is needed here, and its breadth would introduce much unneeded complexity into XCAP. To determine the XML elementmay contain an integer which definesor attribute selected by themaximum number of instancesnode selector, processing begins at the root ofanother element. This constraint cannot be represented with XML schema. However, such constraints may be important totheapplication usage.XML document. Theapplication usage defines any additional constraints beyond those Rosenberg Expires August 15, 2004 [Page 7] Internet-Draft XCAP February 2004first step in theschema. 4.3 Data Semantics For each application usage,element selector is then taken. Each step chooses a single XML element within thedata present incurrent document context. The document context is the point within the XML documenthasfrom which awell defined semantic.specific step is evaluated. Theapplication usage defines that semantic, so that a client can properly construct adocumentin order to achieve the desired result. 4.4 Naming Conventions In addition to definingcontext begins at themeaningroot of thedocument indocument. When a step determines an element within that context, that element becomes the new context for evaluation of the next step. Each step can select an element by its name, by aparticular application,combination of name andapplication usage has to specify how elements in that application obtainattribute value, by name and position, or by name, position and attribute. In all cases, thevarious documents necessary forname can be wildcarded, so that all elements get selected. The selection operation operates as follows. Within the current document context, the children of thatapplication. In particular, what the relevant URIscontext arethat point to documents used byenumerated in document order. If the context is the document, its child is the root element in the document. If theapplication. Ascontext is anexample, one application that can make useelement, its children are all ofXCAPthe children of that element (naturally). Next, those elements whose name is not aSIP event list subscription [20]. In this application, an entitymatch for NameorAny are discarded. An elements name isdefined calledaResource List Server (RLS). Whenmatch if NameorAny is theRLS receives a subscription to a SIP URI that representswildcard, or, if its not alist, it "expands"wildcard, thelist and subscribes to its members.element name matches NameorAny. Matching is discussed below. TheXCAP resourceresult is an ordered listapplication usage [22] specifies how the RLS uses XCAP to find the XML document that defines the contentsof elements. Rosenberg Expires January 14, 2005 [Page 19] Internet-Draft XCAP July 2004 The elements in thelist. These conventionslist aredefined as naming conventions. 4.5 Data Interdependencies In many cases, when a user modifies an XCAP resource, other data managedfurther filtered by theserver needs to change as well. Such interdependenciespredicates, which areapplication usage dependent. As an example, when a user performs a PUT operation to create a new presence list,theserver may need to fillexpressions in square brackets following NameorAny. Each predicate further prunes theURI associated with thatelements from the current ordered list. Theseinterdependencies need to be specified bypredicates are evaluated in order. If theapplication usage. 4.6 Authorization Policies By default, an XCAP server will only allow a user to access (read, write, delete or modify) their own documents. The application usage can specify differing default authorization policies. An application usage can also specify whether another application usagecontent of the content isused to definea position, theauthorization policies. An application usage for setting authorization policies can also be defined subsequent toposition-th element is selected, and all others are discarded. If there are fewer elements in thedefinition oflist than the value of position, themain application usage. In suchresult is acase,no-match. If themain application usage needs only to specify that such a usage will be defined incontent of thefuture. Rosenberg Expires August 15, 2004 [Page 8] Internet-Draft XCAP February 2004 4.7 Data Extensibility An XCAP server MUST understand an application usage in order to processpredicate is anHTTP request made against a resource forattribute name and value, all elements possessing thatparticular application usage. However, it is not required for the server to understandattribute with that value are selected, and allof the contents ofothers are discarded. Note that elements cannot be selected based on any namespace attributes. That is, adocument used bystep like el-name[@xmlns="namespace"] will never match anapplication usage. A serverelement, even if there isrequired to understand the baseline schema defined byan element in theapplication usage. However, those schemas can define pointslist that specifies a default namespace ofextensibility where new content can be added from other namespaces and corresponding schemas. Sometimes,"namespace". If there are no elements with attributes having theserver will understand those namespacesgiven name andthereforevalue, the result is a no-match. After the predicates haveaccess to their schemas. Sometimes, itbeen applied, the result willnot. A serverbe a no-match, one element, or multiple elements. If the result is multiple elements, the node selector is invalid. Each step in a node selector MUSTallowproduce a single element to form the context fordocuments that contain elements from namespaces not knownthe next step. This is more restrictive than general XPath expressions, which allow a context to contain multiple elements. If theserver. In suchresult is acase,no-match, theserver cannot validate that such contentnode selector is invalid. The node selector isschema compliant; it willonlyverify thatvalid if a single element was selected. This element becomes theXML is well-formed. Unfortunately, it may becontext for thecase that a client needsevaluation of theserver to understand these new namespacesnext step inorder to process a document. This will bethecase whennode selector expression. Once thenew content contains data interdependcies thatlast step is executed, if there is no attribute selector, the result of the node selection is the last selected element. If there is an attribute selector, the serverhaschecks tounderstand. To allow for this, this specification definessee if there is anXML element called "mandatory-ns". A server will look forattribute with that name in thepresence of thiselementasin thechild ofcurrent context. If there is not, therootresult is considered a no-match. Otherwise, that attribute is selected. Note that namespace attributes (such as xmlns) cannot be selected. As a result, once the entire nodeof any document. If it finds it,selector is evaluated against theserverdocument, the result willmake sure that iteither be a no-match, invalid, or a single element or single attribute. Matching of element names and attributes isfamiliar with anyperformed as follows. All elements and attributes are expanded as described in XML namespaces(and their corresponding schemas) listed there.[3]. Theimplication iselement and attribute names in the step being evaluated are also expanded. This expansion form requires that any namespace prefixes in theschema for all XCAP application usages MUST allowQName be expanded. This expansion is done using the namespace bindings that are in scope for the"mandatory-ns" element to be present ascurrent context element. Like attributes, if the QName within achild ofstep has no namespace prefix, theroot node of any document.namespace URI is null. The comparisons are Rosenberg Expires January 14, 2005 [Page 20] Internet-Draft XCAP July 2004 then done against these expanded forms [[TODO: This is the rules in XPath, but I dont see how they canbe done by explicitly importing its namespacework. Need to check up on that.]] Comments, text content, andincluding itprocessing declarations in theschema, or allowing elements from other namespaces toXML document cannot be selected by the expressions defined here. Of course, if such information is present in a document, and a user selects an XML element enclosing that data, that information would be included in a resulting GET, for example. As an example, consider theschema as children offollowing XML document: <?xml version="1.0"?> <watcherinfo xmlns="urn:ietf:params:xml:ns:watcherinfo" version="0" state="full"> <watcher-list resource="sip:professor@example.net" package="presence"> <watcher status="active" id="8ajksjda7s" duration-subscribed="509" event="approved" >sip:userA@example.net</watcher> <watcher status="pending" id="hh8juja87s997-ass7" display-name="Mr. Subscriber" event="subscribe">sip:userB@example.org</watcher> </watcher-list> </watcherinfo> Example XML Document Figure 3 The node selector "watcherinfo/watcher-list/ watcher[@id="8ajksjda7s"]" would select theroot node.following XML element: <watcher status="active" id="8ajksjda7s" duration-subscribed="509" event="approved" >sip:userA@example.net </watcher> Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page9]21] Internet-Draft XCAPFebruaryJuly 20044.7.1 XML Schema <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="urn:ietf:params:xml:ns:xcap-must-understand" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:ietf:params:xml:ns:xcap-must-understand" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="mandatory-ns"> <xs:complexType> <xs:sequence> <xs:element name="ns" type="xs:anyURI" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> 4.8 Documenting Application Usages Application usages are documented in specifications which convey the information described above. In particular,7. Client Operations An XCAP client is anapplication usage specification MUST provideHTTP 1.1 compliant client. Specific data manipulation tasks are accomplished by invoking thefollowing information: Application Usage ID (AUID): The application usage MUST registerright set of HTTP methods with theAUID usingright set of headers on theIANA procedures definedserver. This section describes those inSection 10. MIME Type: Each application usage will havedetail. In all cases where the client modifies aMIME type for its documents. This can either be an existing MIME type,document, by deleting or inserting anew one registereddocument, element or attribute resource, the client SHOULD verify that, if the operation were to succeed, the resulting document would meet the data constraints defined by the applicationusage. XML Schema: Theusage, including schemafor documents used byvalidation. For example, if the client performs a PUT operation to http://xcap.example.com/rls-services/users/joe/mybuddies, rls-services is the application unique ID, and theapplication. Additional Constraints: Anyconstraintsthat can notdefined by it SHOULD berepresentedfollowed. The client will know what URI to use based on the naming conventions described by theXML schema. Data Semantics: Naming Conventions: Resource Interdependencies: Authorization Policies:application usage. If theapplication usage changesdocument, after modification, does not meet thedefault authorization policies, it should specify that. If not,data constraints, the server will reject itshould specifywith a 409. The 409 response may contain an XML body, formatted according to the schema in Section 9.2, which provides further information on the nature of the error. The client MAY use this information to try and alter the request so that this time, it might succeed. The client SHOULD NOT simply retry thedefault is used. Rosenberg Expires August 15, 2004 [Page 10] Internet-Draft XCAP February 2004 5. URI Constructionrequest without changing some aspect of it. Inorder to manipulatesome cases, the application usage will dictate involve apiece of configuration data,uniqueness constraint that thedata mustclient cannot guarantee on its own. One such example is that a URI has to berepresented by an HTTP URI. XCAP definesunique within aspecific naming convention for constructing these URIs. In particular,domain. Typically, thehost part identifiesclient is not theXCAP server. The abs_path componentowner of theHTTP URI identifies the specific piece of data todomain, and so it cannot bemodified. This pathsure that a URI isbroken intounique. In such atwo parts. The first part identifiescase, theparticular XML document. XCAP servers organize XML documents inclient can either generate aspecific hierarchical fashion, as describedsufficiently random identifier, or it can pick a "vanity" identifier inSection 5.1. The second part ofthepath is called a node selector. When present,hopes that itcontains an XML componentis not taken. In either case, if the identifierformatted accordingis not unique, the server will reject the request with a 409 and suggest alternatives that the client can use toSection 5.2. The node selector identifiestry again. If thespecific component ofserver does not suggest alternatives, theXML document. Theclient SHOULD attempt to use random identifiers with increasing amounts of randomness. HTTPURI withoutalso specifies that PUT and DELETE requests are idempotent. This means that, if thenode selector is calledclient performs a PUT on a document and it succeeds, it can perform the same PUT, and the resulting documentURI. Note that there is nothingwill look the same. Similarly, when a client performs a DELETE, if it succeeds, a subsequent DELETE to the same URI should find the resource deleted and thus have no further effect. To maintain this property, the client SHOULD construct its URIs such that, after the Rosenberg Expires January 14, 2005 [Page 22] Internet-Draft XCAP July 2004 modification has taken place, the URI in thegrammarrequest will point to the resource just inserted for PUT (i.e., the body of the request), and will point to nothing for DELETE. If this property is maintained, it is theHTTP URIcase thatseparatesGET to thedocumentURIfromin thenode selector. The path extends naturally fromPUT will return thedocument intosame content (i.e., GET(PUT(X)) == x). This property is synonymous with idempotency. If theXML hierarchy withinclient's request does not have this property, thedocument. Separatingserver will reject thetwo components is somethingrequest with aserver can do based on its awareness of409 and indicate a cannot-insert error condition. If thestructureresult of thedocument directory. 5.1 IdentifyingPUT is a 200 or 201 response, theXMLoperation was successful. Other response codes to any request, such as a redirection, are processed as per RFC 2616 [5]. 7.1 Create or Replace a DocumentXCAP mandates thatTo create or replace aserver MUST organize documents according todocument, the client constructs adefined hierarchy. The root of this hierarchy is an HTTPURIcalledthat references theXCAP services root URI.location where the document is to be placed. This URIidentifiesMUST be a document URI, and therefore contain the XCAP rootofand document selector. The client then invokes a PUT method on that URI. The MIME content type MUST be thetree withintype defined by thedomain where all XCAP documents are stored. It can be any valid HTTP URL, but MUST NOT contain a query string. As anapplication usage. For example,http://xcap.example.com/services mightit would beused as the XCAP"application/rls-services+xml" for an RLS servicesroot URI within[23] document, and not "application/xml". If the Request-URI identifies a document that already exists in the server, the PUT operation replaces that document with the content of the request. If theexample.com domain. Typically,Request-URI does not identify an existing document, theXCAP services root URIdocument isprovisioned intocreated on the server at that specific URI. 7.2 Delete a Document To delete a document, the clientdevices for bootstrapping purposes. Beneathconstructs a URI that references theXCAP services rootdocument to be deleted. This URIisMUST be atree structure for organizing documents.document URI. Thefirst level of this tree consists of the XCAP AUID. So, continuing the example above, all ofclient then invokes a DELETE operation on thedocuments used byURI to delete thepresence list applicationdocument. 7.3 Fetch a Document As one wouldbe under http://xcap.example.com/ services/presence-lists. It is assumed that each application will have data thatexpect, fetching a document issettrivially accomplished byusers, and/or it will have global data that appliesperforming an HTTP GET request with the Request URI set toall users. As a result, withinthedirectory structure for each application usage, there are two sub-trees. One, called "users", holdsdocument URI. 7.4 Create or Replace an Element To create or replace an XML element within an existing document, thedocuments that are applicableclient constructs a URI whose document selector points tospecific users, andtheother, called "global", holds documents applicabledocument toall users. Withinbe modified. The node selector MUST be present in the"users" tree are zero or more sub-trees, each of which identifies documents that apply to a specific user. XCAP does notURI, separated from the document selector with the path separator. To create this this element within the document, the node selector is Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page11]23] Internet-Draft XCAPFebruaryJuly 2004itself define whatconstructed such that itmeans for documents to "apply" to a user, beyond specification ofis abaseline authorization policy, described belowno-match against the current document, but if the element inSection 7. Each application usage can specify additional authorization policies which depend on data used bytheapplication itself. The remainderbody of theURI (the path following "global" orrequest was added to thespecific user) is not constraineddocument as desired bythis specification. The application usage MAY introduce constraints, or may allow any structure to be used. 5.2 IdentifyingtheXML Nodes Theclient, the node selectorspecifies specific nodes ofwould select that element. To replace an element in theXMLdocument, the node selector is constructed so that it is a match against the element in the current documentwhich areto beaccessed. A node refersreplaced, as well as a match toeither an XMLthe new elementor an attribute(present in the body ofan element. The node selectorthe PUT request) that isan expression which identifiesto replace it. Oftentimes, the client will wish to insert an elementor attribute. Its grammar is: node-selector = element-selector ["/" attribute-selector] element-selector = step *( "/" step) step = by-name / by-pos / by-attr by-name = QName ; from XML Namespaces by-pos = QName "[" position "]"into a document in a certain position= 1*DIGIT by-attr = QName "[" "@" att-name "=" <"> att-value <"> "]" att-name = QName att-value = AttValue ; from XML specification attribute-selector = "@" att-name The QName grammarrelative to other children of the same parent. This is called a positional insertion. They often arise because the schema constrains where the element can occur, or because ordering of elements isdefinedsignificant within theXML namespaces specification [3]. Theschema. To accomplish this, the client can use a node selector of the following form: parent/*[position][unique-attribute-value] Here, "parent" isbased onan expression for theconceptsparent of the element to be inserted. "position" is the position amongst the existing children of this parent where the new element is to be inserted. "unique-attribute-value" is an attribute name and value for the element to be inserted, which is different from the current element inXPath [9]. Indeed,"position". The second predicate is needed so that thenode selectoroverall expressionhappensis a no-match when evaluated against the current children. Otherwise, the PUT would replace the existing element in that position. Consider the example document in Figure 3. The client would like tobeinsert avalid XPath expression.new <watcher> element as the second element underneath <watcher-list>. However,XPath providesit cannot just PUT to asetURI with the watcherinfo/watcher-list/*[2] node selector; this node selector would select the existing 2nd child offunctionality far richer than is needed here,<watcher-list> andits breadth would introduce complexity into XCAP. To determinereplace it. Thus, theXML element or attribute selected byPUT has to be made to a URI with watcherinfo/watcher-list/ *[2][@id="hhggff"] as the node selector,processing begins atwhere "hhggff" is therootvalue of theXML document. The first step in"id" attribute of the new elementselectorto be inserted. This node-selector isthen taken. Each step choosesaspecific XML element withinno-match against the currentdocument context. The document context isdocument, and would be a match against thepoint withinnew element if it was inserted as theXML document from which a specific step is evaluated.2nd child of <watcher-list>. Thedocument context begins at the root"*" indicates that all children of <watcher-info> are to be considered when computing thedocument. Whenposition for insertion. If, instead of astep determines*, an elementwithin that context, that element becomesname was present, the expression above would insert the newcontext for evaluation ofelement as thenext step. Each step can select anposition-th elementby its name, by a combination of name and attribute value, or by name and position. Ifamongst those with thestep is attempting selection by name,same name. Once theserver looks for allclient constructs the URI, it invokes the HTTP PUT method. Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page12]24] Internet-Draft XCAPFebruaryJuly 2004elements within the current context with that name. Name matching is performed as described below. If there is more than one element with the specified name,The content in theresult is considered a no-match. Ifrequest MUST be an XML element. Specifically, it contains thestep is attempting selection by name and attribute,element, starting with theserver looksopening bracket forall elements withinthecurrent document context withbegin tag for thatname. Of thoseelement, including the attributes and content of thatmatch,element (whether itlooksbe text or other child elements), and ending with the closing bracket forones that havethegiven attribute name, whereend tag for thatattribute haselement. The MIME type in thegiven value.request MUST be "application/xcap-el+xml", defined in Section 13.2.1. Ifthere is no match, or if more than one element matches,theresult is considered a no-match. Note that elements cannot be selected based on any namespace attributes. Any such attributes are effectively ignorednode selector, when evaluated against the current document, results interms ofa no-match, thematching operations defined here.server performs a creation operation. If thestepnode selector, when evaluated against the current document, isattempting selection by name and position, the server looksa match forall elements withinan element in the currentdocument contextdocument, the server replaces it with the content of the PUT request. This replacement is complete; thatname. Theseis, the old element (including its attributes and content) arethen sortedremoved, and the new one, including its attributes and content, is put indocument order, as defined by Xpath. The position-thits place. To be certain that elementis then selected. If thereinsertions arefewer than position number of elements with that name,idempotent, theresult is considered a no-match. Onceclient can check that thelast step is executed, if there is noattributeselector,predicates in theresultfinal path segment of thenode selection isURI match thelast selected element. If there is an attribute selector,attributes of theserver checks to see if there iselement in the body of the request. As anattribute withexample of an request thatname within the currently selectoed element. If there is not,would not be idempotent, consider theresult is consideredfollowing PUT request: PUT http://xcap.example.com/rls-services/users/bill/index/~~/rls-services/service%5b@uri=%22sip:good-friends@example.com%5d HTTP/1.1 Content-Type:application/xcap-el+xml <service uri="sip:mybuddies@example.com"> <resource-list>http://xcap.example.com/resource-lists/users/joe/index/~~/resource-lists/list%5b@name=%22l1%22%5d </resource-list> <packages> <package>presence</package> </packages> </service> This request will fail with ano-match. Otherwise, that attribute is selected. Note that namespace409. The Request URI contains a final path segment with a predicate based on attributescannot be selected. Matching- @uri="sip:good-friends@example.com". However, this will not match the value of the "uri" attribute in the elementnames and attributes is performed by expanding them intoin theexpanded name form, as describedbody. When the client does not explicitly indicate a position inXML Namespaces, and then performingwhich to insert a new element, the server will insert that element as thecomparisonlast child of that parent. If this is not the desired position, the client should perform a positional insertion. 7.5 Delete an Element To delete an element from a document, theresults. When evaluatingclient constructs a URI Rosenberg Expires January 14, 2005 [Page 25] Internet-Draft XCAP July 2004 whose document selector points to theQNames indocument containing the element to be deleted. The nodeselector,selector MUST be present following thedefault namespacepath separator, andnamespace definitionsidentify the specific element to be deleted. The client then invokes the HTTP DELETE method. The server will remove the element from the documentURI apply. Comments, text content,(including its attributes andprocessing declarations in the XML document cannot be selected by the expressions defined here. Of course, ifits content, suchinformation is present inas any children). 7.6 Fetch an Element To fetch an element of a document,andthe client constructs auser selects an XMLURI whose document selector points to the document containing the elementenclosing that data, that information wouldto beincluded in a resulting GET, for example. As an example, consider the following XML document: Rosenberg Expires August 15, 2004 [Page 13] Internet-Draft XCAP February 2004 <?xml version="1.0"?> <watcherinfo xmlns="urn:ietf:params:xml:ns:watcherinfo" version="0" state="full"> <watcher-list resource="sip:professor@example.net" package="presence"> <watcher status="active" id="8ajksjda7s" duration-subscribed="509" event="approved" >sip:userA@example.net</watcher> <watcher status="pending" id="hh8juja87s997-ass7" display-name="Mr. Subscriber" event="subscribe">sip:userB@example.org</watcher> </watcher-list> </watcherinfo>fetched. The node selector"watcherinfo/watcher-list/ watcher[@id="8ajksjda7s"]" would select theMUST be present followingXML element: <watcher status="active" id="8ajksjda7s" duration-subscribed="509" event="approved" >sip:userA@example.net</watcher> Rosenberg Expires August 15, 2004 [Page 14] Internet-Draft XCAP February 2004 6. Client Operations An XCAPthe path separator, and must identify the element to be fetched. The clientis an HTTP 1.1 compliant client. Specific data manipulation tasks are accomplished by invokingthen invokes the GET method. The 200 OK response will contain that XML element. Specifically, it contains theright setcontent ofHTTP methodsthe XML document, starting with theright set of headers onopening bracket for theserver.begin tag for that element, and ending with the closing bracket for the end tag for that element. Thissection describes those in detail 6.1will, as a result, include all attributes and child elements of that element. 7.7 Create or Replacea Documentan Attribute To create or replace an attribute in an existing element of a document, the client constructs a URIthat references the location wherewhose document selector points to the documentisto beplaced. This URI MUST NOT contain a NodeSelector component. The client then invokes a PUT method on that URI.modified. Thecontent innode selector, following therequestpath separator, MUST bean XML document compliant to the schema associated with the application usage defined by the URI. For example,present. The node selector MUST be constructed such that, if theclient performs a PUT operation to http:// xcap.example.com/services/presence-lists/users/joe/mybuddies, presence-lists is the application unique ID, andattribute was created or replaced as desired, theschema defined by itnode selector woulddictateselect that attribute. If thebody ofnode selector, when evaluated against therequest. The MIME content type SHOULD be as specific as possible. For example, "application/ resource-lists+xml" forcurrent document, results in aresource list [22], instead of just "application/xml".no-match, it is a creation operation. Ifthe Request-URI identifiesit matches an existing attribute, it is adocument that already exists in the server,replacement operation. The client then invokes the HTTP PUToperation replaces that document with themethod. The content defined by the request MUST be the value of therequest. Ifattribute, compliant to theRequest-URI does not identify an existing document,grammar for AttValue as defined in XML 1.0. Note that, unlike when AttValue is present in thedocumentURI, there iscreated onno escape coding. Escaping only applies to URIs. This request MUST be sent with the Content-Type of "application/xcap-att+xml" as defined in Section 13.2.2. The serveratwill add thatspecific URI. If the result ofattribute such that, if thePUTnode selector isa 200 or 202 response,evaluated on theoperation was successful. Ifresulting document, itwas a 409,returns theuser performed some action which resultedattribute present inan invalid document. The 409 response may contain an XML body, formatted according totheschemarequest. To be certain that attribute insertions are idempotent, the client can check that any attribute predicate inSection 7.2.1.1,the path segment that selects the element into whichprovides further information onthenature ofattribute is inserted, matches a different attribute than theerror. The client MAY use this information to try and alterone being inserted by the request. As Rosenberg Expires January 14, 2005 [Page 26] Internet-Draft XCAP July 2004 an example of a requestsothatthis time, it might succeed. The client SHOULD NOT simply retrywould not be idempotent, consider the following PUT request: PUT http://xcap.example.com/rls-services/users/bill/index/~~/rls-services/service%5b@uri=%22sip:good-friends@example.com%5d/@uri HTTP/1.1 Content-Type:application/xcap-att+xml "sip:bad-friends@example.com" This requestwithout changing some aspect of it. 6.2 Deletewill fail with aDocument409. 7.8 Delete an Attribute To deleteaattributes from the document, the client constructs a URIthat referenceswhose document selector points to the document containing the attributes to be deleted.By definition this URI will not contain a NodeSelector component.Theclient then invokes a DELETE operation on the URI to delete the document. 6.3 Fetch a Document As one would expect, fetching a document is trivially accomplished by Rosenberg Expires August 15, 2004 [Page 15] Internet-Draft XCAP February 2004 performing an HTTP GET request withnode selector MUST be present following theRequest URI setpath separator, and evaluate to an attribute in the document to befetched. When adeleted. The clientfetches a document, and there is an older version cached, it is useful for clients to perform conditional GETs using the If-Match header field, in order to reduce network usage ifthen invokes thecached copy is still valid. AnHTTP DELETE method. The serverMUST return Etags for entities that represent resources managed by XCAP. 6.4 Create or Replacewill remove the attribute from the document. 7.9 Fetch anElementAttribute Tocreate or replace an XML element withinfetch anexistingattribute of a document, the client constructs a URI whose documentURIselector points to the document containing the attribute to bemodified.fetched. The node selector MUST be presentinfollowing theURI. The node selector is constructed such that, ifpath separator, containing an expression identifying theelement was addedattribute whose value is tothe document as desired by the client, the node selector would select that element.be fetched. The client then invokes theHTTP PUTGET method. Thecontent200 OK response will contain an "application/xcap-att+xml" document with the specified attribute, formatted according to the grammar of AttValue as defined in therequest MUST be anXMLelement. Specifically, it contains1.0 specifications. 7.10 Conditional Operations The HTTP specification defines several header fields that can be used by a client to make theelement, starting withprocessing of theopening bracket forrequest conditional. In particular, thebeginIf-None-Match and If-Match header fields allow a client to make them conditional on the current value of the entity tag for the resource. These conditional operations are particularly useful for XCAP resources. For example, it is anticipated thatelement, includingclients will frequently wish to cache the current version of a document. So, when the client starts Rosenberg Expires January 14, 2005 [Page 27] Internet-Draft XCAP July 2004 up, it will fetch theattributescurrent document from the server andcontent of that element (whetherstore it. When itbe text or other child elements), and ending withdoes so, theclosing bracket forGET response will contain theendentity tag forthat element. The MIME type intherequest SHOULD be "application/xml-fragment-body", defined in Section 10.2. Thedocument resource. Each resource within a document maintained by the server willinsertshare theelement (including all its attributes and its content) intosame value of thedocument such thatentity tag. As a result, thenode selector, if evaluatedentity tag returned by theserver, would returnserver for thecontent present indocument resource is applicable to element and attribute resources within therequest.document. If thenode selector, when evaluated againstclient wishes to modify an element or attribute within thecurrentdocument,resultsbut it wants to be certain that the document hasn't been modified since the client last operated on it, it can include an If-Match header field ina no-match,theserver performs a creation operation. Ifrequest, containing thenode selector, when evaluated againstvalue of thecurrent document, is a matchentity tag known to the client foran element inall resources within thecurrent document,document. If the document has changed, the serverreplaces itwill reject this request withthe content of the PUT request. This replacement is complete;a 412 response. In thatis,case, theold element (includingclient will need to flush itsattributes and content) are removed, andcached version, fetch thenew one, including its attributesentire document, andcontent, is put in its place. The client SHOULD be certain, before making the request, thatstore theresulting modified document will also be conformantnew entity tag returned by the server in the 200 OK to theschema. It isGET request. Its important to note thatthe element might potentially be insertedentity tags are defined for each resource in thedocumentdocument, even though they share the same value. As a result, if a resource does not exist inseveral different ways, and still meettheconstraints defined above. Thisdocument, there isanalagousno entity tag for it, and a PUT tothe case whensuch anew file isresource with an If-Match header field will always fail with a 412. For this reason, PUT operations that insert a new element or attribute into adirectorydocument cannot be conditioned ona server; the location of that file withinthedirectory is not specified, and is up toentity tag for thelocal file system to decide. The only guarantee is that GET(PUT(x)) returnsdocumentx. If the result of the PUT is a 200 or 202 response, the operation was successful.itself. Ifit was a 409,theuser performed some action which resulted in an invalid document. The 409 response may contain an XML Rosenberg Expires August 15, 2004 [Page 16] Internet-Draft XCAP February 2004 body, formatted accordingclient wishes to make sure that theschema in Section 7.2.1.1, which provides further information ondocument has not changed before adding thenature ofnew element or attribute, theerror. TheclientMAY use this information to trycan "pop up a level", andalter the request so that this time,instead of inserting a new element or attribute, itmight succeed. The client SHOULD NOT simply retrycan modify therequest without changing some aspectparent ofit. 6.5 Delete an Element To delete anthat new elementfrom a document, the client constructs a URI whose document URI points toand attribute such that thedocument containingnew value contains the new element or attribute. In another example, a client may wish tobe deleted. The node selector MUST be present, and identify the specificinsert a new element into a document, but wants to bedeleted. The client then invokessure that theHTTP DELETE method. The serverinsertion willremove theonly take place if that elementfromdoes not exist. In other words, thedocument (including its attributes and its content, such as any children). TheclientSHOULD be certain, before makingwants therequest, that the resulting modified document will also be conformantPUT operation tothe schema. If the result of the DELETE isbe a200 response, the operation was successful. If it wascreation, not a409,replacement. To accomplish that, theuser performed some action which resulted in an invalid document. The 409 response may contain an XML body, formatted according toclient can insert theschema in Section 7.2.1.1, which provides further information onIf-None-Match header field into thenaturePUT request, with a value of *. This tells theerror. The client MAY use this informationserver totry and alterreject the requestso that this time, it might succeed. Thewith a 412 if resource exists. As another example, a when a clientSHOULD NOT simply retry the request without changing some aspect of it. 6.6 Fetch an Element To fetch an element offetches a document,the client constructsand there is an older version cached, it is useful for clients to use aURI whose document URI pointsconditional GET in order to reduce network usage if thedocument containingcached copy is still valid. This is done by including, in theelement to be fetched. The node selector MUST be present, and must identifyGET request, theelementIf-None-Match header field with a value equal tobe fetched. Thethe current etag held by the clientthen invokesfor theGET method.document. Theresponseserver willcontainonly generate a 200 OK reponse if the etag held by the server differs than thatXML element. Specifically, it containsheld by thecontent ofclient. If it doesnt differ, theXML document, startingserver will respond with a 304 response. Rosenberg Expires January 14, 2005 [Page 28] Internet-Draft XCAP July 2004 8. Server Behavior An XCAP server is an HTTP 1.1 compliant origin server. The behaviors mandated by this specification relate to theopening bracket forway in which thebegin tag for that element,HTTP URI is interpreted andending withtheclosing bracket forcontent is constructed. An XCAP server MUST be explicitly aware of theend tagapplication usage against which requests are being made. That is, the server must be explicitly configured to handle URIs forthat element. This will, as a result, include all attributeseach specific application usage, andchild elementsmust be aware of the constraints imposed by thatelement. 6.7 Create or Replace an Attribute To create or replace an attribute in an existing element of a document,application usage. When theclient constructsserver receives aURI whose document URI points to the document to be modified. The node selector MUST be present. The node selector MUST be constructed such that, ifrequest, theattribute was Rosenberg Expires August 15, 2004 [Page 17] Internet-Draft XCAP February 2004 created or replaced as desired,treatment depends on thenode selector would select that attribute.URI. If thenode selector, when evaluated againstURI refers to an application usage not understood by the server, the server MUST reject thecurrent document, results in a no-match, it isrequest with acreation operation.404 (Not Found) response. Ifit matches an existing attribute, it is a replacement operation. The client then invokestheHTTP PUT method. The content definedURI refers to a user that is not recognized by therequestserver, it MUSTbe compliant toreject thegrammar for AttValue as defined in XML 1.0. ThisrequestMUST be sentwith a 404 (Not Found). Next, theContent-Type of "application/xml-attribute-value" as defined in Section 10.3. Theserverwill addauthenticates the request. All XCAP servers MUST implement HTTP Digest [10]. Furthermore, servers MUST implement HTTP over TLS, RFC 2818 [13]. It is RECOMMENDED thatattribute such that,administrators use an HTTPS URI as the XCAP root URI, so that the digest client authentication occurs over TLS. Next, the server determines if thenode selector is evaluatedclient has authorization to perform the requested operation on theresulting document, it returnsresource. The application usage defines theattribute presentauthorization policies. An application usage may specify that the default is used. This default is described in Section 5.6. Once authorized, therequest. The client SHOULD be certain, before makingspecific behavior depends on therequest, thatmethod and what theresulting modified document will also be conformantURI refers to. 8.1 POST Handling XCAP resources do not represent processing scripts. As a result, POST operations to HTTP URIs representing XCAP resources are not defined. A server receiving such a request for an XCAP resource SHOULD return a 405. 8.2 PUT Handling The behavior of a server in receipt of a PUT request is as specified in HTTP 1.1 Section 9.6 - theschema. If the resultcontent of thePUTrequest isa 200 or 202 response, the operation was successful. If it was a 409,placed at theuser performed some action which resulted in an invalid document. The 409 response may contain an XML body, formatted accordingspecified location. This section serves to define theschema in Section 7.2.1.1, which provides further information onnotion of "placement" and "specified location" within thenaturecontext of XCAP resources. Rosenberg Expires January 14, 2005 [Page 29] Internet-Draft XCAP July 2004 8.2.1 Locating theerror.Parent Theclient MAY use this informationfirst step the server performs is totry and alterlocate therequest so that this time,parent, whether itmight succeed. The client SHOULD NOT simply retryis a directory or element, in which therequest without changing some aspect of it. 6.8 Delete an Attributeresource is to be placed. Todelete attributesdo that, the server removes the last path segment from thedocument,URI. The rest of theclient constructs aURIwhose document URI pointsrefers to the parent. This parent can be a document, element, or prefix of a documentcontainingselector (called a directory, even though this specification does not mandate that doocuments are actually stored in a filesystem). This URI is called theattributes to be deleted.parent URI. Thenode selector MUST be present,path segment that was removed is called the target selector, andevaluate to an attribute inthe node (element, document or attribute) it describes is called the target node. If the parent URI has no path separator, it is referring tobe deleted. The client then invokestheHTTP DELETE method. The server will removedirectory into which theattribute fromdocument should be inserted. If this directory does not exist, thedocument. The clientserver MUST return a 409 response, and SHOULDbe certain, before makinginclude a detailed conflict report including therequest, that<no-parent> element. Detailed conflict reports are discussed in Section 9. If theresulting modified document will also be conformantdirectory does exist, the server checks to see if there is a document with theschema. Ifsame filename as theresult oftarget node. If there is, theDELETEoperation isa 200 response,the replacement operationwas successful.discussed in Section 8.2.4. If itwas a 409, the user performed some action which resulted in an invalid document. The 409 response may contain an XML body, formatted according todoes not exist, it is theschemacreation operation, discussed in Section7.2.1.1, which provides further information on8.2.4. If thenature ofparent URI has a path separator, theerror. The client MAY use this information to trydocument selector is extracted, andalter the request sothatthis time, it might succeed. The client SHOULD NOT simply retrydocument is retrieved. If therequest without changing some aspect of it. 6.9 Fetch an Attribute To fetch an attribute of a document,document does not exist, theclient constructsserver MUST return aURI Rosenberg Expires August 15, 2004 [Page 18] Internet-Draft XCAP February 2004 whose Document-URI points to409 response, and SHOULD include a detailed conflict report including thedocument containing<no-parent> element. If it does exist, theattribute to be fetched. Thenode selectorMUST be present, containing an expression identifyingis extracted, and unescaped (recall that theattribute whose valuenode selector isto be fetched.escape coded). Theclient then invokesnode selector is applied to theGET method. The response will contain an "application/xml-attribute-value"documentwith the specified attribute, formatted according tobased on thegrammar of AttValue as definedmatching operations discussed in Section 6.3. If the result is a no-match or invalid, the server MUST return a 409 response, and SHOULD include a detailed conflict report including the <no-parent> element. If theXML 1.0 specifications. 6.10 Read/Modify/Write Transactions Itnode-selector isanticipated that a common operation will be to readvalid, thecurrent version of a document or element, modify it onserver examines theclient,target selector, andthen writeevaluates in within thechange back tocontext of theserver. In order forparent node. If theresults to be consistent withtarget node exists within theclient's expectations,parent, the operationmust be atomic. To accomplish this, the client makes use of entity tags returned byis a replacement, as described in Section 8.2.4. If it does not exist, it is theservercreation operation, discussed ina GET operation used to readSection 8.2.4. Before performing theelement, attribute,replacement ordocument that is to be modified. To guarantee atomicity, the PUT operation used to writecreation, as determined based on thechanges back tologic above, the serverMUST contain an If-Match header field, whose value is equal tovalidates theentity tag fromcontent of theprior GET response.request as described in Section 8.2.2 8.2.2 Verifying Document Content If the PUT requestfails withis for a412 response,document (the request URI had no path Rosenberg Expires January 14, 2005 [Page 30] Internet-Draft XCAP July 2004 separator), theclient knows that another updatecontent of thedatarequest body hasoccurred before it was abletowritebe a well-formed XML document. If it is not, theresults back. The client can then fetchserver MUST reject themost recent version, and attempt its modification again. Because there are no batching operations defined in HTTP that would allow for a number of separate create, modify or delete operations to be performed atomically, designers of application usages should take care to structure their schemas so that operations that need to be performed atomically can be done inrequest with asingle operation. 6.11 Reading Server Assigned Data In some application usages, components of409 response code. That response SHOULD include a detailed conflict report including thedocument cannot be set by<not-well-formed> element. If theuser. Rather, they must be filledMIME type inbytheserver. Such cases are documented as partContent-Type header field of theapplication usage. Frequently, the client will wantrequest is not equal toknow the value assigned bytheserver. As an example, inMIME type defined for theresource listapplicationusage [22],usage, the serverassignsMUST reject theuri forrequest with aresource list. The client will need this URI to subscribe to415. If theresource list,PUT request is forexample. There are two ways such discovery canan element, the content of the request body has to beaccomplished. Ina well-balanced region of an XML document, also known as an XML fragment body in The XML Fragment Interchange [4] specification, including only a single element. If it is not, thefirst, onceserver MUST reject theclient PUTsrequest with adocument or element that requires409 response code. That response SHOULD include a detailed conflict report including thedata<not-xml-frag> element. If the MIME type in the Content-Type header field of the request is not equal tobe filled in,"application/xcap-el+xml", theclient can doserver MUST reject the request with asubsequent GET to find415. If theURI. This GET can bePUT request is for an attribute, theentire document, the same URI that was used incontent of thePUT, orrequest body has to be aURIsequence of characters thatpoints just tocomply with thespecific data assigned Rosenberg Expires August 15, 2004 [Page 19] Internet-Draft XCAP February 2004 bygrammar for AttValue as defined above. If it is not, the server MUST reject the request with a 409 response code. That response SHOULD include a detailed conflict report including theserver. The result of<not-xml-att-value> element. If theGET will tellMIME type in theclient aboutContent-Type header field of theassigned data. Note thatrequest is not equal to "application/xcap-att+xml", theEtag presentserver MUST reject the request with a 415. 8.2.3 Creation The steps in this sub-section are followed if theresponse is significant, as itPUT request willbe different from the one returnedresult in theprevious response to PUT. That's because, ascreation of aresultnew document, element or attribute. If the PUT request is for a document, the content of theserver's assignment,request body is placed into thedocument has changed,directory, and its filename is associated with the target node, which istherefore assigned a new Etag. The second wayaclient can learn aboutdocument. If thechangePUT request isthroughfor anevent package that might be used to find out about changes to XCAP resources. Itelement, the server inserts the content of the request body as a new child element of the parent element selected in Section 8.2.1. The insertion isimportant to note thatdone such that, the200 OK responserequest URI, when evaluated, would now point to the element which was inserted. If the target selector is defined by aPUTby-name or by-attr production (in other words, there isalways empty, and will not containno position indicated) the server MUST insert thedocument orelement after any other siblings. If a position is indicated, the serverhas computedMUST insert thenecessary data. Rosenberg Expires August 15, 2004 [Page 20] Internet-Draft XCAP February 2004 7. Server Behavior An XCAP serverelement so that it isan HTTP 1.1 compliant origin server. The behaviors mandated by this specification relate to the way in whichtheHTTP URIposition-th element amongst all siblings whose name matches NameorAny. It isinterpreted andpossible that thecontent is constructed. An XCAP server MUSTelement cannot beexplicitly aware of the application usage against which requests are being made. That is,inserted such that theserver must be explicitly configured to handle URIs for each specific application usage, and must be aware ofRosenberg Expires January 14, 2005 [Page 31] Internet-Draft XCAP July 2004 request URI, when evaluated, returns theconstraints imposed by that application usage. Whencontent provided in theserver receivesrequest. Such arequest, the treatment depends onrequest is not idempotent, and is not allowed for PUT. This happens when theURI. Ifelement in theURI refers to an application usagebody is notunderstooddescribed by theserver,expression in the target selector. An example of this case is described in Section 7.4. If this happens the server MUST NOT perform the insertion, and MUST reject the request with a404 (Not Found)409 response.IfThe body of theURI refers toresponse SHOULD contain auser thatdetailed conflict report containing the <cannot-insert> element. It is important to note that schema compliance does notrecognizedplay a role while performing the insertion. That is, the decision of where the element gets inserted is dictated entirely by theserver, it MUST rejectstructure of therequest with a 404 (Not Found). Next,request-URI, theserver authenticatescurrent document, and therequest. All XCAP servers MUST implement HTTP Digest [10]. Furthermore, servers MUST implement HTTP over TLS, RFC 2818 [13]. Itrules in this specification. If the PUT request isRECOMMENDED that administrators usefor anHTTPS URI asattribute, theXCAP root services URI, so thatserver inserts thedigest client authentication occurs over TLS. Next,content of theserver determines ifrequest body as the value of the attribute. The name of theclient has authorizationattribute is equal toperformtherequested operation onatt-name from theresource. The default authorization policy isattribute-selector in the target selector. Assuming thatonly client X can access (create, read, write, modify or delete) resources underthe"users/X" directory. Only priviledged administratorsinsertion canwrite resources underbe accomplished, the"global" directory, but all users can read them. An application usage can specify an alternate default authorization policy specific to that usage. Theservermay also know of an application usageverifies thatitself defines authorization policies for anotherthe insertion results in a document that meets the constraints of the application usage.Of course, an administratorThis is dicussed in Section 8.2.5. 8.2.4 Replacement The steps in this sub-section are followed if the PUT request will result in the replacement of a document, element orprivileged user can overrideattribute with thedefault authorization policy, although this specification provides no meanscontents of the request. If the PUT request is fordoing that. Once authorized,a document, thespecific behavior depends oncontent of themethod and whatrequest body is placed into theURI refers to. 7.1 POST Handling Resources managed by XCAP do not represent processing scripts. As a result, POST operations to XCAP URIs are not defined. A server receiving such adirectory, replacing the document with the same filename. If the PUT request is for anxcap resource SHOULD return a 405. Rosenberg Expires August 15, 2004 [Page 21] Internet-Draft XCAP February 2004 7.2 PUT Handling The behaviorelement, the server replaces the target node with the content of the request body. As in the creation case, it is possible that, after replacement, the request URI does not select the element that was just inserted. If this happens the server MUST NOT perform the replacement, and MUST reject the request with aserver in receipt409 response. The body of the response SHOULD contain a detailed conflict report containing the <cannot-insert> element. If the PUT request isas specified in HTTP 1.1 Section 9.6 -for an attribute, the server sets the value of the selected attribute to the content of the request body. It isplaced atpossible in thespecified location. This section serves to definereplacement case (but not in thenotioncreation case), that, after replacement of"placement" and "specified location" withinthecontext of XCAP resources. Ifattribute, the request URIrepresents a document (i.e., there isnonode selector component),longer selects thecontent ofattribute that was just replaced. The scenario in which this can happen is discussed in Section 7.7. If this is therequestcase, the server MUSTbe a valid XML document,NOT perform the replacement, and MUSTbe compliant to the schema associated with the application usage in the URI. If it is not,reject the Rosenberg Expires January 14, 2005 [Page 32] Internet-Draft XCAP July 2004 requestMUST be rejectedwith a 409 response.IfThe body of therequest URI matchesresponse SHOULD contain adocument that exists ondetailed conflict report containing theserver, that document is replaced by<cannot-insert> element. 8.2.5 Validation Once thecontent ofdocument, element or attribute has been tentatively inserted, therequest. Ifserver needs to verify that therequest URI does not match aresulting documentthat exists onmeets theserver,data constraints outlined by the application usage. First, the serveraddschecks that the final document is compliant toits repository, and associatesthe schema. If itwithis not, theURI inserver MUST NOT perform the insertion. It MUST reject the requestURI. Note that this may requirewith a 409 response. That response SHOULD contain a detailed conflict report containing thecreation of one or more "directories" on<schema-validation-error> element. Next, the server checks for any uniqueness constraints identified by theserver.application usage. If theRequest URI represents an XML element (i.e., it containsapplication usage required that anode selector, but noparticular element or attributeselector)had a unique value within a specific scope, the serverMUST verifywould check thatthe document defined by the document URIthis uniqueness property still exists. Ifno suchthe application usage required that a URI within the documentexists onwas unique within theserver,domain, the server checks whether it is the case. If any of these uniqueness constraints are not met, the server MUST NOT perform the insertion. It MUST reject the request with a404409 response. That responsecode. The content of the request MUST beSHOULD contain asingle XMLdetailed conflict report containing the <uniqueness-failure> element. That element can contain suggested values that the client can retry with. These SHOULD be values that, at the time the server generates the 409, would meet the uniqueness constraints. The server also checks for URI constraints andassociated content (including children elements), whose MIME type is "application/xml-fragment-body".other non-schema data constraints. If therequest does not contain a valid XML fragment body,document fails one of these constraints, the server MUST NOT perform the insertion. It MUST reject the requestis rejectedwith a 409 response. That responsecode. IfSHOULD contain a detailed conflict report containing therequest URI matches an<constraint-failure> element. That elementwithin the document,indicates thatelement is removed, and replaced withthecontent ofdocument failed non-schema data constraints explicitly called out by therequest. Ifapplication usage. 8.2.6 Resource Interdependencies Because XCAP resources include elements, attributes and documents, each of which has its own HTTP URI, therequest URI does not match an element increation or modification of one resource affects thedocument,state of many others. For example, insertion of a document creates resources on the serverinserts the contentfor all of therequest as a new element in the document, such that the resulting document is compliant to the schema,elements andsuchattributes within that document. After therequest URI, when evaluated, would now point toserver has performed theelement which was inserted. There may be more than one way to perform such an insertion; in that case, it isinsertion associated with thediscretion ofPUT, theimplementor as to how it is done. It may also be possibleserver MUST create and/or modify those resources affected by thatthe insertion cannot be done because the parentPUT. The structure of theelement does not exist in the document, or cannot be done because document, afterdocument completely defines theelement is added, wouldinter-relationship between those resources. Normally a server will notbe compliantneed to actually Rosenberg Expires January 14, 2005 [Page 33] Internet-Draft XCAP July 2004 do anything to meet this requirement, since those other resources would normally be resolved dynamically when requests are made against them. However, theschema,application usage can specify other resource inter-dependencies. The server MUST create orbecausemodify thenew element cannot be describedresources specified by thenode-selector no matter what its point of insertion. In such a case,application usage. If the creation or insertion was successful, and the resource interdependcies are resolved, the serverMUST returnreturns a409200 OK or 201 Created, as appropriate. This responsecode. In all cases, the resulting documentMUSTbe compliant to the schema. Ifnot contain any content. 8.3 GET Handling The semantics of GET are as specified in RFC 2616. This section clarifies theRequestspecific content to be returned for a particular URI that represents anXML attribute (i.e., itXCAP resource. If the request URI contains only anode selector and an attribute selector)document selector, the serverMUST verify thatreturns the documentdefinedspecified by thedocumentURIexists. If no such document exists on the server, the server MUST reject the request withif it exists, else returns a 404Rosenberg Expires August 15, 2004 [Page 22] Internet-Draft XCAP February 2004 response code.response. ThecontentMIME type of therequest will be a MIME objectbody oftype "application/xml-attribute-value", which represents a single XML attribute. This attribute willthe 200 OK response MUST becompliant tothegrammar for AttValue asMIME type definedin XML 1.0. If the content is not a valid xml-attribute-value, the server rejects the request with a 409 response. If the request URI matches an existing attribute within the document,by thatattribute is removed, and replaced with the content of the request.application usage (i.e., "application/resource-lists+xml"). If the request URIdoes not match an attribute in the document,contains a node selector, the serverinsertsobtains thecontent ofdocument specified by therequest as a new attribute indocument selector, and if it is found, evaluates thedocument, suchnode-selector within thatthe resultingdocument. If no document iscompliant tofound, or if theschema, and such thatnode-selector is a no-match or invalid, therequest URI, when evaluated, would now point toserver returns a 404 response. Otherwise, theattribute which was inserted. There may be more than one way to perform suchserver returns a 200 OK response. If the node selector identifies aninsertion; inXML element, thatcase, itelement is returned in thediscretion of the implementor200 OK response asto how it is done. It may also be possible that the insertion cannot be done because the containing element does not exist, or cannot be done becausean XML fragment body containing theresultselected element. The MIME type of thechange wouldresponse MUST bea document"application/xcap-el+xml". If the node selector identifies an XML attribute, the value of that attribute isnot compliant toreturned in theschema. In such a case,body of theserver MUST return a 409 response code.response. Theserver MUST check the resulting document for the presenceMIME type of the"mandatory-schemas" element, which will alwaysresponse MUST bea child"application/ xcap-att+xml". 8.4 DELETE Handling The semantics of DELETE are as specified in RFC 2616. This section clarifies theroot element.specific content to be deleted for a particular URI that represents an XCAP resource. Ifthis element is present, the server checks each oftheschemas listed. Ifrequest URI contains only aschema is listed whichdocument selector, the serverdoes not support,deletes theserver MUST rejectdocument specified by therequest withURI if it exists and returns a409200 OK, else returns a 404 response. If theapplication usage indicates that there isrequest URI contains adata dependency,node selector, the serverchecks to see if the information contained inobtains thePUT requiresRosenberg Expires January 14, 2005 [Page 34] Internet-Draft XCAP July 2004 document specified by theserver to compute some component ofdocument selector, and if it is found, evaluates the node-selector within that document. Ifit does,no document is found, or if the node-selector is a no-match or invalid, the serverMUST performreturns a 404 response. Otherwise, thecomputation, and then updateserver removes the specified element or attribute from the documentwithand performs theresult. Sincevalidation checks defined in Section 8.2.2. If thedocument has changed, it representsdeletion will cause anew instancefailure of one of theresource, andconstraints, theserverdeletion MUSTassign a new etag.NOT take place. The server follows the procedures in Section 8.2.2 for computing the 409 response. If theapplication usage indicates that there isdeletion results in adata dependency, anddocument thatdependency requiresis still valid, the servertoMUST performsome kind of data validation beyond that specified intheXML schema,deletion and return a 200 OK response. Before the server returns the 200 OK response to a DELETE, it MUSTperformprocess thevalidation. Ifresource interdependcies as defined in Section 8.2.6. 8.5 Managing Etags An XCAP server MUST maintain entity tags for all resources that it maintains. This specification introduces the additional constraint that when one resource within a documentfails(including thevalidation,document itself) changes, that resource is assigned a new etag, and all other resources within that document MUST be assigned the same etag value. An XCAP server MUSTrejectinclude therequest with a 409 response. The serverEtag header field in all 200 or 201 responses to PUT, GET, or DELETE [[Todo: Not sure we'll see them in DELETE responses. Need to check.]]. XCAP resources do not introduce new requirements on the strength of the entity tags; as in RFC 2616, weak ones MAYaddbe used if performance constraints or other conditions make usage of strong ones untenable for some reason. As a result of this constraint, when a client makes a change to anerror reportelement or attribute within a document, the response to that operation will convey theresponse, indicatingentity tag of thenatureresource that was just affected. Since the client knows that this entity tag value is shared by all of thevalidation error. Ifother resources in thecreation or insertion was successful,document, theserver returns a 200 OK or 201 Created, as appropriate. This response MUST not contain any content. 7.2.1client can make conditional requests against other resources using that entity tag. Rosenberg Expires January 14, 2005 [Page 35] Internet-Draft XCAP July 2004 9. Detailed Conflict Reports In cases where the server returns a 409 error response, that responsedue to any of Rosenberg Expires August 15, 2004 [Page 23] Internet-Draft XCAP February 2004 the conditions described above, it MAYwill usually include a document in the body of the response which provides further details on the nature of the error. This document is an XML document, formatted according to the schema of Section7.2.1.1.9.2. Its MIME type, registered by this specification, is"application/xcap-error+xml"."application/ xcap-error+xml". 9.1 Document Structure The document structure is simple. It contains the root element"xcap-error".<xcap-error>. The content of this element is a specific error condition. Each error condition is represented by a different element. This allows for different error conditions to provide different data about the nature of the error. All error elements support a "phrase" attribute, which can contain text meant for rendering to a human user. The"schema-validation-error" elementfollowing error elements are defined by this specification: <not-well-formed>: This indicates that thedocument was not compliant to the schema afterbody of therequested operationrequest wasperformed. The "not-xml-frag" elementnot a well-formed XML document. <not-xml-frag>: This indicates that the request was supposed to contain a valid XML fragment body, but did not. Most likely this is because the XML in the body was malformed or not balanced.The "no-parent" element<no-parent>: This indicates that an attempt to insert anelement failed,element, attribute or document failed because the document or element into which the insertion was supposed to occurdiddoes not exist. This error element can contain an optional"ancestor"<ancestor> element, which provides an HTTP URIpointed toof the xcap resource that identifies the closest ancestor element that does exist in the document.The "cannot-insert" element providesBecause this is ageneric catch-all for other insertion cases. The "no-xml-att-value"valid HTTP URI, its node selector component MUST be escape encoded. <schema-validation-error>: This element indicates that the document was not compliant to the schema after the requested operation was performed. <not-xml-att-value>: This indicates that the request was supposed to contain a valid XML attribute value, but did not.The "no-element" element<cannot-insert>: This indicates thatan attempt to insert an attribute was made, but the element in whichtheattribute was to be inserted doesrequested PUT operation could notexist. The "uri-exists" element supports application usages that define data constraints. In particular,be performed because itis expectedwould not be idempotent. <uniqueness-failure>: This indicates thatmany application usages will requiretheserver to computerequested operation would result in a document that did not meet a uniqueness constraint defined by the application usage. For each URI, element orallowattribute specified by the clientto provide a URI. In either case, the URI needs to be unique withinwhich is not unique, an <exists> element is present as thedomaincontent of theserver. If the client provideserror element. Each <exists> element has aURI, and"field" attribute that contains theURI already exists, it would be an error. Thisnode selector identifying the XML elementdescribes that condition. For each URI provided byor attribute whose value needs to be unique, but wasn't. Note that Rosenberg Expires January 14, 2005 [Page 36] Internet-Draft XCAP July 2004 theclientdouble quote character, whichalready exists, an "exists" elementispresent asallowed in node selectors, cannot appear within thecontentvalue of"uri-exists". Each "exists" element has a "uri" attribute that containsan attribute. As such, it MUST be represented as ". Beyond that, since theURI which exists.node selector is not appearing within an HTTP URL, there is no escape encoding. The"exists" element, in turn,<exists> element can optionally contain a list of suggested alternateURIsvalues which do not currently exist on the server.The "unknown-mand-ns" element<constraint-failure>: This indicates that thedocument containedrequested operation would result in a"mandatory-ns" elementdocument thatlistedfailed anamespace not understooddata constraint defined by theserver. The content of the "unknown-mand-ns" element is a list of "ns" elements, each one containing a URI identifying a namespace Rosenberg Expires August 15, 2004 [Page 24] Internet-Draft XCAP February 2004 listed as mandatory in the document,application usage, butwasnotunderstoodenforced by theserver.schema or a uniqueness constraint. Extensions to XCAP can define additional error elements. As an example, the following document indicates that the user attempted to createa resource listan RLS service using the URI sip:friends@example.com, but that URI already exists: <?xml version="1.0" encoding="UTF-8"?> <xcap-errorxmlns="urn:ietf:params:xml:ns:xcap-error" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <uri-exists>xmlns="urn:ietf:params:xml:ns:xcap-error"> <uniqueness-failure> <existsuri="sip:friends@example.com"> <alt-uri>sip:friends2@example.com</alt-uri>field="rls-services/service/@uri"> <alt-value>sip:mybuddies@example.com</alt-value> </exists></uri-exists></uniqueness-failure> </xcap-error>7.2.1.19.2 XML Schema <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="urn:ietf:params:xml:ns:xcap-error" xmlns="urn:ietf:params:xml:ns:xcap-error" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="error-element" abstract="true"/> <xs:element name="xcap-error"> <xs:annotation> <xs:documentation>Indicates the reason for the error.</xs:documentation> </xs:annotation> <xs:complexType><xs:choice> <xs:element name="schema-validation-error"> <xs:annotation> <xs:documentation>The resulting document was not compliant to the schema.</xs:documentation> </xs:annotation> <xs:complexType> <xs:attribute name="phrase" type="xs:string" use="optional"/> </xs:complexType> </xs:element><xs:sequence> <xs:elementname="not-xml-frag"> <xs:annotation> <xs:documentation>The request did not contain a valid xml fragment body.</xs:documentation> </xs:annotation> <xs:complexType> <xs:attribute name="phrase" type="xs:string" use="optional"/>ref="error-element"/> </xs:sequence> </xs:complexType> </xs:element><xs:element name="no-parent"> <xs:annotation>Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page25]37] Internet-Draft XCAPFebruaryJuly 2004<xs:documentation>The element could not be inserted because its parent does not exist in the document.</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence><xs:elementname="ancestor" type="xs:anyURI" minOccurs="0">name="schema-validation-error" substitutionGroup="error-element"> <xs:annotation><xs:documentation>Contains an HTTP URI<xs:documentation>This element indicates thatpointsthe document was not compliant to theelement which isschema after theclosest ancestor that does exist.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> <xs:attribute name="phrase" type="xs:string" use="optional"/> </xs:complexType> </xs:element> <xs:element name="cannot-insert"> <xs:annotation> <xs:documentation>The element could not be inserted.</xs:documentation> </xs:annotation> <xs:complexType> <xs:attribute name="phrase" type="xs:string" use="optional"/> </xs:complexType> </xs:element> <xs:element name="not-xml-att-value"> <xs:annotation> <xs:documentation>The request did not contain a valid xml attribute value.</xs:documentation>requested operation was performed.</xs:documentation> </xs:annotation> <xs:complexType> <xs:attribute name="phrase" type="xs:string" use="optional"/> </xs:complexType> </xs:element> <xs:elementname="no-element">name="not-xml-frag" substitutionGroup="error-element"> <xs:annotation><xs:documentation>The attribute could not be inserted because<xs:documentation>This indicates that theelement in whichrequest was supposed toinsert does not exist.</xs:documentation>contain a valid XML fragment body, but did not.</xs:documentation> </xs:annotation> <xs:complexType> <xs:attribute name="phrase" type="xs:string" use="optional"/> </xs:complexType> </xs:element> <xs:elementname="uri-exists">name="no-parent" substitutionGroup="error-element"> <xs:annotation><xs:documentation>The user tried to set a URI<xs:documentation>This indicates that an attempt to insert an element, attribute or document failed because theserver must constraindocument or element into which the insertion was supposed tobe unique, and this URI exists.</xs:documentation>occur does not exist</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:elementname="exists" maxOccurs="unbounded">name="ancestor" type="xs:anyURI" minOccurs="0"> <xs:annotation><xs:documentation>There is<xs:documentation>Contains aninstance of this element for eachHTTP URIinthat points to thedocumentelement whichsuffered this failure.</xs:documentation> </xs:annotation> <xs:complexType> Rosenberg Expires August 15, 2004 [Page 26] Internet-Draft XCAP February 2004 <xs:sequence minOccurs="0"> <xs:element name="alt-uri" type="xs:string" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>An optional set of alternate URIs can be provided.</xs:documentation>is the closest ancestor that does exist.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> <xs:attributename="uri" type="xs:anyURI" use="required"/> </xs:complexType> </xs:element> </xs:sequence> <xs:attributename="phrase" type="xs:string" use="optional"/> </xs:complexType> </xs:element> <xs:elementname="unknown-mand-ns"> <xs:annotation> <xs:documentation>The document had a mandatory namespace which was not understood by the server.</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="ns" type="xs:anyURI" maxOccurs="unbounded">name="cannot-insert" substitutionGroup="error-element"> <xs:annotation><xs:documentation>Each unknown namespace is listed.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </xs:choice> </xs:complexType> </xs:element> </xs:schema> 7.3 GET Handling The semantics of GET are as specified in RFC 2616. This section clarifies the specific content to be returned for a particular URI<xs:documentation>This indicates thatrepresents an XCAP resource. If the request URI contains only a document URI, the server returns the document specified bytheURI ifrequested PUT operation could not be performed because itexists, else returns a 404 response. The MIME type of the response SHOULDwould not bethe most specific type known for that document (i.e., "application/resource-lists+xml" instead of "application/xml"). If the request URI contains a node selector, and that node selector identifies an XML element in anidempotent.</xs:documentation> </xs:annotation> <xs:complexType> <xs:attribute name="phrase" type="xs:string" use="optional"/> </xs:complexType> </xs:element> Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page27]38] Internet-Draft XCAPFebruaryJuly 2004existing document,<xs:element name="not-xml-att-value" substitutionGroup="error-element"> <xs:annotation> <xs:documentation>This indicates thatelement is returned in the 200 response. The MIME type of the response MUST be "application/xml-fragment-body". The content of the response is the portion of the XML document starting with the left bracket of the begin tag of the element, ending with the right bracket of the end tag of the element. Ifthe requestURI containswas supposed to contain anode selector, and that node selector contains anvalid XML attributeselector, andvalue, but did not.</xs:documentation> </xs:annotation> <xs:complexType> <xs:attribute name="phrase" type="xs:string" use="optional"/> </xs:complexType> </xs:element> <xs:element name="uniqueness-failure" substitutionGroup="error-element"> <xs:annotation> <xs:documentation>This indicates thatattribute exists in the specified document,theserver returnsrequested operation would result in a document thatattribute. The MIME type ofdid not meet a uniqueness constraint defined by theresponse MUST be "application/xml-attribute-value", which contains an XMLapplication usage.</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="exists" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>For each URI, element or attributevalue formatted according to the grammar of AttValue in the XML 1.0 specifications. In all cases, ifspecified by thereferenced resource doesclient which is notexist, a 404unique, one of these isreturned. 7.4 DELETE Handling The semanticspresent.</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence minOccurs="0"> <xs:element name="alt-value" type="xs:string" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>An optional set ofDELETE are as specified in RFC 2616. This section clarifies the specific content toalternate values can bedeleted for a particular URI that represents an XCAP resource. If the request URI contains only a Document-URI, the server deletes the document specified byprovided.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> <xs:attribute name="field" type="xs:string" use="required"/> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="phrase" type="xs:string" use="optional"/> </xs:complexType> </xs:element> <xs:element name="not-well-formed" substitutionGroup="error-element"> <xs:annotation> <xs:documentation>This indicates that theURI if it exists and returns a 200 OK response, else returns a 404 response. Ifbody of the requestURI specifieswas not aNode-Selector, the server verifieswell-formed document.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="constraint-failure" substitutionGroup="error-element"> <xs:annotation> Rosenberg Expires January 14, 2005 [Page 39] Internet-Draft XCAP July 2004 <xs:documentation>This indicates that the requested operation would result in a documentspecifiedthat failed a data constraint defined by theDocument-URI exists. If it doesapplication usage, but notexist,enforced by theserver returnsschema or a404 (Not Found) response. Ifuniqueness constraint.</xs:documentation> </xs:annotation> </xs:element> </xs:schema> Rosenberg Expires January 14, 2005 [Page 40] Internet-Draft XCAP July 2004 10. XCAP Server Capabilities XCAP can be extended through thedocument does exist,addition of new application usages and extensions to thenode selector specifiescore protocol. An XCAP server can also be extended to support new namespaces. It will often be necessary for a client to determine what extensions, application usages or namespaces a server supports before making a request. To enable that, this specification defines anXML element that exists, that element is removed from the document. Ifapplication usage with the AUID "xcap-caps". All XCAP servers MUST support this application usage. This usage defines a single documentdoes exist, andwithin thenode selector specifies an XML attribute that exists inglobal tree which lists the capabilities of the server. Clients can read this well-known document,that attribute is removed fromand therefore learn thedocument. Ifcapabilities of thenode selector returns a no-match, a 404 (Not Found)server. The structure of the document isreturned. However, if removalsimple. The root element is <xcap-caps>. Its children are <auids>, <extensions>, and <namespaces>. Each of these contain a list of AUIDs, extensions and namespaces supported by the server. Extensions are named by tokens defined by the extension. Namespaces are identified by their namespace URI. Since all XCAP servers support theelement or attribute would result"xcap-caps" AUID, it MUST be listed ina document which does not comply withtheXML schema for<auids> element. The following sections provide the information needed to define this applicationusage,usage. 10.1 Application Usage ID (AUID) This specification defines theserver MUST NOT perform"xcap-caps" AUID within thedeletion, and MUST rejectIETF tree, via therequest with a 409 (Conflict). 7.5 Managing Etags An XCAP server MUST maintain entity tags for all resources that can be referenced by a URI within a particular document. RFC 2616 allows for entity tagsIANA registration in Section 13. 10.2 XML Schema <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="urn:ietf:xml:params:ns:xcap-caps" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:ietf:xml:params:ns:xcap-caps" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="xcap-caps"> <xs:annotation> <xs:documentation>Root element forone resource to be applied to other resources. In the casexcap-caps</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="auids"> <xs:annotation> <xs:documentation>List of supported AUID.</xs:documentation> </xs:annotation> Rosenberg Expires January 14, 2005 [Page 41] Internet-Draft XCAPresources, a server MUST use the same etagJuly 2004 <xs:complexType> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="auid" type="auidType"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="extensions"> <xs:annotation> <xs:documentation>List of supported extensions.</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="extension" type="extensionType"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="namespaces"> <xs:annotation> <xs:documentation>List of supported namespaces.</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="namespace" type="namespaceType"/> </xs:sequence> </xs:complexType> </xs:element> <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:simpleType name="auidType"> <xs:annotation> <xs:documentation>AUID Type</xs:documentation> </xs:annotation> <xs:restriction base="xs:string"/> </xs:simpleType> <xs:simpleType name="extensionType"> <xs:annotation> <xs:documentation>Extension Type</xs:documentation> </xs:annotation> <xs:restriction base="xs:string"/> </xs:simpleType> <xs:simpleType name="namespaceType"> <xs:annotation> <xs:documentation>Namespace type</xs:documentation> </xs:annotation> <xs:restriction base="xs:anyURI"/> </xs:simpleType> Rosenberg Expires January 14, 2005 [Page 42] Internet-Draft XCAP July 2004 </xs:schema> 10.3 MIME Type Documents conformant toreference all resources that define elements within a particular document. In other words,this schema are known by the MIME type "application/xcap-caps+xml", registered in Section 13.2.4. 10.4 Validation Constraints There are no additional validation constraints associated with this application usage. 10.5 Data Semantics Data semantics are defined above. 10.6 Naming Conventions A servereffectively maintainsMUST maintain asingle etag per document, and all resources within thatsingle instance of the documentinheritin thesame etag. This constraint is necessary for a client to make changes to various partsglobal tree, using the filename "index". There MUST NOT be an instance ofathis documenteven though it only posessesin theetag forusers tree. 10.7 Resource Interdependencies There are no resource interdependencies in this application usage beyond those defined by the schema. 10.8 Authorization Policies This application usage does not change the default authorization policy defined by XCAP. Rosenberg ExpiresAugust 15, 2004 [Page 28] Internet-Draft XCAP February 2004 overall document. Rosenberg Expires August 15, 2004January 14, 2005 [Page29]43] Internet-Draft XCAPFebruaryJuly 20048.11. Examples This section goes through several examples, making use of the resource-lists[22]and rls-services [23] XCAP applicationusage.usages. First, a user Bill creates a new document (see Section6.1).7.1). This document is a new resource-list, initially with a single list, called friends, with no users in it: PUThttp://xcap.example.com/services/presence-lists/users/bill/fr.xmlhttp://xcap.example.com/services/resource-lists/users/bill/fr.xml HTTP/1.1Content-Type:application/presence-lists+xmlContent-Type:application/resource-lists+xml <?xml version="1.0" encoding="UTF-8"?> <resource-listsxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">xmlns="urn:ietf:params:xml:ns:resource-lists"> <listname="friends" uri="sip:friends@example.com" subscribeable="true">name="friends"> </list> </resource-lists> Next, Bill creates an RLS services document defining a single RLS service referencing this list. This service has a URI of sip:myfriends@example.com: PUT http://xcap.example.com/services/rls-services/users/bill/index HTTP/1.1 Content-Type:application/rls-services+xml <?xml version="1.0" encoding="UTF-8"?> <rls-services xmlns="urn:ietf:params:xml:ns:rls-services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <service uri="sip:myfriends@example.com"> <resource-list>http://xcap.example.com/services/resource-lists/users/bill/fr.xml/~~/resource-lists/list%5b@name=%22friends%22%5d </resource-list> <packages> <package>presence</package> </packages> </service> </rls-services> Next, Bill creates an element inthisthe resource-lists document (Section6.4).7.4). In particular, he adds an entry to the list: Rosenberg Expires January 14, 2005 [Page 44] Internet-Draft XCAP July 2004 PUThttp://xcap.example.com/services/presence-lists/users/bill/fr.xml/ resource-lists/list[@name="friends"]/entryhttp://xcap.example.com/services/resource-lists/users/bill/fr.xml /~~/resource-lists/list%5b@name=%22friends%22%5d/entry HTTP/1.1Content-Type:application/xml-fragment-bodyContent-Type:application/xcap-el+xml <entryname="Bob"uri="sip:bob@example.com"> <display-name>Bob Jones</display-name> </entry> Next, Bill fetches the document (Section6.3):7.3): GEThttp://xcap.example.com/services/presence-lists/users/bill/fr.xmlhttp://xcap.example.com/services/resource-lists/users/bill/fr.xml HTTP/1.1 And the result is:Rosenberg Expires August 15, 2004 [Page 30] Internet-Draft XCAP February 2004HTTP/1.1 200 OK Etag: "wwhha" Content-Type:application/presence-lists+xmlapplication/resource-lists+xml <?xml version="1.0" encoding="UTF-8"?> <resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <listname="friends" uri="sip:friends@example.com" subscribeable="true">name="friends"> <entryname="Bob"uri="sip:bob@example.com"> <display-name>Bob Jones</display-name> </entry> </list> </resource-lists> Next, Bill adds another entry to the list, which is another list that has three entries. This is another element creation (Section6.4):7.4): Rosenberg Expires January 14, 2005 [Page 45] Internet-Draft XCAP July 2004 PUThttp://xcap.example.com/services/presence-lists/users/bill/fr.xml/ presence-lists/list[@name="friends"]/list[@name="close-friends"]http://xcap.example.com/services/resource-lists/users/bill/fr.xml/~~/ resource-lists/list%5b@name=%22friends%22%5d/list%5b@name=%22close-friends%22%5d HTTP/1.1 Content-Type: application/xml-fragment-body <listname="close-friends" uri="sip:close-friends@example.com" subscribeable="true">name="close-friends"> <entryname="Joe"uri="sip:joe@example.com"> <display-name>Joe Smith</display-name> </entry> <entryname="Nancy"uri="sip:nancy@example.com"> <display-name>Nancy Gross</display-name> </entry> <entryname="Petri"uri="sip:petri@example.com"> <display-name>Petri Aukia</display-name> </entry> </list> Then, Bill decides he doesnt want Petri on the list, so he deletes the entry (Section6.5):7.5): DELETEhttp://xcap.example.com/services/presence-lists/users/bill/fr.xml/ presence-lists/list/list/entry[@name="Petri"]http://xcap.example.com/services/resource-lists/users/bill/fr.xml/ ~~/resource-lists/list/list/entry%5b@uri=%22sip:petri@example.com%22%5d HTTP/1.1 Bill decides to check on the URI for Nancy, so he fetches a particular attribute (Section6.6): Rosenberg Expires August 15, 2004 [Page 31] Internet-Draft XCAP February 20047.6): GEThttp://xcap.example.com/services/presence-lists/users/bill/fr.xml/ presence-lists/list/list/entry[@name="Nancy"]/@urihttp://xcap.example.com/services/resource-lists/users/bill/fr.xml/ ~~/resource-lists/list/list/entry%5b2%5d/@uri HTTP/1.1 and the server responds: HTTP/1.1 200 OK Etag: "ad88"Content-Type:application/xml-attribute-valueContent-Type:application/xcap-att+xml "sip:nancy@example.com" Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page32]46] Internet-Draft XCAPFebruaryJuly 20049.12. Security Considerations Frequently, the data manipulated by XCAP contains sensitive information. To avoid eavesdroppers from seeing this information, it is RECOMMENDED that an admistrator hand out an https URI as the XCAP rootservicesURI. This will result in TLS-encrypted communications between the client and server, preventing any eavesdropping. Client and server authentication are also important. A client needs to be sure it is talking to the server it believes it is contacting. Otherwise, it may be given false information, which can lead to denial of service attacks against a client. To prevent this, a client SHOULD attempt to upgrade [14] any connections to TLS. Similarly, authorization of read and write operations against the data is important, and this requires client authentication. As a result, a server SHOULD challenge a client using HTTP Digest [10] to establish its identity, and this SHOULD be done over a TLS connection. Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page33]47] Internet-Draft XCAPFebruaryJuly 200410.13. IANA Considerations There are several IANA considerations associated with this specification.10.113.1 XCAP Application Usage IDs This specification instructs IANA to create a new registry for XCAP application usage IDs (AUIDs). This registry is defined as a table that contains three colums: AUID: This will be a string provided in the IANA registrations into the registry. Description: This is text that is supplied by the IANA registration into the registry. Document: This is a reference to the RFC containing the registration. This specification instructs IANA to create this table with an initial entry. The resulting table would look like: Application Unique Description Document ID (AUID) ----------------------------------------------------------- xcap-caps Capabilities of an RFC XXXX XCAP server [[NOTE TO IANA/RFC-EDITOR: Please replace XXXX with the RFC number of this specification.]] XCAP AUIDs are registered by the IANA when they are published in standards track RFCs. The IANA Considerations section of the RFC must include the following information, which appears in the IANA registry along with the RFC number of the publication. Name of the AUID. The name MAY be of any length, but SHOULD be no more than twenty characters long. The name MUST consist of alphanum [15] characters only. Descriptive text that describes the application usage.10.2 application/xml-fragment-body13.2 MIMETypeTypes This specificationregisters arequests the registration of several new MIMEtypetypes according to the procedures of RFC 2048 [7] and guidelines in RFC 3023 [8]. 13.2.1 application/xcap-el+xml MIME Type This specification registers a new MIME type according to the Rosenberg Expires January 14, 2005 [Page 48] Internet-Draft XCAP July 2004 MIME media type name: application MIME subtype name:xml-fragment-bodyxcap-el+xml Mandatory parameters: none Optional parameters: Same as charset parameter application/xml as specified in RFC 3023 [8]. Encoding considerations: Same as encoding considerations of application/xml as specified in RFC 3023 [8]. Security considerations: See Section 10 of RFC 3023 [8]. Interoperability considerations: none. Published specification:The XML Fragment Interchange [4], which defines an XML fragment body as a well-balanced region of an XML document being considered as (logically and/or physically) separate from the rest of the document forRFC XXXX [[NOTE TO RFC EDITOR: Please replace XXXX with thepurposespublished RFC number ofdefining it as a fragment. Rosenberg Expires August 15, 2004 [Page 34] Internet-Draft XCAP February 2004this specification.]] Applications which use this media type: This document type has been used to support transport of XML fragment bodies in RFC XXXX [[NOTE TO RFC EDITOR: Please replace XXXX with the published RFC number of this specification.]], the XML Configuration Access Protocol (XCAP). Additional Information: Magic Number: None File Extension:.xfb.xel or .xml Macintosh file type code: "TEXT" Personal and email address for further information: Jonathan Rosenberg, jdrosen@jdrosen.net Intended usage: COMMON Author/Change controller: The IETF.10.3 application/xml-attribute-value13.2.2 application/xcap-att+xml MIME TypeThis specification registers a new MIME type according to the procedures of RFC 2048 [7] and guidelines in RFC 3023 [8].MIME media type name: application MIME subtype name:xml-attribute-valuexcap-att+xml Mandatory parameters: none Optional parameters: Same as charset parameter application/xml as specified in RFC 3023 [8]. Encoding considerations: Same as encoding considerations of application/xml as specified in RFC 3023 [8]. Security considerations: See Section 10 of RFC 3023 [8]. Interoperability considerations: none. Published specification:An entityRFC XXXX [[NOTE TO RFC EDITOR: Please replace XXXX with the published RFC number of thisMIMEspecification.]]. Applications which use this media type: This document typeis complianthas been used tothe grammar for AttValue as specifiedsupport transport of XML attribute values in RFC XXXX [[NOTE TO RFC EDITOR: Please replace XXXX with the published RFC number of this specification.]], the XML1.0 [1].Configuration Access Protocol (XCAP). Additional Information: Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page35]49] Internet-Draft XCAPFebruaryJuly 2004 Magic Number: None File Extension: .xav Macintosh file type code: "TEXT" Personal and email address for further information: Jonathan Rosenberg, jdrosen@jdrosen.net Intended usage: COMMON Author/Change controller: The IETF. 13.2.3 application/xcap-error+xml MIME Type MIME media type name: application MIME subtype name: xcap-error+xml Mandatory parameters: none Optional parameters: Same as charset parameter application/xml as specified in RFC 3023 [8]. Encoding considerations: Same as encoding considerations of application/xml as specified in RFC 3023 [8]. Security considerations: See Section 10 of RFC 3023 [8]. Interoperability considerations: none. Published specification: This specification. Applications which use this media type: This document typehas been used to support transport of XML attribute valuesconveys error conditions defined in RFCXXXXXXXX. [[NOTE TO RFC EDITOR: Please replace XXXX with the published RFC number of thisspecification.]], the XML Configuration Access Protocol (XCAP).specification.]] Additional Information: Magic Number: None File Extension:.xav.xe Macintosh file type code: "TEXT" Personal and email address for further information: Jonathan Rosenberg, jdrosen@jdrosen.net Intended usage: COMMON Author/Change controller: The IETF.10.4 application/xcap-error+xml13.2.4 application/xcap-caps+xml MIME TypeThis specification registers a new MIME type according to the procedures of RFC 2048 [7] and guidelines in RFC 3023 [8].MIME media type name: application MIME subtype name:xcap-error+xmlxcap-caps+xml Mandatory parameters: none Optional parameters: Same as charset parameter application/xml as specified in RFC 3023 [8]. Encoding considerations: Same as encoding considerations of application/xml as specified in RFC 3023 [8]. Security considerations: See Section 10 of RFC 3023 [8]. Interoperability considerations: none. Published specification: This specification. Applications which use this media type: This document type conveyserror conditionscapabililites of an XML Configuration Access Protocol (XCAP) server, as defined in RFC XXXX. [[NOTE TO RFC EDITOR: Please replace XXXX with the published RFC number of this specification.]] Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page36]50] Internet-Draft XCAPFebruaryJuly 2004specification.]]Additional Information: Magic Number: None File Extension: .xe Macintosh file type code: "TEXT" Personal and email address for further information: Jonathan Rosenberg, jdrosen@jdrosen.net Intended usage: COMMON Author/Change controller: The IETF.10.513.3 URN Sub-NamespaceRegistration for urn:ietf:params:xml:ns:xcap-must-understandRegistrations Thissectionspecification registersaseveral new XMLnamespace,namespaces, as per the guidelines in RFC 3688 [16]. 13.3.1 urn:ietf:params:xml:ns:xcap-error URI: The URI for this namespace isurn:ietf:params:xml:ns:xcap-must-understandurn:ietf:params:xml:ns:xcap-error Registrant Contact: IETF, SIMPLE working group, (simple@ietf.org), Jonathan Rosenberg (jdrosen@jdrosen.net). XML: BEGIN <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"/><title>Resource Lists<title>XCAP Error Namespace</title> </head> <body> <h1>Namespace for XCAPMust Understand Element</h1> <h2>urn:ietf:params:xml:ns:xcap-must-understand</h2>Error Documents</h1> <h2>urn:ietf:params:xml:ns:xcap-error</h2> <p>See <ahref="[[[URLhref="[URL of publishedRFC]]]">RFCXXXX</a>.</p>RFC]">RFCXXXX [[NOTE TO RFC-EDITOR/IANA: Please replace XXXX with the RFC Number of this specification]]</a>.</p> </body>Rosenberg Expires August 15, 2004 [Page 37] Internet-Draft XCAP February 2004</html> END10.6 URN Sub-Namespace Registration for urn:ietf:params:xml:ns:xcap-error This section registers a new XML namespace, as per the guidelines in RFC 3688 [16].13.3.2 urn:ietf:params:xml:ns:xcap-caps URI: The URI for this namespace isurn:ietf:params:xml:ns:xcap-errorurn:ietf:params:xml:ns:xcap-caps Registrant Contact: IETF, SIMPLE working group, (simple@ietf.org), Jonathan Rosenberg (jdrosen@jdrosen.net). Rosenberg Expires January 14, 2005 [Page 51] Internet-Draft XCAP July 2004 XML: BEGIN <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"/><title>Resource Lists<title>XCAP Capabilities Namespace</title> </head> <body> <h1>Namespace for XCAPErrorCapability Documents</h1><h2>urn:ietf:params:xml:ns:xcap-error</h2><h2>urn:ietf:params:xml:ns:xcap-caps</h2> <p>See <ahref="[[[URLhref="[URL of publishedRFC]]]">RFCXXXX</a>.</p>RFC]">RFCXXXX [[NOTE TO RFC-EDITOR/IANA: Please replace XXXX with the RFC Number of this specification]]</a>.</p> </body> </html> END10.7 XCAP Error13.4 XML SchemaRegistrationRegistrations This section registersantwo XMLschemaschemas per the procedures in [16]. 13.4.1 XCAP Error Schema Registration URI:please assign.urn:ietf:params:xml:schema:xcap-error Registrant Contact: IETF, SIMPLE working group, (simple@ietf.org), Jonathan Rosenberg (jdrosen@jdrosen.net).Rosenberg Expires August 15, 2004 [Page 38] Internet-Draft XCAP February 2004XML Schema: The XML for this schema can be found as the sole content of Section7.2.1.1. 10.89.2. 13.4.2 XCAPMandatory NamespaceCapabilities Schema RegistrationThis section registers an XML schema per the procedures in [16].URI:please assign.urn:ietf:params:xml:schema:xcap-caps Registrant Contact: IETF, SIMPLE working group, (simple@ietf.org), Jonathan Rosenberg (jdrosen@jdrosen.net). XML Schema: The XML for this schema can be found as the sole content of Section4.7.1.10.2. Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page39]52] Internet-Draft XCAPFebruaryJuly 200411.14. Acknowledgements The author would like to thank Ben Campbell, Eva-Maria Leppanen, Hisham Khartabil,andChrisNewmanNewman, Joel Halpern, Jari Urpalainen, and Lisa Dusseault for their input and comments. A special thanks to Ted Hardie for his input and support. Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page40]53] Internet-Draft XCAPFebruaryJuly 2004 15. References 15.1 Normative References [1] Bray, T., Paoli, J., Sperberg-McQueen, C. and E. Maler, "Extensible Markup Language (XML) 1.0 (Second Edition)", W3C FirstEdition REC-xml-20001006, October 2000. [2] Thompson, H., Beech, D., Maloney, M. and N. Mendelsohn, "XML Schema Part 1: Structures", W3C REC REC-xmlschema-1-20010502, May 2001. [3] Bray, T., Hollander, D. and A. Layman, "Namespaces in XML", W3C REC REC-xml-names-19990114, January 1999. [4] Grosso, P. and D. Veillard, "XML Fragment Interchange", W3C CR CR-xml-fragment-20010212, February 2001. [5] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. [6] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [7] Freed, N., Klensin, J. and J. Postel, "Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures", BCP 13, RFC 2048, November 1996. [8] Murata, M., St. Laurent, S. and D. Kohn, "XML Media Types", RFC 3023, January 2001. [9] Clark, J. and S. DeRose, "XML Path Language (XPath) Version 1.0", W3C REC REC-xpath-19991116, November 1999. [10] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., Leach, P., Luotonen, A. and L. Stewart, "HTTP Authentication: Basic and Digest Access Authentication", RFC 2617, June 1999. [11] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997. [12] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998. [13] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. Rosenberg Expires January 14, 2005 [Page 54] Internet-Draft XCAP July 2004 [14] Khare, R. and S. Lawrence, "Upgrading to TLS Within HTTP/1.1", RFC 2817, May 2000.Rosenberg Expires August 15, 2004 [Page 41] Internet-Draft XCAP February 2004[15] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M. and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002. [16] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, January 2004.Rosenberg Expires August 15, 2004 [Page 42] Internet-Draft XCAP February 2004[17] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003. 15.2 Informative References[17][18] Rosenberg, J., "A Presence Event Package for the Session Initiation Protocol (SIP)", draft-ietf-simple-presence-10 (work in progress), January 2003.[18][19] Rosenberg, J., "A Watcher Information Event Template-Package for the Session Initiation Protocol (SIP)", draft-ietf-simple-winfo-package-05 (work in progress), January 2003.[19][20] Rosenberg, J., "An Extensible Markup Language (XML) Based Format for Watcher Information", draft-ietf-simple-winfo-format-04 (work in progress), January 2003.[20][21] Roach, A., Rosenberg, J. and B. Campbell, "A Session Initiation Protocol (SIP) Event Notification Extension for Resource Lists", draft-ietf-simple-event-list-04 (work in progress), June 2003.[21][22] Rosenberg, J. and M. Isomaki, "Requirements for Manipulation of Data Elements in Session Initiation Protocol (SIP) for Instant Messaging and Presence Leveraging Extensions (SIMPLE) Systems", draft-ietf-simple-data-req-03 (work in progress), June 2003.[22][23] Rosenberg, J., "An Extensible Markup Language (XML) Configuration Access Protocol (XCAP) Usage for Presence Lists",draft-ietf-simple-xcap-list-usage-01draft-ietf-simple-xcap-list-usage-02 (work in progress), February 2004. [24] Peterson, J., "Common Profile for Presence (CPP)", draft-ietf-impp-pres-04 (work in progress), October 2003.[23][25] Newman, C. and J. Myers, "ACAP -- Application Configuration Rosenberg Expires January 14, 2005 [Page 55] Internet-Draft XCAP July 2004 Access Protocol", RFC 2244, November 1997.[24][26] Day, M., Rosenberg, J. and H. Sugano, "A Model for Presence and Instant Messaging", RFC 2778, February 2000. [27] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.[25][28] Roach, A., "Session Initiation Protocol (SIP)-Specific Event Notification", RFC 3265, June 2002.Rosenberg Expires August 15, 2004 [Page 43] Internet-Draft XCAP February 2004Author's Address Jonathan Rosenberg dynamicsoft 600 Lanidex Plaza Parsippany, NJ 07054 US Phone: +1 973 952-5000 EMail: jdrosen@dynamicsoft.com URI: http://www.jdrosen.net Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page44]56] Internet-Draft XCAPFebruaryJuly 2004 Intellectual Property Statement The IETF takes no position regarding the validity or scope of anyintellectual propertyIntellectual 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;neithernor does it represent that it has made any independent effort to identify any such rights. Information on theIETF'sprocedures with respect to rights instandards-track and standards-related documentationRFC documents can be found inBCP-11.BCP 78 and BCP 79. Copies ofclaims of rightsIPR disclosures madeavailable for publicationto 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 byimplementorsimplementers or users of this specification can be obtained from the IETFSecretariat.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 rightswhichthat may cover technology that may be required topracticeimplement this standard. Please address the information to the IETFExecutive Director. Full Copyright Statement Copyright (C) The Internet Society (2004). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purposeat ietf-ipr@ietf.org. Disclaimer ofdeveloping Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assignees.Validity This document and the information contained hereinisare 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 FORCEDISCLAIMSDISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATIONRosenberg Expires August 15, 2004 [Page 45] Internet-Draft XCAP February 2004HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Copyright Statement Copyright (C) The Internet Society (2004). 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. Acknowledgment Funding for the RFC Editor function is currently provided by the Internet Society. Rosenberg ExpiresAugust 15, 2004January 14, 2005 [Page46]57] ----