You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2010/11/12 09:19:24 UTC

[jira] Commented: (CAMEL-3331) Support URI inline strings as resources

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

Claus Ibsen commented on CAMEL-3331:
------------------------------------

It would be better if you can provide the template in a header, like what velocity can do.

See section _Dynamic templates_
http://camel.apache.org/velocity

> Support URI inline strings as resources
> ---------------------------------------
>
>                 Key: CAMEL-3331
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3331
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-spring
>    Affects Versions: 2.5.0
>            Reporter: Aaron Mulder
>            Priority: Minor
>             Fix For: Future
>
>
> This came up for an application where it's inconvenient to access the filesystem and desirable to embed as much as possible in the Camel routes.  In particular, to write an inline XSLT sheet instead of referring to an external one.
> The XsltComponent (among many others) uses a Spring ResourceLoader to load resources, and while it supports things like classpath: or file: or http: there's no way to cause it to just read the rest of the URI and make that a String and use it as the resource.
> I'm looking for something like this:
> <to uri="xslt:string:<xsl:transform ... >" />
> In practice you need to turn < and > into & lt; and & gt; and do something with ? (to avoid problems when it looks for ?option=value), but stuff like that aside, it appears to work to extend DefaultResourceLoader to use a ByteArrayResource based on the remainder of the URI

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.