public Source resolve(final String href, final String base) throws TransformerException {
        try {
            // Try and locate a translation by name
            final List<DocRef> docRefs = xsltStore.findByName(href);

            if (docRefs == null || docRefs.size() == 0) {
                // Try loading by UUID or doc ref string, e.g, `uuid='test-uuid', name='test-name'`.
                final DocRef docRef = parseDocRef(href);
                final XsltDoc document = xsltStore.readDocument(docRef);
                if (document == null) {
                    throw new IOException("Resource not found: \"" + href + "\"");
                }
                return new StreamSource(StreamUtil.stringToStream(document.getData()));
            }

            if (docRefs.size() > 1) {
                throw new IOException("Found " + docRefs.size() + " resources for: \"" + href + "\"");
            }

            final XsltDoc document = xsltStore.readDocument(docRefs.get(0));
            if (document == null) {
                throw new IOException("Error reading: \"" + href + "\"");
            }

            return new StreamSource(StreamUtil.stringToStream(document.getData()));

        } catch (final IOException e) {
            throw new TransformerException(e);
        }
    }
Called by the processor when it encounters an xsl:include, xsl:import, or
document() function.

@param href An href attribute, which may be relative or absolute.
@param base The base URI against which the first argument will be made
            absolute if the absolute URI is required.
@return A Source object, or null if the href cannot be resolved, and the
processor should try to resolve the URI itself.
@throws TransformerException Thrown if the referenced resource cannot be found.
stroom-pipeline/src/main/java/stroom/pipeline/xslt/CustomURIResolver.java