diff --git a/basex-core/src/main/java/org/basex/build/xml/CatalogWrapper.java b/basex-core/src/main/java/org/basex/build/xml/CatalogWrapper.java
index c4c9f41fa..1303fca92 100644
--- a/basex-core/src/main/java/org/basex/build/xml/CatalogWrapper.java
+++ b/basex-core/src/main/java/org/basex/build/xml/CatalogWrapper.java
@@ -38,6 +38,41 @@ public final class CatalogWrapper {
     return CM != null;
   }
 
+  /**
+   * Returns the resolver, which could be of any class that implements the
+   * CatalogManager interface.
+   */
+  public static Object getCM() {
+    return get(CRP, CM);
+  }
+
+  public static void setDefaults(final String path) {
+    if(CM == null) return;
+
+    // IgnoreMissingProperties - default is to print a warning if properties
+    // are unset; this is not usually what we want, but can be overridden
+    // for debugging. Not all resolvers produce errors even if this is false,
+    // so better to set it to true.
+    invoke(method(CMP, "setIgnoreMissingProperties", boolean.class), CM, true);
+
+    // CatalogFiles - semicolon-separated list of files
+    invoke(method(CMP, "setCatalogFiles", String.class), CM, path);
+
+    // StaticCatalog:
+    // If this manager uses static catalogs, the same static catalog will
+    // always be returned.   Otherwise a new catalog will be returned.
+    // We would probably get better performance by using true here. You get a
+    // new catalogmanager instance if you change PATH.
+    invoke(method(CMP, "setUseStaticCatalog", boolean.class), CM, false);
+
+    // You can also set Verbosity, but that's best left for the properties file,
+    // CatalogManager.propertie,  or system property, to help debugging.
+    // The higher the number, the more messages.
+    // NOTE messages go to output, not err stream!
+    // invoke(method(CMP, "setVerbosity", int.class), CM, 0);
+
+  }
+
   /**
    * Decorates the {@link XMLReader} with the catalog resolver if it is found in the classpath.
    * Does nothing otherwise.
@@ -46,11 +81,9 @@ public final class CatalogWrapper {
    */
   static void set(final XMLReader reader, final String path) {
     if(CM == null) return;
-    invoke(method(CMP, "setIgnoreMissingProperties", boolean.class), CM, true);
-    invoke(method(CMP, "setCatalogFiles", String.class), CM, path);
-    invoke(method(CMP, "setPreferPublic", boolean.class), CM, true);
-    invoke(method(CMP, "setUseStaticCatalog", boolean.class), CM, false);
-    invoke(method(CMP, "setVerbosity", int.class), CM, 0);
+
+    setDefaults(path);
+
     reader.setEntityResolver((EntityResolver) get(CRP, CM));
   }
 }
diff --git a/basex-core/src/main/java/org/basex/query/func/xslt/XsltTransform.java b/basex-core/src/main/java/org/basex/query/func/xslt/XsltTransform.java
index a0750b74c..3c34bced7 100644
--- a/basex-core/src/main/java/org/basex/query/func/xslt/XsltTransform.java
+++ b/basex-core/src/main/java/org/basex/query/func/xslt/XsltTransform.java
@@ -9,6 +9,7 @@ import java.util.*;
 import javax.xml.transform.*;
 import javax.xml.transform.stream.*;
 
+import org.basex.core.*;
 import org.basex.io.*;
 import org.basex.io.out.*;
 import org.basex.io.serial.*;
@@ -17,6 +18,7 @@ import org.basex.query.value.item.*;
 import org.basex.query.value.node.*;
 import org.basex.util.*;
 import org.basex.util.options.*;
+import org.basex.build.xml.*; // for CatalogWrapper
 
 /**
  * Function implementation.
@@ -56,7 +58,7 @@ public class XsltTransform extends XsltFn {
     final ArrayOutput ao = new ArrayOutput();
     try {
       System.setErr(new PrintStream(ao));
-      return transform(in, xsl, opts.free(), xopts);
+      return transform(in, xsl, opts.free(), xopts, qc);
     } catch(final TransformerException ex) {
       Util.debug(ex);
       throw XSLT_ERROR_X.get(info, trim(utf8(ao.finish(), Prop.ENCODING)));
@@ -87,23 +89,33 @@ public class XsltTransform extends XsltFn {
     throw STRNOD_X_X.get(info, item.type, item);
   }
 
+
   /**
    * Uses Java's XSLT implementation to perform an XSL transformation.
    * @param in input
    * @param xsl style sheet
    * @param par parameters
    * @param xopts XSLT options
+   * @param qc query context
    * @return transformed result
    * @throws TransformerException transformer exception
    */
   private static byte[] transform(final IO in, final IO xsl, final HashMap<String, String> par,
-      final XsltOptions xopts) throws TransformerException {
+      final XsltOptions xopts, final QueryContext qc) throws TransformerException {
 
     // retrieve new or cached transformer
     final Transformer tr = transformer(xsl.streamSource(), xopts.get(XsltOptions.CACHE));
     // bind parameters
     par.forEach(tr::setParameter);
 
+    // set URI resolver
+    final String path = qc.context.options.get(MainOptions.CATFILE);
+    if (!(path == null) && !path.isEmpty()) {
+      CatalogWrapper.setDefaults(path);
+
+      tr.setURIResolver((URIResolver) CatalogWrapper.getCM());
+    }
+
     // do transformation and return result
     final ArrayOutput ao = new ArrayOutput();
     tr.transform(in.streamSource(), new StreamResult(ao));
