Skip to content
Permalink
Browse files

Attempt to fix issue #90 removed apparently dead code that was attmpt…

…ing to prematurely resolve the URI. Verified that jar: URIs still work.
  • Loading branch information
ndw committed Mar 15, 2013
1 parent b1fa7d5 commit d1d9abd076a9873de88441f6e9b21227df9d0b32
Showing with 3 additions and 20 deletions.
  1. +3 −20 src/com/xmlcalabash/util/XProcURIResolver.java
@@ -48,7 +48,6 @@
private UnparsedTextURIResolver unparsedTextResolver = null;
private XProcRuntime runtime = null;
private Hashtable<String,XdmNode> cache = new Hashtable<String,XdmNode> ();
private Logger logger = Logger.getLogger(this.getClass().getName());
private static boolean useCache = true; // FIXME: this is supposed to be temporary!

public XProcURIResolver(XProcRuntime runtime) {
@@ -109,24 +108,6 @@ public Source resolve(String href, String base) throws TransformerException {
}

if (uriResolver != null) {
URL absoluteURI = null;

// This is an attempt to deal with jar: URIs, pipelines run from inside jar files.
try {
if (base == null) {
absoluteURI = new URL(href);
} else {
absoluteURI = new URL(new URL(base), href);
}

runtime.finest(null,null,"Resolved again: " + absoluteURI);
} catch (MalformedURLException mue) {
// Ignore this. We want to give the URIResolver a chance to deal with
// schemes that the URL class might not know anything about...
}

String resolvedUri = absoluteURI == null ? href : absoluteURI.toString();

runtime.finest(null,null,"uriResolver.resolve(" + href + "," + base + ")");
Source resolved = uriResolver.resolve(href, base);

@@ -175,7 +156,9 @@ public XdmNode parse(String href, String base, boolean dtdValidate) {
if (source == null) {
try {
URI baseURI = new URI(base);
source = new SAXSource(new InputSource(baseURI.resolve(href).toASCIIString()));
URI resURI = baseURI.resolve(href);
source = new SAXSource(new InputSource(resURI.toASCIIString()));

XMLReader reader = ((SAXSource) source).getXMLReader();
if (reader == null) {
try {

0 comments on commit d1d9abd

Please sign in to comment.
You can’t perform that action at this time.