Can you provide some motivating cases for 1 and 2? Is there
something in CPCP?
In CPCP, you might need to replace a resource in the ACL, or change
its access-type from allowed to blocked. The way XCAP is specified
now, as we discussed, you need to know the exact position for the
resource you want replace (they don't have unique IDs besides the URI
they carry). This might be ok, if we always assume that the client
has an exact copy of what is on the server. I.e. The client MUST
always know the number of elements present and provide the position
where to insert the new element as the last element, and therefore
knows the exact position of the element to replace.
This is really an important assumption to verify or reject.
If that can't be guaranteed then we need 1 and 2 above for CPCP.
My proposal is:
a. If there is an attribute that uniquely identifies an element, then
the client uses that to insert and/or replace. b. If there is no
attribute that uniquely identifies an element, then the client can
only insert an element as the last one in a list.
In both cases, I think that insertion should take place at the end of
the list. This vastly simplifies subsequent position based operations on
the document.