Skip to content

Commit 4e2ef38

Browse files
committed
[bugfix] fn:transform URI resolution
Improve comments and code formatting
1 parent c04e37b commit 4e2ef38

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

exist-core/src/main/java/org/exist/util/SaxonConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ public final class SaxonConfiguration {
5454
private SaxonConfiguration(final net.sf.saxon.Configuration configuration) {
5555
this.configuration = configuration;
5656
this.processor = new Processor(configuration);
57-
//TODO (AP) We could further configure URI/Resource resolution for Saxon within eXist here
57+
//TODO (AP) This is a better place to configure URI/Resource resolution for Saxon within eXist
58+
//At present the configuration for Saxon to resolve xmldb:exist: URIs is restricted to fn:transform
5859
}
5960

6061
/**

exist-core/src/main/java/org/exist/xquery/functions/fn/transform/URIResolution.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,11 @@ public Source resolve(final String href, final String base) throws TransformerEx
8888
var resolved = resolveURI(hrefURI, baseURI);
8989
return resolveDocument(resolved.getStringValue());
9090
} catch (URISyntaxException e) {
91-
throw new TransformerException("Failed to resolve " +
92-
href +
93-
" against " +
94-
base, e);
95-
} catch (org.exist.xquery.XPathException e) {
96-
throw new TransformerException("Failed to find document as result of resolving " +
97-
href +
98-
" against " +
99-
base, e);
91+
throw new TransformerException(
92+
"Failed to resolve " + href + " against " + base, e);
93+
} catch (XPathException e) {
94+
throw new TransformerException(
95+
"Failed to find document as result of resolving " + href + " against " + base, e);
10096
}
10197
}
10298

exist-core/src/test/java/org/exist/xquery/functions/fn/transform/FunTransformTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,12 @@ private static class SourceWithLocation implements Source {
166166
this.location = location;
167167
}
168168

169+
// implementation solely to conform to interface for test use
169170
@Override
170171
public void setSystemId(String systemId) {
171-
172172
}
173173

174+
// implementation solely to conform to interface for test use
174175
@Override
175176
public String getSystemId() {
176177
return null;

0 commit comments

Comments
 (0)