On Tue, 2005-11-15 at 12:09 +0530, ext Chooracken John wrote:
Hi,
After going though the XCAP draft, I have a query to be
cleared.
1. How do I add multiple elements into a document? Is it
supported in the current release?
No. There's an expired draft called multi-insert, where unions could be
used to add several elements at the same time.
For e.g.:
Consider that, the following document is available on the server:
<service uri="sip:correctname at example.com">
<list name="family">
<rl:entry uri="sip:vernon.keel at example.com"/>
</list>
<packages>
<package>presence</package>
</packages>
</service>
a. How do I add new entries [multiple] in <list name =
âfamilyâ>.
My XML payload would be something like this:
<rl:entry uri="sip:johnc at example.com"/>
<rl:entry uri="sip:a19500 at example.com"/>
b. What should be the XCAP URI?
Thanks,
John
with multi-insert it would be (without escaping of course):
...~~/service/list[ at name="family"]/rl:entry[ at uri="sip:johnc at example.com"]|/service/list[ at name="family"]/rl:entry[ at uri="sip:a19500 at example.com"]?xmlns(rl=urn:...)
with payload:
<rl:entry uri="sip:johnc at example.com"/><rl:entry
uri="sip:a19500 at example.com"/>
an alternative with xml-patch-ops if there were a controversial http
patch-method:
xmlns="urn:..."
xmlns:rl="urn:..."
<add sel='service/list[ at name="family"]'>
<rl:entry uri="sip:johnc at example.com"/>
<rl:entry uri="sip:a19500 at example.com"/>
</add>
So instead in practice, you'll have to resort to multiple, perhaps
pipelined requests to do what you want.
br,
Jari
_______________________________________________
Simple mailing list
Simple at ietf.org
https://www1.ietf.org/mailman/listinfo/simple