SIMPLE WG M. Lonnfors Internet-Draft E. Leppanen Expires: April 25, 2005 H. Khartabil Nokia J. Urpalainen Nokia Research Center October 25, 2004 Presence Information Data format (PIDF) Extension for Partial Presence draft-ietf-simple-partial-pidf-format-02 Status of this Memo This document is an Internet-Draft and is subject to all provisions of section 3 of RFC 3667. By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she become aware will be disclosed, in accordance with 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 at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on April 25, 2005. Copyright Notice Copyright (C) The Internet Society (2004). Abstract The Presence Information Document Format (PIDF) specifies the baseline XML based format for describing presence information. One of the characteristic of the PIDF is that document always needs to Lonnfors, et al. Expires April 25, 2005 [Page 1] Internet-Draft Partial PIDF October 2004 carry all presence information available for the presentity. In some environments where low bandwidth and high latency links can exist it is often beneficial to limit the amount of information that is transported over the network. This document introduces a new MIME type which enables transporting of only changed parts of the PIDF based presence information. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Structure of partial PIDF documents . . . . . . . . . . . . . 3 3.1 "version" attribute . . . . . . . . . . . . . . . . . . . 4 3.2 "entity" attribute . . . . . . . . . . . . . . . . . . . . 5 3.3 element . . . . . . . . . . . . . . . . . . . . . . 5 3.4 element . . . . . . . . . . . . . . . . . . . . 5 3.5 element . . . . . . . . . . . . . . . . . . . . . 5 4. Usage of 'application/pidf-diff+xml' . . . . . . . . . . . . . 5 5. Node Selector . . . . . . . . . . . . . . . . . . . . . . . . 6 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 6.1 Content-type registration for 'application/pidf-diff+xml' . . . . . . . . . . . . . . . 6 6.2 URN sub-namespace registration for 'urn:ietf:params:xml:ns:pidf-diff' . . . . . . . . . . . . 7 7. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 8. XML Schema . . . . . . . . . . . . . . . . . . . . . . . . . . 12 9. Interoperability Considerations . . . . . . . . . . . . . . . 13 10. Security Considerations . . . . . . . . . . . . . . . . . . 14 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . 14 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 12.1 Normative references . . . . . . . . . . . . . . . . . . . . 14 12.2 Informative references . . . . . . . . . . . . . . . . . . . 14 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 15 Intellectual Property and Copyright Statements . . . . . . . . 17 Lonnfors, et al. Expires April 25, 2005 [Page 2] Internet-Draft Partial PIDF October 2004 1. Introduction The Presence Information Document Format (PIDF) specifies the baseline XML based format for describing presence information. One of the characteristic of the PIDF is that document always needs to carry all presence information available for the presentity. In some environments where low bandwidth and high latency links can exist it is often beneficial to limit the amount of information that is transported over the network. This document introduces a new MIME-Type 'application/pidf-diff+xml' which enables transporting of only changed parts of the PIDF based presence information. 2. Conventions 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 [1] and indicate requirement levels for compliant implementations. This memo makes use of the vocabulary defined in RFC2778 [2]. In addition, the following terms are defined: Full presence document: A presence document that contains all the presentity's presence information that is available to a particular watcher. Partial presence document: A presence document that represents a fragment of the full presence document. A partial presence documents can only be understood in the context of the full presence document, i.e., a partial presence document modifies a local copy of the full presence document. A document with MIME type 'application/pidf-diff+xml' represents a partial presence document. 3. Structure of partial PIDF documents The mechanism for implementing the partial PIDF requires defining a new MIME type which is named as 'application/pidf-diff+xml'. The data format is in principle similar to XCAP package [12] except that instead of the ETag a "version" attribute is used to ensure consistent updates. The "version" attribute contains a sequence number that is progressively incremented by one between subsequent document updates i.e. a more recent document update has a higher "version" value than the previous one. The recipient of the document Lonnfors, et al. Expires April 25, 2005 [Page 3] Internet-Draft Partial PIDF October 2004 can use the "version" attribute to properly order received documents. The partial PIDF document contains a collection of add, remove or replace operations which will be applied one-by-one in the given order to the current local composition presence document. Each of the operations contains at least one XPath [15] compatible selector which is used to select a specific part within the local document. Furthermore, also the changed or added data content is given. For example, when an add operation is being requested, the element onto which new data is going to be appended is searched first and then the new content is added. It is an error condition if any of the given operations can not be unambiguously fulfilled. In order to keep the update document as small as possible, the defined namespace prefixes and uri's within the current local document are used to expand location step prefixes just like in XCAP [11]. Given the full presence document is using a "pres" prefixed namespace definition and there's a selector "pres:presence" that has to be interpreted, the namespace definition has to be found from the local composition document. As node happens to be the root node the definition for the namespace uri must be within that node. As default namespaces can also be used, a selector like "presence" is interpreted as if it had an implicit default namespace uri attached. It should be noted that when using add operation it is also possible that the namespace definition can be within the content of corresponding element. Implementations using this document format must follow guidelines specified in the PIDF [4]. Specifically, the XML document MUST be well formed and SHOULD be valid. Presence documents MUST be based on XML 1.0 and MUST be encoded using UTF-8. This specification makes use of XML namespaces for identifying presence documents and document fragments. The namespace URI for elements defined by this specification is a URN [5], using the namespace identifier 'ietf' specified in RFC 2648 [6] and extended by RFC3688 [7]. This URN is: urn:ietf:params:xml:ns:pidf-diff 3.1 "version" attribute Every presence document compliant with this specification contains a "version" attribute in the element. Implementations MUST support a 32 bit integer in the version number. Lonnfors, et al. Expires April 25, 2005 [Page 4] Internet-Draft Partial PIDF October 2004 3.2 "entity" attribute Every presence document compliant with this specification may contain an "entity" attribute in element. It's content MUST then be the same than that of the full presence document. 3.3 element The element has two selection attributes: "parent" and "sel". The content of the "parent" attribute is used to select a single element from the local composition document onto which new data will be appended. The second selector "sel" is a relative location step that will uniquely point after the append to the newly created element, text-node content or attribute within the "parent" selection context. If there are several sibling elements in the new document the "sel" selector MUST include a position constraint to fulfill an unambiguous request. The content of the element is text for attributes and elements which have only text-content i.e. XPath text() function is being used in the last location step. For other elements the content of element is enclosed with CDATA section and it inludes all the attributes and child elements and e.g. possible namespace definitions. 3.4 element The element has only one attribute: "sel" the content of which is used to select an element, a text-node content or an attribute that is going to be replaced with the new content. The content of the element is the same as with operation. 3.5 element The element has only one attribute: "sel" the content of which is used to select an element, text-node content or an attribute that is going to be removed. 4. Usage of 'application/pidf-diff+xml' The partial presence document SHOULD only contain those elements or attributes that have changed. However, when there are a lot of queued changes it may be desirable to send the full presence document content instead. How this will be done in practice is beyond the scope of this document. This document format allows to use the root node selector i.e. "presence" which actually contains the full content of the presence document as there can only be one root node in any valid XML document. It should be noted that it is still impossible to create a new document with this format, i.e. first the full presence document has to be sent with the PIDF format and then Lonnfors, et al. Expires April 25, 2005 [Page 5] Internet-Draft Partial PIDF October 2004 only patches are sent with this format. 5. Node Selector The ABNF [14] is used to describe the syntax for the node selector expressions. The node selector syntax is defined to be XPath [15] compatible, but has a more restricted set of capabilities. Each element selection has to point to a single node. As the document root is always the starting point for selections relative location paths can be used. node-sel = element-sel ["/" (attribute-sel / "text()")] element-sel = element-step *("/" element-step) element-step = ("*" / node-name) [conditions] conditions = *("[" condition "]") condition = 1*DIGIT / ; positional cond-name "=" <"> value <"> ; value comparison cond-name = "@" node-name / ; attribute selection node-name / ; element selection "." ; current node selection node-name = [prefix ":"] string prefix = string = value = attribute-sel = "@" node-name 6. IANA Considerations This memo calls for IANA to: o register a new XML namespace URN per [7]. o register a new content type 'application/pidf-diff+xml' per RFC2048 [10]. 6.1 Content-type registration for 'application/pidf-diff+xml' MIME media type name: application MIME subtype name: pidf-diff+xml Lonnfors, et al. Expires April 25, 2005 [Page 6] Internet-Draft Partial PIDF October 2004 Mandatory parameters: none Optional parameters: charset Indicates the character encoding of enclosed XML. Default is UTF-8. Encoding considerations: Uses XML, which can employ 8-bit characters, depending on the character encoding used. See RFC 3023 [8], section 3.2. Security considerations: This content type is designed to carry presence data, which may be considered private information. Appropriate precautions should be adopted to limit disclosure of this information. Please refer to [[[RFCXXXX]]] security considerations section for more information. Interoperability considerations: none Published specification: [[[RFCXXXX]]] Applications which use this media type: SIP-based presence systems Additional information: Magic Number: None File Extension: .xml Macintosh file type code: "TEXT" Personal and email address for further information: Mikko Lonnfors, mikko.lonnfors@nokia.com Intended usage: LIMITED USE Author/Change controller: This specification is a work item of the IETF SIMPLE working group, with mailing list address . 6.2 URN sub-namespace registration for 'urn:ietf:params:xml:ns:pidf-diff' URI: urn:ietf:params:xml:ns:pidf-diff Description: Lonnfors, et al. Expires April 25, 2005 [Page 7] Internet-Draft Partial PIDF October 2004 This is the XML namespace for XML elements defined by [[[RFCXXXX]]] to describe the 'application/pidf-diff+xml' content type for partial PIDF. Registrant Contact: IETF, SIMPLE working group, Mikko Lonnfors, XML: BEGIN PIDF extension for partial PIDF

Namespace for PIDF extension for partial notifications

urn:ietf:params:xml:ns:pidf-diff

See RFCXXXX.

END 7. Examples An 'application/pidf+xml' document that contains full state information: Lonnfors, et al. Expires April 25, 2005 [Page 8] Internet-Draft Partial PIDF October 2004 open assistant false true true tel:09012345678 open im:pep@example.com closed meeting http://example.com/~pep/ http://example.com/~pep/icon.gif http://example.com/~pep/card.vcd sip:pep@example.com on-the-phone busy Lonnfors, et al. Expires April 25, 2005 [Page 9] Internet-Draft Partial PIDF October 2004 Full state presence document An 'application/pidf-diff+xml' document that contains partial updates: open mailto:pep@example.com This is a new tuple inserted between the last tuple and person element ]] > open 0.7 An updated local composition presence document: open assistant false true true tel:09012345678 open im:pep@example.com open http://example.com/~pep/ http://example.com/~pep/icon.gif http://example.com/~pep/card.vcd sip:pep@example.com open mailto:pep@example.com This is a new tuple inserted between the last tuple and person element Lonnfors, et al. Expires April 25, 2005 [Page 11] Internet-Draft Partial PIDF October 2004 on-the-phone Full state presence document 8. XML Schema The XML schema for the 'application/pidf-diff+xml' data format. Lonnfors, et al. Expires April 25, 2005 [Page 12] Internet-Draft Partial PIDF October 2004 9. Interoperability Considerations Systems compliant with CPP [9] will not be by default able to use this specification. However, this will not cause any interoperability problems because all endpoints and gateways must support the default MIME type (application/pidf+xml) regardless if they support this specification. Thus if a gateway or another end point does not understand this specification it will not be used. Other CPP compliant (other than SIP based) systems can also support this specification if they have a mechanism to indicate support for it. If they do it is possible to build a gateway which will preserve end-to-end integrity with usage of partial PIDF. Lonnfors, et al. Expires April 25, 2005 [Page 13] Internet-Draft Partial PIDF October 2004 10. Security Considerations Presence information may contain highly sensitive information about the presentities. The protocol used to distribute it SHOULD ensure privacy, message integrity and authentication. Furthermore, the protocol should provide access controls which restrict who can see who else's presence information. All security considerations identified for PIDF [4] apply unchanged for this document. 11. Acknowledgments The authors would like to thank Jose Costa-Requena, Jyrki Aarnos, Jonathan Rosenberg, Dean Willis, Miguel Garcia, Kriztian Kiss, Ben Cambell, Robert Sparks, Anders kristenssen and Aki Niemi for their valuable comments and contributions. 12. References 12.1 Normative references [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [2] Day, M., Rosenberg, J. and H. Sugano, "A Model for Presence and Instant Messaging", RFC 2778, February 2000. [3] Rosenberg, J., "SIP Extensions for Presence", draft-ietf-simple-presence-10 (work in progress), January 2003. [4] Sugano, H., "CPIM presence information data format", RFC 3863, May 2003. [5] Moats, R., "URN syntax", RFC 2141, May 1997. [6] Moats, R., "A URN namespace for IETF documents", RFC 2648, Aug. 1999. 12.2 Informative references [7] Mealling, M., "The IETF XML Registry", RFC 3688, BCP 81, January 2004. [8] Murata, M., "XML media types", RFC 3023, January 2001. [9] Peterson, J., "Common Profile for Presence (CPP)", RFC 3859. [10] Freed, N., Klensin, J. and J. Postel, "Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures", RFC Lonnfors, et al. Expires April 25, 2005 [Page 14] Internet-Draft Partial PIDF October 2004 2048, November 1996. [11] Rosenberg, J., "The Extensible Markup Language (XML) Configuration Access Protoco (XCAP)", draft-ietf-simple-xcap-04 (work in progress), October 2004. [12] Rosenberg, J., "An Extensible Markup Language (XML) Document Format For Indicating Changes in XML Configuration Access Protocol (XCAP) Resources", draft-ietf-simple-xcap-package-02 (work in progress), July 2004. [13] Rosenberg, J., "A Data Model for Presence", draft-ietf-simple-presence-data-model-00 (work in progress), September 2004. [14] Crocker, D., "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997. [15] "XML Path Language (XPath) Version 1.0", W3C REC REC-xpath-19991116 , November 1999. Authors' Addresses Mikko Lonnfors Nokia Itamerenkatu 11-13 00180 Helsinki Finland Phone: +358 71 8008000 EMail: mikko.lonnfors@nokia.com Eva Leppanen Nokia P.O BOX 785 Tampere Finland Phone: +358 7180 77066 EMail: eva-maria.leppanen@nokia.com Lonnfors, et al. Expires April 25, 2005 [Page 15] Internet-Draft Partial PIDF October 2004 Hisham Khartabil Nokia P.O. Box 321 Helsinki Finland Phone: +358 7180 76161 EMail: hisham.khartabil@nokia.com Jari Urpalainen Nokia Research Center Itamerenkatu 11-13 00180 Helsinki Finland Phone: +358 7180 37686 EMail: jari.urpalainen@nokia.com Lonnfors, et al. Expires April 25, 2005 [Page 16] Internet-Draft Partial PIDF October 2004 Intellectual Property Statement The IETF takes no position regarding the validity or scope of any Intellectual 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; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to 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 by implementers or users of this specification can be obtained from the IETF 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 rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Disclaimer of Validity This document and the information contained herein are 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 FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN 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. Lonnfors, et al. Expires April 25, 2005 [Page 17]