You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Thomas (JIRA)" <ji...@apache.org> on 2013/01/08 17:04:13 UTC
[jira] [Created] (CAMEL-5942) Custom URIResolve not used to load
XSTL script
Thomas created CAMEL-5942:
------------------------------
Summary: Custom URIResolve not used to load XSTL script
Key: CAMEL-5942
URL: https://issues.apache.org/jira/browse/CAMEL-5942
Project: Camel
Issue Type: Bug
Components: camel-xslt
Affects Versions: 2.10.3
Environment: Windows, Java 1.6
Reporter: Thomas
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.
{code}
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;
}
{code}
Another way would be to make the method above protected to overwrite the behaviour.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira