Subject: RE: [Simple] xcap diff format in SIP notify message

From: [email-masked]
Date: Fri, 21 Oct 2005 11:10:20 +0200

Hi,

I am very sorry, but this is not solution for me, because I have to use I-D-xcap-package-03 while your solution is according to I-D-simple-xcap-diff-01. So, what would be the solution with I-D-xcap-package-03? Is there some way how to solve it?

br, Martin Hynar

P.S. However, your recommendations I can use for the next version.

-----Původní zpráva-----
Od: Jonathan Rosenberg [mailto:[email-masked]]
Odesláno: pá 21.10.2005 9:42
Komu: Hynar Martin
Kopie: [email-masked]
Předmět: Re: [Simple] xcap diff format in SIP notify message
 
responses inline.

[email-masked] wrote:

> Hi all,
> 
> Few weeks ago I sent the question to the SIMPLE mailing list but I haven't obtained any response. However, it is very important for me so I am asking again.
> 
> I am solving now the problem with communication using xcap-diff format specified in xcap-package-03. What is the issue:
> 
> 1. The server carries XML document.
> 2. A client requests to be notified about changes in this document with xcap-diff.
> 3. The document is replaced with new content begining from the root (XCAP PUT with no ETag -> replacement of the content)
> 4. The server tries to notify the client with message of the format
> 
> HEADERS
> <?xml version="1.0" encoding="UTF-8"?>
> <xcap-diff xmlns="urn:ietf:params:xml:ns:xcap-diff" xcap-root="http://localhost/xcap/xcap/">
> 
>   <document doc-selector="resource-lists/users/sip:[email-masked]/doc"
>             new-etag="aaaaa"
>             previous-etag="bbbbb">
> 
>   <replace-element element="/">
>     <![CDATA[<?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">
> 
>         <list name="list_name">
> 
>           ...
> 
>         </list>   
> 
>       </resource-lists>]]>
>   </replace-element>
> 
> </document>
> 
> </xcap-diff>
> 
> The question is whether the value "/" of attribute "element" is correct?

no. This case is described in xcap-diff. You would omit the node 
selector entirely. Note this text:

    operation.  Both <put-event> and <delete-event> have a single
    optional attribute, "node-selector", which contains the node selector
    in the Request URI (after removing any escape coding) of the HTTP PUT
    or DELETE request.  The server MUST include the "node-selector" when
    the PUT or DELETE operation was against an XML element or attribute.
    The "node-selector" attribute MUST NOT be present if the PUT or
    DELETE operation was against the document itself.  The <put-event>

> 
> Another problem is that I don't know what message should be sent in case of deletion of the document. In that case I am sending reference document with equal new-etag and prevoius-etag to let client refetch the document. Is this behaviour correct?

No. This is also described in the spec:

The "new-etag" attribute provides the
    etag for the document after the application of the changes, assuming
    the document exists after those changes.  If the change being
    reported is the deletion of the document, the "new-etag" attribute
    will not be present.

So, you'd include a previous-etag, no new-etag, and the change log would 
have a delete operation, and no node selector.

-Jonathan R.

-- 
Jonathan D. Rosenberg, Ph.D.                   600 Lanidex Plaza
Director, Service Provider VoIP Architecture   Parsippany, NJ 07054-2711
Cisco Systems
[email-masked]                              FAX:   (973) 952-5050
http://www.jdrosen.net                         PHONE: (973) 952-5000
http://www.cisco.com

_______________________________________________
Simple mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/simple

---

From: Jonathan Rosenberg <[email-masked]>
Date: Fri, 21 Oct 2005 10:28:43 -0400

No, it is not possible with this older version of the draft. These are 
bugs that were fixed in later revisions.

-Jonathan R.