The XCAP specification defines how an HTTP Web address
can identify the way XML documents are stored on an XCAP server. It
also defines how the URI can be used to identify entire XML documents,
individual elements, or XML attributes that can be retrieved, updated,
or deleted.
The XML documents are stored on an XCAP server, which acts as a
repository for documents with each application having access to multiple
documents for each user. Each XCAP resource on an XCAP server has
an associated application. For the associated application to use the
XCAP resources, the application must have the following usage information:
- An Application Unique ID (AUID), which uniquely identifies the
application usage, must be created.
- An XML schema must be defined.
- The default namespace binding, which maps the namespace prefixes
to the namespace URIs, must be set.
- The MIME type of the document must be defined.
- The XCAP server must be able to validate the content of each XCAP
document that is being modified.
- The XML documents to be managed for an application must be well-formed.
- Naming conventions for XCAP client URIs must be set.
- Resource interdependencies, how changes to one resource will affect
other resources, have to be determined.
XCAP URI
The XCAP URI identifies the type
of XML that is being stored or accessed, a unique identification of
the XML document, and optionally, an XPath expression that can identify
a specific XML node that is to be stored, deleted, or retrieved.
The
general form of an XCAP URI used to access an XML document is as follows:
XCAP
Root/AUID/Document Selector/~~/Node
Selector- XCAP Root identifies the HTTP request host,
port, and context root.
- Example: http://myhost.ibm.com:9080/services/
- AUID is the XCAP Application Unique ID. This
identifies the type of XML document. Some AUIDs are defined within
XCAP Usage specifications, user defined AUIDs can be developed using
the XDMS toolkit.
- Examples: resource-lists or rls-services
- Document Selector is the portion of the URI
which identifies the specific document to be stored or accessed.
XCAP documents are segregated into two tree branches. The global
branch contains documents which can only be created by administrators,
but accessed by anybody. The users branch contains user-specific
documents.
- /~~/ is a separator between the document selector, and an optional
Node Selector.
- Node Selector is a limited XPath expression
that can be used to identify a specific XML element or attribute which
is to be updated, retrieved, or deleted.
A complete XCAP URI might look like this:
http://myhost.ibm.com:9080/services/rls-services/users/sip:user1@example.com/exampdoc.xml/~~/exampelement