Skip to content

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.

Using XSL with GoAnywhere

Post by Tom Buettner »

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_Jon Offline
  • Support Specialist
  • Posts: 62
  • Joined: Thu Jul 19, 2012 9:15 am
  • Location: Ashland, NE
  • Contact:

Re: Using XSL with GoAnywhere

Post by Support_Jon »

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
  • Jonathan Offline
  • Posts: 18
  • Joined: Wed Jan 02, 2013 5:27 am
  • Location: Mapledurham, UK
  • Contact:

Re: Using XSL with GoAnywhere

Post by Jonathan »

Hi Tom,

There is no built in method for Director to do XSL transformations (or at least not that I have found), You could look at an external tool to do this for you that accepts command line args and run it as a native command during your project.

Re: Using XSL with GoAnywhere

Post by Tom Buettner »

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_Rick Offline
  • Support Specialist
  • Posts: 590
  • Joined: Tue Jul 17, 2012 2:12 pm
  • Location: Phoenix, AZ
  • Contact:

Re: Using XSL with GoAnywhere

Post by Support_Rick »

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:

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
  • Jonathan Offline
  • Posts: 18
  • Joined: Wed Jan 02, 2013 5:27 am
  • Location: Mapledurham, UK
  • Contact:

Re: Using XSL with GoAnywhere

Post by Jonathan »

The only better way I can think of would be to put in a request to Linoma to get the feature added in a later version or look at the custom tasks option if you know your way around Java.
Post Reply