Re: Invalid JAR URIs

> Balanced parentheses are the foundation of the XPointer framework
> http://www.w3.org/TR/xptr-framework/
>
> so it semed that, for fragment schemes, they were the correct choice.

What, so now "design by committee" is a validation test?  I have already
sent my comments in regards to the XPointer rec with the same points.

> RTF> It is the wrong choice in all circumstances.
>
> Please elaborate, since you seem to be saying that several W3C Recs
> are wrong.

URIs are an LR grammar based on syntactic hierarchy.  Adding a container
syntax in the middle of that is just foolish, particularly when the
containment always ends at the end of the string.  All it does is make
the string harder to parse and reduce the number of interesting
characters available to applications for their own uses.

> RTF> Since this example is an http URI, it can easily be
>
> RTF>     http://www.foo.com/bar/baz.jar/COM/foo/Quux.xml#foo
>
> RTF> HTTP servers do not contain files.
>
> What would the semantics of that be? It seems to request that one
> particular resource be served (which happens to be part of a jar
> file) thus, just that one file would be extracted and returned.

Yes.

> That would not work. The use case here is to retrieve the entire jar
> and to then point to the class to be executed. Execution requires the
> other files in the jar, too. So its more like a fragment.

Hmmm... okay... then why the Quux.xml#foo part?  If you want to identify
a class within the jar file, then it should use the Java syntax for the
class name (not the file structure).  That would be

     http://www.foo.com/bar/baz.jar#com.foo.quux.main

or some such.  Alternatively, it can just use a different attribute
instead of squishing everything into a single URI.

If we were talking about tar files and for some reason you do want
the entire tar file transferred, perhaps because it is gzipped, and
maybe it contains an XML file and within that an element that you
wish to identify, then you could use

     http://www.foo.com/bar/baz.tgz#/com/foo/Quux.xml#foo

with only a little fear of misinterpretations (some older apps
parse the fragment from right to left rather than left to right).
Relative references within Quux.xml would not work, but that's
another story.  That can be accomplished by defining the fragment
syntax for application/tar, or at least it could be if anyone bothered
to register such a type.

....Roy

Received on Thursday, 3 July 2003 06:53:53 UTC