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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tXSLT: how to use it for doing on-the-fly transformation

Hi
I want to perform on-the-fly transformation from an XML to another XML using XSLT. I want to use tXSLT but I noticed that it needs a disk-file (input) and will write a disk-file (output).
Due to this limitation of tXSLT, I am forced to write the input file to disk and then use tXSLT to perform the transformation. I also now forced to use a tWaitforFile to keep listening for the files which tXSLT is producing ? Due to this my processing has to now depend on File System (which I don't want)?
Does TALEND has component which can do on the XSLT transformation WITHOUT the need to write to disk ?
Thanks
Zguptn
Labels (3)
8 Replies
Anonymous
Not applicable
Author

Hi,
XSLT transformation require an XML well formed and verified. For that we need the XML document on the disk before the transformation.
Try to use the link OnSubJobOk before calling the tXSLT component.
You don't need to use a tWaitForFile, just write your expected xml file before transformation and then call the tXSLT with a OnSubJobOk.
Best regards;
Anonymous
Not applicable
Author

In theory an xsl transformation can works with streams. It's a common use case to chain xsl transformations.
There is a feature request more general about this : http://www.talendforge.org/bugs/view.php?id=8622
Anonymous
Not applicable
Author

Hi,
You're right; it a common use case but it was not current behavior available in our version 3.1.x.
As you mentioned into your post we have involved some capabilities to allow this behavior. Could you test it from our version 3.2.0; your feeback would be appreciated.
Thanks a lot.
Anonymous
Not applicable
Author

Hi cantoine
My main objective is to eliminate the need to use a file system with tXSLT . In a production system, I now need to have a file system explicitly for this job. due to this limitation of tXSLT, we have now a dependency on external file system.
Can't we have tXSLT which can just take Object and return Object on-the-fly (like tMAP or tMOMInput). What are the other ways we can transform an XML similar to tXSLT?
I greatly appreciate your help and replies.
Thanks
Zguptn
Anonymous
Not applicable
Author

Hello,
If you have some java knowledge, u can easily do this using tJava.
Here is a pointer : http://onjava.com/onjava/excerpt/java_xslt_ch5/index.html
I could help you more if I weren't so sick theses days 0683p000009MAB6.png.
Regards
martel
Creator
Creator

the tXSLT is always use input a file ? not a string from previous step ?
i have in begin a very very large file xml, i will parse this file and i want for each subelement xml based on xpath (extract some in little xml) put this a xsl transformation.

BigFile
-rootElement
---subcomplexElement00001
---subcomplexElement00002
---subcomplexElement00003

for each subcomplexElement (without generate file on disk) use a XSL file.

i dont want generate 1000 little files for after reopen files for merge after 0683p000009MPcz.png


im on Talend 7.x plateforme, with tac etc...
thanks

Anonymous
Not applicable
Author

@martel, the tXSLT component requires input file, it does not support string as input, so you have to generate the XML file on disk before it is used. 

 

Regards

Shong

martel
Creator
Creator

ok i succeeded , 

0683p000009Ma06.jpg0683p000009MZyO.jpg

 

reduce really the memory use with file size xml +- 150MB