Subject: [Simple] XCAP issue 6: selecting elements by text value

From: Jonathan Rosenberg <[email-masked]>
Date: Mon, 10 May 2004 02:28:36 -0400

Currently, XCAP allows you to select an element (for deletion, 
modification, insertion, etc.) by its position amongst other siblings of 
the same parent, or by the value of an attribute. There is no way to 
select an element by its text value.

For example, consider this document:

<foo>
   <bar>Hi</bar>
   <bar>There</bar>
</foo>

There is no way to select the bar element whose content is "There" 
without knowing that this element is the second element under parent 
foo. If the client has not cached the entire document, its not likely to 
know the position.

This has come up as a limitation in modifying large ACL lists in CPCP, 
since each of the entries in the list of ACLs is the same element name, 
and differs only by text content.

This limitation is easily fixed by adding support for the .= selector of 
text value. The following xcap expression would select the bar element 
whose value is "There":

http://server/xcap-root/document/foo/bar[.="There"]

This is a relatively easy change to do, and without it, we introduce a 
serious limitation (need to cache the whole document, or need to 
introduce unique attributes for each element). As such, I propose to add 
this feature.

Do folks agree?

Thanks,
Jonathan R.
-- 
Jonathan D. Rosenberg, Ph.D.                600 Lanidex Plaza
Chief Technology Officer                    Parsippany, NJ 07054-2711
dynamicsoft
[email-masked]                     FAX:   (973) 952-5050
http://www.jdrosen.net                      PHONE: (973) 952-5000
http://www.dynamicsoft.com

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

---

From: [email-masked]
Date: Mon, 10 May 2004 13:05:21 +0300

This works (at least in XMLSpy:).

/Hisham

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]]On Behalf Of
> ext Jonathan Rosenberg
> Sent: 10.May.2004 09:29
> To: Simple WG
> Subject: [Simple] XCAP issue 6: selecting elements by text value
> 
>

---

From: [email-masked]
Date: Mon, 10 May 2004 13:05:21 +0300

/Hisham