[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Simple] Implementation problem with XCAP / Common-Policy
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[ at 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: antti.k.laurila at nokia.com
http://www.nokia.com/openness
-------------------------------------------------------
_______________________________________________
Simple mailing list
Simple at ietf.org
https://www1.ietf.org/mailman/listinfo/simple