camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-5942) Custom URIResolve not used to load XSTL script
Date Mon, 14 Jan 2013 07:26:13 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-5942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13552475#comment-13552475
] 

Thomas  commented on CAMEL-5942:
--------------------------------

You are really fast. ;) Thank you.

I will try it next time.
                
> 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 
>            Assignee: Claus Ibsen
>             Fix For: 2.10.4, 2.11.0
>
>
> 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}
> 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.

--
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

Mime
View raw message