Subject: [Simple] xcap and xpath

From: Jonathan Rosenberg <[email-masked]>
Date: Mon, 21 Jul 2003 17:19:32 -0400

Folks,

During the meeting, Ted had suggested a potential simplification in 
xcap. Namely, don't use xpath at all. If we know ahead of times the 
specific "break points" in the schema where we know we will do atomic 
operations (I.e., buddies), just define each buddy as a resource, and 
define the buddy list as a separate resource, and specify the objects 
returned by querying those specific types.

I thought about this a bit. The problem I ran into is that one devices 
atomic unit is not the same as anothers.

Consider a PC application which just wants to pull its entire buddy 
list in one pass. If information for each buddy is a separate 
resource, it has to issue N separate HTTP GETs, one for each of the N 
buddies on the list. Worse yet, it would need to first fetch the 
"buddy list" resource, which presumably has references to the 
resources for each buddy.

Its more problematic when you want to update something. Lets say you 
want to add a buddy. A wireless client would need to PUT the XML 
document for this new buddy, and then modify the "buddy list" document 
to add a reference to the new buddy XML document. Thats two 
transactions, and one of them requires a GET/modify/PUT of a large 
document.

An optimization is to define a resource that actually returns the full 
buddy list with all of its buddies. If you think about it, this is 
exactly the optimiziation that xpath affords us.

So, I concluded that we want something like xpath, for buddy lists and 
for other usages we are likely to find.

However, xpath is quite a big spec, and way more than we need. What we 
really need is a way to identify a single XML element. We need to be 
able to identify it by its path from the root, where each branch is 
defined by element name or by the value of one of its attributes. That 
is a very, very small subset of xpath.

My recommendation, therefore, is to add a section to the spec which is 
a standalone definition of a string that can point to a single XML 
element, using the "/" notation of xpath, and using the 
"[@name=value]" mechanism in xpath for selecting an element by 
attribute name. This section would use Xpath as an informative 
reference only. The expressions defined by this section would be 
compliant xpath expressions, but we would not be using xpath. That 
would leave the door open in the future for full xpath support if we 
decide its needed.

What do people think of this simplification?

-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