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

Invalid JAR URIs

From: Chris Lilley <chris@w3.org>
Date: Wed, 2 Jul 2003 13:13:23 +0200
Message-ID: <69892330823.20030702131323@w3.org>
To: www-tag@w3.org


The following recently came to my attention (in the context of
addressing into a jar file to point to a particular class).

http://java.sun.com/j2se/1.4.2/docs/api/java/net/JarURLConnection.html

This defines a 'jar url' as follows

>> The syntax of a JAR URL is:
>>
>>  jar:<url>!/{entry}
>>  for example:
>>
>> jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class


This is useful functionality (and could be widened to other resources
that are themselves collections of files, such as zip archives), but
the syntax is not that of a URI because there are two methods. I
suspect that a better formulation would be

<url>#jar(entry)

for example

http://www.foo.com/bar/baz.jar#jar(/COM/foo/Quux.class)

This seems to relate to other issues (don't make a new URI scheme
unless needed, fragments).

One issue is that if the jar contained say an xml file one might want
to point to a fragment of that file

http://www.foo.com/bar/baz.jar#jar(/COM/foo/Quux.xml#foo)

I am trying to find something more constructive to suggest than 'its
broken, stop doing that'. This functionality appears to be in
widespread deployment.




-- 
 Chris                          mailto:chris@w3.org
Received on Wednesday, 2 July 2003 07:13:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:47:18 GMT