web stats
How to use the XSLT transformer step - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-08-2009, 11:02 AM
treynolds_nms treynolds_nms is offline
Mirth Newb
 
Join Date: Mar 2009
Posts: 20
treynolds_nms
Default How to use the XSLT transformer step

Could someone post a simple example of how to use this channel. Really just curious what I should write into the first two fields if I want to transform the entire message (Assuming for the first field it would be messageObject.getTransformedMessage() or .getRawMessage())

Thanks!
Reply With Quote
  #2  
Old 05-11-2009, 03:34 PM
jacobb jacobb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 1,217
jacobb is an unknown quantity at this point
Default

Quote:
Originally Posted by treynolds_nms View Post
Could someone post a simple example of how to use this channel. Really just curious what I should write into the first two fields if I want to transform the entire message (Assuming for the first field it would be messageObject.getTransformedMessage() or .getRawMessage())

Thanks!
Try the following:

Source: msg
Result: xsltTransformedMsg
XLST Template: <Full XSLT script pasted here>

Now in your destination template use: ${xsltTransformedMsg}

You also might need to uncheck "Strip namespace from messages" on the summary tab to get the script to process properly.
__________________
Jacob Brauer
Mirth Connect Project Lead
Sr. Software Engineer - Mirth Corporation

Want professional services, support, and enterprise or virtual appliances? It's all available from the Mirth Corporation:
Mirth Support | Mirth Training | Mirth Appliances
Reply With Quote
  #3  
Old 11-03-2009, 06:03 AM
mani mani is offline
What's HL7?
 
Join Date: Sep 2009
Posts: 1
mani is on a distinguished road
Default Is it possible to replace the message itself?

Hi. I've taken over the mantle from treynolds_nms.

Is it possible to completely replace the message kept in the "tmp" variable with the result of the xslt transformer instead of having to use a new variable?

It seems like we would want to do it so that subsequent transformer steps would be able to operate properly.

Thank you.
Reply With Quote
  #4  
Old 11-03-2009, 10:39 AM
jacobb jacobb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 1,217
jacobb is an unknown quantity at this point
Default

You could always try setting tmp equal to another variable in a JavaScript step or using tmp as the result variable.
__________________
Jacob Brauer
Mirth Connect Project Lead
Sr. Software Engineer - Mirth Corporation

Want professional services, support, and enterprise or virtual appliances? It's all available from the Mirth Corporation:
Mirth Support | Mirth Training | Mirth Appliances
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:14 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Mirth Corporation