Subject: [Simple] (no subject)

From: Dhananjaya Reddy Eadala <[email-masked]>
Date: Fri, 16 Sep 2005 18:06:55 +0530

Hi,

This is regarding XCAP URI construction:

1. Assume that I have the following dhana.xml document
<ruleset>

    <rule id="rule1">
        <conditions>
            <other-identity>
        </conditions>
        <actions>
             <allow-invite>true</allow-invite>
        </actions>
    </rule>

</ruleset>

2. Assume that above document's XCAP URI is:
http://my.domain.com/services/org.openmobilealliance.poc-rules/users/sip:[email-masked]/dhana.xml

3. Suppose XCAP server receives the request with the following  URI 
and body details:

URI:
------

PUT /services/org.openmobilealliance.poc-rules/users/sip:[email-masked]/dhana.xml/~~/ruleset/rule

Body:

<rule id="something">
    <conditions>
        <is-list-member/>
    </conditions>
    <actions>
        <allow-invite>false</allow-invite>
    </actions>
</rule>

3. My question is : whether this request yields in replace the <rule>
child element of <ruleset> root element in the dhana.xml
OR
will it yields in adding second child element <rule> to the <ruleset> element

Thanks
Dhananjaya

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

---

From: Jari Urpalainen <[email-masked]>
Date: Fri, 16 Sep 2005 16:08:24 +0300

>will it yields in adding second child element <rule> to the <ruleset> element
If you have a single <rule> in your file as in your example, you are 
going to replace that rule with the put request. This is because an 
XPath request /ruleset/rule will  find the existing single <rule 
id="rule1"> and so you are thus replacing that rule element. If you want 
to append you'll have to give  put ...ruleset/rule[@id="something"]. (as 
well you could use  ...ruleset/rule[2])
br,
Jari