camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-5942) Custom URIResolve not used to load XSTL script
Date Sat, 12 Jan 2013 12:34:12 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-5942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen resolved CAMEL-5942.
--------------------------------

       Resolution: Implemented
    Fix Version/s: 2.11.0
         Assignee: Claus Ibsen
    
> 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.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