Subject: [Simple] xcap multiple insertions

From: Jari Urpalainen <[email-masked]>
Date: Thu, 04 Mar 2004 10:56:41 +0200

Hi Jonathan !

I read your XCAP representation in Seoul and I'll have a few comments.

When selection multiple entries you can't use union "|" there. Union is
used to select multiple location paths like

/element[@attr="test"] | /element/test

The working solution is to use position() function and "or" logical
expression i.e.

/element[position()=1 or position()=2]

Secondly, you may have missed my earlier posting, where I proposed that
index could be added onto XPATH expression when one wants to insert new
item at a specific location i.e.

/element[@attr="test"][2]

which says that you want to insert new item as second item and whose
attr="test" (assuming of course that you have already many elements and
the selection uniquely identifies the new item). As the selection
results as zeros nodes (does not exist yet) then you know that you want
to add this item and you effectively have to insert this new item
between the original first and second item. And certainly you can get
the same data with the same query afterwards.

I'll admit that I am not aware of use-cases for this but IMO the logic
is so simple that it could be allowed.

Furthermore, when you give examples I would prefer that you give
absolute location paths instead of relative as that is the semantics in
XCAP currently.

Btw. has anybody complained about the case how to detect file-part and
XPATH-query from each other ? I could propose that an additional slash
would be added there i.e. http://example.com/file.xml//list. This would
help if XPATH-set in XCAP would be extended e.g. with anywhere test
"//".

BR,
Jari

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