Using XSL with GoAnywhere
Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
6 posts
Page 1 of 1
- Posts: 2
- Joined: Tue Mar 18, 2014 7:42 am
There doesn't seem to be any GoAnywhere task to transform XML with XSL, is there a recommended way to go about this? Sometimes we have XML that we get that we don't have control over and need to reformat it or translate values and some scenarios XSL seems to be a good option.
- Support Specialist
- Posts: 62
- Joined: Thu Jul 19, 2012 9:15 am
- Location: Ashland, NE
-
Tom,
XSL schema validation is supported on both the Read XML and Write XML tasks in projects within GoAnywhere Director. However translation isn't a direct feature of those tasks.
Regardless, it may be possible to still accomplish what you need by reading in the schema and doing the translation as part of the project.
Can you provide a bit more detail as to what all is taking place as part of this transformation schema?
Thanks - Jon
XSL schema validation is supported on both the Read XML and Write XML tasks in projects within GoAnywhere Director. However translation isn't a direct feature of those tasks.
Regardless, it may be possible to still accomplish what you need by reading in the schema and doing the translation as part of the project.
Can you provide a bit more detail as to what all is taking place as part of this transformation schema?
Thanks - Jon
- Posts: 2
- Joined: Tue Mar 18, 2014 7:42 am
I have an XML file that needs "reformatting" and values translated. I was given an XSL from that did the value translation and updated it to output the XML how I want it. For my proof of concept I did an Exec Task (Director is running on Windows) that calls a .BAT file which runs a VBScript (.vbs) that does the XSL transform and writes the output XML file. I could not figure out any way to pass parameters to the Exec Task so the .BAT file has hard coded path to where to run the VBScript. I hope there is I better way to do this.
- Support Specialist
- Posts: 590
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
-
Tom,
Passing parameters to a .BAT file is accomplished by adding the ARG element to the Exec Task. Here is a link to another Forum Post that might better help you out...
How to Execute Powershell Script with Parameters
Basically, you create your EXEC Task, then click on the Next Button and select the option for an Argument. In relative terms, there will be an Argument entry for each Parameter passed (ie, if there's a space between arguments/parameters) then there will need to be another Argument added for the next one.
MyBatFile.bat Parm1 Parm2 Parm3
Would be executed like:
Passing parameters to a .BAT file is accomplished by adding the ARG element to the Exec Task. Here is a link to another Forum Post that might better help you out...
How to Execute Powershell Script with Parameters
Basically, you create your EXEC Task, then click on the Next Button and select the option for an Argument. In relative terms, there will be an Argument entry for each Parameter passed (ie, if there's a space between arguments/parameters) then there will need to be another Argument added for the next one.
MyBatFile.bat Parm1 Parm2 Parm3
Would be executed like:
Code: Select all
<exec label="Execute MyBatFile" executable="C:\Temp\MyBatFile.bat" workingDir="C:\Temp" version="1.0">
<arg value="${Parm1}" />
<arg value="${Parm2}" />
<arg value="${Parm3}" />
</exec>
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
6 posts
Page 1 of 1