Subject: [Simple] XCAP Issue 1: Schema extensibility

From: Jonathan Rosenberg <[email-masked]>
Date: Mon, 10 May 2004 01:03:03 -0400

One of the issues we've been back and forth on a few times is handling 
schema extensibility. That is, does the xcap server need to understand 
the namespaces and schemas in all documents it handles? Initially, in 
early versions of xcap, the answer was yes. Then, in the current 
approach, the answer is no, but it requires an ugly Require-like set of 
elements within the actual documents themselves to negotiate what is 
supported. Worse yet, it came out during the meeting in Seoul that this 
simply wouldnt work. The problem is that the current xcap rules specify 
that the server performs an insertion of an element in a document such 
that, after insertion, the R-URI selects the element, and the resulting 
document is schema compliant.

As a result of this, the server has to actually use awareness of the 
schema to determine where to insert a new element. That means that the 
server will need to understand the schemas, and it also introduces 
complexity into the implementation. It also introduces a substantial 
piece of "magic" into the server processing of PUT which arguably bends 
the rules on what PUT can do.

So, I would propose the following.

Servers do not need to understand the schemas of the documents they 
handle. When inserting a new element, the server inserts the element 
such that, after insertion, the R-URI would select that element. When 
there are many such insertion points with this property, the server puts 
it at the "bottom" - that is, in the location whereby there are the 
fewest number of siblings following it.

This insertion rule is schema-unaware, which is a good thing. It puts 
the burden on the client to construct the R-URI when inserting an 
element, such that it gets put in a place whereby the resulting document 
remains schema compliant. For example, lets say a schema for a document 
said that, within the foo element, you had zero or one bar elements 
followed by zero or one baz elements. If we start with this document:

<foo>
   <baz/>
</foo>

If I insert bar, bar *has* to be inserted such that it appears before 
baz. Thats what the schema says. Doing this:

PUT http://server/xcap-root/document/foo/bar

<bar/>

according to the above rules, will create a document that is not schema 
compliant.

So, to allow the client to manipulate the document so that the resulting 
documents are schema compliant, we need to be able to support positional 
insertions better than we do today. Please see a separate email on that 
topic, which is an open issue in and of itself.

My proposal is to allow for positional insertions and, consequently, 
define the server insertion rules to be schema-unaware, thus allowing 
for the server to operate without understanding the schema.

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