Subject: [Simple] SUBSCRIBE for xcap-diff event sent by the presence server to the XCAP server

From: Iñaki Baz Castillo <[email-masked]>
Date: Mon, 28 Dec 2009 00:36:15 +0100

Hi, the way a presence server receives notifications for changes in XCAP 
documents (so it can notify the watchers) is by subscribing to the XCAP server 
for the event "xcap-diff" as specified in:
  http://tools.ietf.org/html/draft-ietf-sip-xcapevent

I would like to understand how such SUBSCRIBE sent by the presence server 
looks. The above draft just shows examples when a SIP user send such SUBSCRIBE 
but no one example when the subscriber is the presence server.

For example, let's imagine a simplified case in which there are just two XCAP 
applications ("pres-rules" and "resource-lists").

The presence server should subscribe to users documents. AFAIK the presence 
server would send a SUBSCRIBE as follows:

   SUBSCRIBE sip:[email-masked] SIP/2.0
   From: sip:[email-masked]
   Accept: application/xcap-diff+xml
   Event: xcap-diff; diff-processing=no-patching
   Content-Type: application/resource-lists+xml

   <?xml version="1.0" encoding="UTF-8"?>
   <resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists">
     <list>
       <entry uri="pres-users/users/" />
       <entry uri="resource-lists/users/" />
     </list>
   </resource-lists>

Then when any user creates or modifies a XCAP document for those auids, then 
XCAP server would sent a NOTIFY to the presence-server telling the document 
addition/modification.

Doubts:

- Is the above correct? (is it defined somewhere?)

- Most probably the presence-server is just interested in "index" documents 
for both XCAP applications. However it would receive notifications for every 
document created by any user even if it's not called "index". Is it the 
expected behavior? How to ask in the SUBSCRIBE that there is noly interest on 
"index" called documents?

- Could the notification from the XCAP server to the presence server work with 
PUBLISH rather than SUBSCRIBE & NOTIFY? This is: when a XCAP document is 
modified the XCAP server sends a PUBLISH to the presence server with xcap-diff 
body. Does it make sense?

- And last question. Are all my questions defined in IETF docs? or do they 
require specifications on top of IETF docs as OMA specs?

Thanks a lot and best regards.

By sending the above XML body the 

-- 
Iñaki Baz Castillo <[email-masked]>