Subject: [Simple] Implementation problem with XCAP / Common-Policy

From: [email-masked]
Date: Fri, 1 Apr 2005 14:50:49 +0300

Hi,

During implementation we have found following problem with 
XCAP / Common-Policy. Let's assume that we have following list:

<identity>
 <id>user1</id>
 <id>user2</id>
 <id>user3</id>
</identity>
 
# If we want to add one new member to that list.

PUT .../identity
<id>user4</id>

# Don't work because user4 will replace whole list. 
# Whole list needs to be written again together with 
# added user, which is not efficient.

PUT .../identity/id
<id>user4</id>

# Method is not allowed in XCAP as we cannot refer to just 
# one specific element in the header 

If-None-Match: *
PUT .../identity/id[4]
<id>user4</id>

# As there are 3 id's already in the list, you
# can currently add this new (4th) entry as a positional 
# constraint

Below are described two possible proposals to fix this problem:

1) Change to XCAP: 

If-None-Match: *
PUT .../identity/id[.="user4"]
<id>user4</id>
 
# Refer to value of the element. Currently supported by XPath, 
# but not by XCAP. 

2) Change to Common-Policy:
 
If-None-Match: *
PUT .../identity/entry[@id="user4"]
<entry id="user4"/>

# With this way one id can be added to the list if also following 
# change is done to the definition of identity -element

# Current definition
<identiy>
 <id>user1</id>
 <id>user2</id>
 <id>user3</id>
</identity>
 
# New "working" definition
<identity>
 <entry id="user1"/>
 <entry id="user2"/>
 <entry id="user3"/> 
</identity>

Any comments?

BR, Antti

-------------------------------------------------------
Antti Laurila                                  
System Specialist
Nokia Networks
Tel. +35840 584 9280
Email: [email-masked]
http://www.nokia.com/openness
-------------------------------------------------------

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

---

From: Aki Niemi <[email-masked]>
Date: Tue, 05 Apr 2005 10:27:03 +0300

> 2) Change to Common-Policy:

...snip...

> # New "working" definition

This would seem like the easiest approach. Not a big change in syntax, 
and the id is unique enough to serve as a proper index here.

Cheers,
Aki