Page 1 of 1

Nice to have - XSLT functionality in the XMLWrite

Posted: Tue Nov 03, 2015 5:52 pm
by john_a
Hi all, I am pulling data from a SQL - DB2 database and then generating XML from it. Having worked with XML and XSLT for quite some time it would be nice if I could use XSLT in the XML generation part of the project. For instance, in the database a 2 place decimal is stored as a whole number, e.g. 9900 should be 99.00. I could easily manipulate this value to add the decimal point before the last two digits if XSLT/XPath functions were available but unfortunately this appears to be lacking.

Is there currently anyway to manipulate this on the fly using current built in functions in GoAnywhere MFT?

Here is a snippet of the XML that produces the current result.

<element name="price-table">
<attribute name="product-id" value="${data[1]}" />
<element name="amount" value="${data[2]}">
<attribute name="quantity" value="1" />

Re: Nice to have - XSLT functionality in the XMLWrite

Posted: Thu Nov 05, 2015 9:11 am
by Support_Rick

The XML part of GoAnywhere was originally written to handle a basic Header/Detail type design. Unfortunately, at this time, we don't have the options added for up-to-date XSLT functionality.

If you're looking to manipulate the value, you can do that when you read the data from the SQL with the Select Statement. Or, if you're not reading it from an SQL Table, you can use the "modifyRowset" task against the defined Rowset to add the decimal prior to the writeXML.