Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.10.3
-
None
-
Windows, Java 1.6
-
Unknown
Description
My problem is to load a XSLT script from database or provided as byte array but not as file in classpath or http.
A custom uri resolver would do the job. XsltEndpoint uses a ResourceHelper to load the XSTL resource instead of a given custom uri resolver.
private synchronized void loadResource(XsltBuilder xslt, String resourceUri) throws TransformerConfigurationException, IOException { LOG.trace("{} loading schema resource: {}", this, resourceUri); // prefer to use URL over InputStream as it loads better with http URL url = ResourceHelper.resolveMandatoryResourceAsUrl(getCamelContext().getClassResolver(), resourceUri); xslt.setTransformerURL(url); // now loaded so clear flag cacheCleared = false; }
The ResourceHelper or this method should use the same URIResolver as XsltBuilder.
Another way would be to make the method above protected to be able to overwrite the behaviour.