Title: Xerces URI does not handle JAR scheme?

(Originally posted to xerces-j-user-help by mistake)
I have an application that loads resources from an embedded zip file. This is done via a protocol handler, so the following URI is obtained:

jar:embeddedzipfile:<file:/home/cprowse/data.zip?lib/config.jar!/repository.xml>
Which follows the normal JAR symantecs of: jar:<url>!/{entry}
However URI is not handling this and parses it as follows:
Scheme: jar
SchemeSpecificPart: embeddedzipfile:<file:/home/cprowse/data.zip?lib/config.jar!/repository.xml>
Host: null
Path: embeddedzipfile:<file:/home/cprowse/Development/conductor_instance/WEB-INF/modules/ComposerCAM-1.01.02.cam>
QueryString: lib/ComposerData-1.01.02.jar!/repository.xml
This breaks things when this is used as a baseURI.
For example, when the above URI is used in the URI constructor as follows:
new URI((URI)base, "repository.dtd");
I get:
Scheme: jar
SchemeSpecificPart: embeddedzipfile:<file:/home/cprowse/Development/conductor_instance/WEB-INF/modules/ComposerCAM-1.01.02.cam?lib/ComposerData-1.01.02.jar!/repository.xml>

Host: null
Path: embeddedzipfile:<file:/home/cprowse/Development/conductor_instance/WEB-INF/modules/ComposerCAM-1.01.02.cam>
QueryString: lib/ComposerData-1.01.02.jar!/repository.xml
I've started a small patch on URI to make it aware of the jar scheme.
Has this come up before for anyone?
-- Cory


Important notice: This message is intended for the individual(s) and entity(s) addressed. The information contained in this transmission and any attached, may be confidential and may also be the subject of legal privilege, public interest immunity or legal professional privilege. Any review, retransmission, dissemination or other use of, taking of any action in reliance upon this information by person or entities other than the recipient is prohibited and requires authorization from the sender. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person) you may not copy or deliver this message to anyone. In such cases you should destroy this message and kindly notify the sender by reply email.

WARNING: Although Infocomp has taken reasonable precautions so that no viruses are present in this e-mail, the company cannot accept responsibility for any loss or damage arising from the use of e-mail attachments.

Reply via email to