W3C home > Mailing lists > Public > www-tag@w3.org > July 2003

Re: Invalid JAR URIs

From: Roy T. Fielding <fielding@apache.org>
Date: Thu, 3 Jul 2003 12:46:27 +0200
Cc: www-tag@w3.org
To: Chris Lilley <chris@w3.org>
Message-Id: <9961D750-AD43-11D7-86A8-000393753936@apache.org>

> 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.


> 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


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


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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:55:59 UTC