Subject: [Simple] XCAP issue 4: document to element separator (again!)

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

Folks,

We've had, since almost day 1, an open issue about what to use as the 
separator beween the component of the URI that points to the document, 
and the rest of it, which poitns to XML elements within the XML document.

For example, consider a document nameed doc.xml that looks like this:

<test>
   <hello/>
</test>

In the following URI:

http://server.example.com/xcap-root/doc.xml/test/hello

                                            ^
                                            |
                                    This is the separator

Here is the progression we had:

1. Originally, it was "?", making the XML element selection through a 
query string. Concerns were raised that this interacted badly with HTTP 
  proxies that wouldnt expect query strings on GET or DELETE.

2. The "#" was proposed, but this just doesnt work, since in HTTP the 
"#" operator is applied locally on the client. FOr us, its on the server.

3. Currently, its "/", so there is no clear break between the document 
and elements within the document. This is, I think, consistent with the 
view that XCAP takes, which is that the URI hierarchy flows smoothly 
from the actual document to content within the document - they are all 
resources. This adds a bit of implementation complexity (as reported by 
Jari).

So, I would proposed that we change this once more, and use the double 
slash, "//", so that in the example above, it would be:

http://server.example.com/xcap-root/doc.xml//test/hello

THis seems to be the best of both worlds; there is now a useful 
syntactic hint. However, the resource hierarchy still transitions 
smoothly from the XML document to content within the document.

Do folks agree to make this change?

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: "Joel M. Halpern" <[email-masked]>
Date: Mon, 10 May 2004 11:38:49 -0400

This is probably a good idea, and it is easy for implementors to handle.
Yours,
Joel

At 02:00 AM 5/10/2004 -0400, Jonathan Rosenberg wrote:
>separator beween the component of the URI that points to the document, and 
>the rest of it, which poitns to XML elements within the XML document.
>
>...
>
>
>THis seems to be the best of both worlds; there is now a useful syntactic 
>hint. However, the resource hierarchy still transitions smoothly from the 
>XML document to content within the document.
>

---

From: "Joel M. Halpern" <[email-masked]>
Date: Mon, 10 May 2004 11:38:49 -0400

---

From: Lisa Dusseault <[email-masked]>
Date: Mon, 10 May 2004 12:17:16 -0700

I'm very concerned that a double-slash would cause some HTTP 
intermediaries to choke, rewrite the URL, or something else unusual 
that would cause the request not to be forwarded properly.  Any testing 
been done here?

Lisa

> [stuff deleted]

---

From: Lisa Dusseault <[email-masked]>
Date: Mon, 10 May 2004 12:17:16 -0700

Lisa

---

From: Jonathan Rosenberg <[email-masked]>
Date: Tue, 11 May 2004 12:28:09 -0400

I havent tested, but we should.

I'm game for other separators - really anything will do. It could be "." 
or ".." or even something like "SEPARATOR".

Preferences?

-Jonathan R.

Lisa Dusseault wrote:

> intermediaries to choke, rewrite the URL, or something else unusual that 
> would cause the request not to be forwarded properly.  Any testing been 
> done here?
> 
> Lisa
>

---

From: Jonathan Rosenberg <[email-masked]>
Date: Tue, 11 May 2004 12:28:09 -0400

Preferences?

-Jonathan R.

---

From: Jonathan Rosenberg <[email-masked]>
Date: Mon, 17 May 2004 03:37:34 -0400

OK, here is a concrete proposal. I propose the tilde "~".

It has the property of being explicitly allowed as part of a path 
segment in a URI, but is not allowed as part of the name of an XML 
element, and I suspect never occurs as a file or directory name. As 
such, we would not need to worry about the separator occuring naturally 
in either the document selector or node selector.

Thoughts?

-Jonathan R.

Jonathan Rosenberg wrote:

>> that would cause the request not to be forwarded properly.  Any 
>> testing been done here?
>>
>> Lisa
>>
>>> separator beween the component of the URI that points to the 
>>> document, and the rest of it, which poitns to XML elements within the 
>>> XML document.
>>>
>>
>>> [stuff deleted]
>>
>>
>>
>>> So, I would proposed that we change this once more, and use the 
>>> double slash, "//", so that in the example above, it would be:
>>>

---

From: Jonathan Rosenberg <[email-masked]>
Date: Mon, 17 May 2004 03:37:34 -0400

Thoughts?

-Jonathan R.

---

From: "Joel M. Halpern" <[email-masked]>
Date: Mon, 17 May 2004 10:30:06 -0400

Aesthetically, I much prefer
     http://example.com/all/the/defined/path//docp1/docp2[@attr="x"]/docp3
to
     http://example.com/all/the/defined/path~docp1/docp2[@attr="x"]/docp3

I believe I have seen // used by some web sites that need to pass URIs 
inside their paths.
Also, I believe ~ is allowed in file names on some OSs, which means in 
principle it can occur in the file portion which selects the specific 
document.  We can just tell people not to do that, but normal URI parsers 
are going to swallow ~ as part of an element.

Yours,
Joel M. Halpern

At 03:37 AM 5/17/2004 -0400, Jonathan Rosenberg wrote:
>To: Jonathan Rosenberg <[email-masked]>
>CC: Lisa Dusseault <[email-masked]>, Simple WG <[email-masked]>
>Subject: Re: [Simple] XCAP issue 4: document to element separator (again!)
>
>It has the property of being explicitly allowed as part of a path segment 
>in a URI, but is not allowed as part of the name of an XML element, and I 
>suspect never occurs as a file or directory name. As such, we would not 
>need to worry about the separator occuring naturally in either the 
>document selector or node selector.
>
>Thoughts?
>
>-Jonathan R.
>

---

From: "Joel M. Halpern" <[email-masked]>
Date: Mon, 17 May 2004 10:30:06 -0400

Yours,
Joel M. Halpern

---

From: Jonathan Rosenberg <[email-masked]>
Date: Mon, 17 May 2004 11:16:35 -0400

Sorry for not being clear. What I had meant was this:

http://example.com/all/the/defined/path/~/docp1/docp2[@attr="x"]/docp3

using just ~ alone would definitely be swallowed by parsers as you 
indicated.

If there are any concerns whatsoever that // doesnt work, I'd rather not 
use it since there are no drawbacks from what I can tell to /~/, which 
should be fine.

I'm also fine with saying "don't use ~ in the document selector"; I 
think this is not likely to be a problematic constraint.

Thanks,
Jonathan R.

Joel M. Halpern wrote:

> document.  We can just tell people not to do that, but normal URI 
> parsers are going to swallow ~ as part of an element.
> 
> Yours,
> Joel M. Halpern
> 
>> such, we would not need to worry about the separator occuring 
>> naturally in either the document selector or node selector.
>>
>> Thoughts?
>>
>> -Jonathan R.
>>
>>> I'm game for other separators - really anything will do. It could be 
>>> "." or ".." or even something like "SEPARATOR".
>>> Preferences?
>>> -Jonathan R.
>>> Lisa Dusseault wrote:
>>>
>>>>> We've had, since almost day 1, an open issue about what to use as 
>>>>> the separator beween the component of the URI that points to the 
>>>>> document, and the rest of it, which poitns to XML elements within 
>>>>> the XML document.
>>>>
>>>>
>>>>> [stuff deleted]
> 
> 
>

---

From: Jonathan Rosenberg <[email-masked]>
Date: Mon, 17 May 2004 11:16:35 -0400

Thanks,
Jonathan R.

---

From: Dean Willis <[email-masked]>
Date: Mon, 17 May 2004 17:44:41 -0500

> in either the document selector or node selector.

Okay, so I want to store some XCAP below my user directory at:

http://kevlar.softarmor.com/~dwillis/

perhaps:

http://kevlar.softarmor.com/~dwillis/xcap/mypidf.xml

Howd does that play?

--
Dean

---

From: Dean Willis <[email-masked]>
Date: Mon, 17 May 2004 17:44:41 -0500

perhaps:

Howd does that play?

--
Dean

---

From: Jonathan Rosenberg <[email-masked]>
Date: Wed, 19 May 2004 15:49:50 -0400

> http://kevlar.softarmor.com/~dwillis/xcap/mypidf.xml

Thats fine; the xcap server looks for "/~/". Its the slash by itself 
that can't appear in either the document path or the XML path. I dont 
think a slash by itself makes sense in the HTTP context.

-Jonathan R.

---

From: Jonathan Rosenberg <[email-masked]>
Date: Wed, 19 May 2004 15:49:50 -0400

-Jonathan R.