Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
ytuzet
Creator
Creator

embed resources like xsl files into routes

Hello,
I use an external xsl to manipulate xml data.
Is there a place in talend where I could put these kind of resources so that they are bundled with the route at the time of deployment?
It could be useful also for velocity templates...
Labels (3)
4 Replies
Anonymous
Not applicable

Hi ytuzet,
how about placing your XSL files into your resource folder?
As an example:
(1) Place your XSL sheets into your '${project.base}/src/main/resources/test.xsl'
(2) Implement a camel route that calls this file and place it into your 'META-INF/spring' folder. You may take a look at the example below:
<camel:route>
<camel:from uri="vm:incomming" />
<camel:choice>
<camel:when>
<camel:simple>${body} contains 'demo success'</camel:simple>
<camel:to uri="bean:demo?method=process" />
</camel:when>
<camel:when>
<camel:simple>${body} contains 'demo fault'</camel:simple>
<camel:to uri="xslt:test.xsl"/>
<camel:to uri="bean:demo?method=process" />
</camel:when>
</camel:choice>
</camel:route>

(3) Build your project and test it, it should work.
For further information you may als want to read the following article: http://camel.apache.org/xslt.html
Hope this helps a bit,
Many greets,
Christoph
ytuzet
Creator
Creator
Author

Hi cemmersb,

That's the point, I know where to put resources in typical camel project, but in talend there is no access to project folder ...
Anonymous
Not applicable

Hi ytuzet,
unfortunately I've never worked too much with the talend Studio. Therefore I'm probably the wrong person to help you with this topic.
Maybe there is someone out there who can guide you a bit better through that topic.
Anyway, I'm still interested in the solution you find, since there might be some chances to use the Studio in the future.
Many greets,
Christoph
ytuzet
Creator
Creator
Author

for the moment I make my camel Contexts with maven archetypes outside the studio
there are still missing features like this one in talend studio (perhaps they're hidden...)
thx for the reply