Hi John,
Maybe this sample would help:
1) I created a jar file called "jsp.jar" in the file system path:
Code: Select all
file:/C:/workspace/eXml/frameworks/jsp/xsd/
. The jar contains a directory called "jsp" and inside it a schema called "jspxsd.xsd".
2)The catalog file looks like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<system systemId="http://java.sun.com/dtd/jspxml.xsd"
uri="jar:file:/C:/workspace/eXml/frameworks/jsp/xsd/jsp.jar!/jsp/jspxsd.xsd"/>
</catalog>
I went to Options->Preferences->XML Catalog and added my catalog to the list.
3)The schema file looks like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import schemaLocation="http://java.sun.com/dtd/jspxml.xsd" namespace="http://www.w3.org/2001/XMLSchema"/>
</xs:schema>
When validated, the schema will resolve the "schemaLocation" reference through the custom catalog above (I checked both in Eclipse and the standalone version).
Here are some samples of using the "jar" protocol:
Local access:
Code: Select all
jar:file:/E:/local/folder/thepackage/thepackage.jar!/thepackage/images/blueball.gif
Remote access:
Code: Select all
jar:http://www.oxygenxml.com/thepackage.jar!/thepackage/blueball.gif
As you can see you prepend the "jar:" protocol to the URL, then at the end of the URL you append "!/" and the append the path through the jar archive to the resource.
You can also check that you created the right URL by trying to open it in Firefox (IE does not seem to handle the "jar" protocol) . Setting the XML Catalog in Oxygen to verbose would also help.
Regards, Radu