<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.2.3">
</HEAD>
<BODY>
Hi,<BR>
<BR>
I tried a simplified update URL with curl:&nbsp; curl --digest -u 111:111 -T pidf_modify.xml -H &quot;Content-Type: application/xcap-el+xml&quot; -X PUT <A HREF="http://192.168.0.130:5060/xcap-root/pidf-manipulation/users/sip:111@mydomain/index~~/presence/tuple/note">http://192.168.0.130:5060/xcap-root/pidf-manipulation/users/sip:111@mydomain/index~~/presence/tuple/note</A><BR>
<BR>
This &quot;correctly&quot; updated the &lt;note/&gt; nodes in both &lt;tuple/&gt; nodes of the document.&nbsp; So, the problem with the XCAP server appears to be over the %<A HREF="mailto:5b@id=">5b@id=</A>'x8eg92n'%5d that is used to identify a specific &lt;tuple/&gt; node.&nbsp; I believe, from searching online, that this is valid XPath syntax, so it does look like there is a bug here.<BR>
<BR>
Any idea?<BR>
<BR>
Thanks,<BR>
<BR>
Peter<BR>
<BR>
On Wed, 2012-04-04 at 17:19 +0100, Peter Dunkley wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
    Hi,<BR>
    <BR>
    I have been experimenting with uploading, and modifying existing, XCAP documents.&nbsp; I have been trying out the example from RFC 4827 and I can't get it to work with Kamailio.<BR>
    <BR>
    To upload the document (this works) I use the command: curl --digest -u 111:111 -T pidf.xml -X PUT <A HREF="http://192.168.0.130:5060/xcap-root/pidf-manipulation/users/sip:111@multifon.ru/index">http://192.168.0.130:5060/xcap-root/pidf-manipulation/users/sip:111@mydomain/index</A><BR>
    <BR>
    To modify the document (this doesn't work) I use the command: curl --digest -u 111:111 -T pidf_modify.xml -H &quot;Content-Type: application/xcap-el+xml&quot; -X PUT <A HREF="http://192.168.0.130:5060/xcap-root/pidf-manipulation/users/sip:111@multifon.ru/index~~/presence/tuple%5b@id='x8eg92n'%5d/note">http://192.168.0.130:5060/xcap-root/pidf-manipulation/users/sip:111@mydomain/index~~/presence/tuple%5b@id='x8eg92n'%5d/note</A><BR>
    <BR>
    When I try to modify the document I get the error: &quot;Apr&nbsp; 4 17:12:08 pd-laptop-linux kamailio[16862]: ERROR: xcap_server [xcap_server.c:596]: no new content&quot;<BR>
    <BR>
    I went through the XCAP server code and added some debug and found that the check on xcap_misc.c:491 is succeeding (which means &quot;no selection for xpath parent expression&quot;) and the document is not being changed.&nbsp; Also, from my limited understanding of XPath and libxml2, I would have expected the code path which should have been followed to go through the else clause of the conditional on xcap_misc.c:468 - which means I don't think that the xcaps_xpath_set() function is doing the right thing at all.<BR>
    <BR>
    Is there anyone here that is more familiar with libxml2 that can give me any pointers here.&nbsp; As far as I can tell the XCAP server code looks OK to me, and I believe the documents (attached) and my XCAP queries are correct as well.<BR>
    <BR>
    Thanks,<BR>
    <BR>
    Peter<BR>
    <BR>
    <TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<A HREF="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</A>
<A HREF="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</A>

</PRE>
</TD>
</TR>
</TABLE>
</BLOCKQUOTE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd
</PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>