Subject: [Simple] XCAP - namespace handling

From: "Bulent Gecer (KI/EAB)" <[email-masked]>
Date: Tue, 19 Oct 2004 10:33:03 +0200

Hi,

We have encountered a problem in the XCAP specification (draft-ietf-simple-xcap-03.txt) involving namespace handling in node selectors:

Problem: 	The XCAP-specification does not specify a way to provide namespaces in the node selector.  The following example identifies the problem:

					<foo>
					      <ns:bar xmlns:ns="namespace1"/>
				            <ns:bar xmlns:ns="namespace2">
							<foobar/>
					      </ns:bar>
					</foo>

		In the current XCAP-specification, it is impossible to select the foobar-element.  For example, if the XCAP-server receives this node selector
					
						/foo/ns:bar/foobar

		there is no way to know which namespace ns refers to.

Solution:	Our suggestion is to add a namespace-binding as an HTTP-header in the client request.  The following request would then select the foobar-element 		in the above example:

					GET http://xcap.example.com/services/myauid/users/bob/foo.xml/~~/foo/ns:bar/foobar HTTP/1.1
					Namespaces: ns=namespace2
					
					The namespace-header would consist of a semi-colon separated list of namespace bindings.

					ex)  Namespaces: ns=namespace;ns1=namespace1;ns2=namespace2

Any other suggestions on how to solve this problem?

Regards,

/Max Blommé & Bulent Gecer

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

---

From: Jonathan Rosenberg <[email-masked]>
Date: Fri, 22 Oct 2004 02:26:51 -0400

This problem has been discussed. It was one of the primary open issues 
we discussed at the last ietf. At the time, there was no clear 
conclusion. I have just finished updating xcap and have a solution that 
defines how namespaces are handled in the matching. Basically, if you 
are comparing a step in the node selector to an XML element in the 
document, you use the namespace bindings and default namespace in scope 
for that element. THis is more or less what Jari has suggested on the 
list some time back. It is the simplest and most flexible approach, I think.

However, it has the drawback that it won't work in the case below. 
Indeed, the only solution that would address that is to provide the 
namespace bindings out of band in some way. I thought about 
possibilities for that, and they were all too complicated to solve what 
is really a corner case.

So, the answer is mostly, "don't do that" - don't assign two elements 
with the same local name, a namespace prefix that is ALSO the same. The 
spec calls out this case and gives some guidance on this.

THanks,
Jonathan R.

-- 
Jonathan D. Rosenberg, Ph.D.                   600 Lanidex Plaza
Director, Service Provider VoIP Architecture   Parsippany, NJ 07054-2711
Cisco Systems
[email-masked]                        FAX:   (973) 952-5050
http://www.jdrosen.net                         PHONE: (973) 952-5000
http://www.cisco.com