This topic has been locked.
1 reply Latest Post - 2012-12-27T17:58:57Z by SystemAdmin
Pinned topic Decimal value formatting in XML outputs?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
In an 18.104.22.168 WTX map running on Windows 7 SP1 that uses the same XML schema for input and output, all decimal type values are being stripped of leading and trailing zeroes. Thus "0.40" in the input becomes ".4" in the output. "2500.00" is output as "2500". Is this expected behavior? It's certainly not what I expect.
Updated on 2012-12-27T17:58:57Z at 2012-12-27T17:58:57Z by SystemAdmin
SystemAdmin 110000D4XK6184 PostsACCEPTED ANSWER
Re: Decimal value formatting in XML outputs?2012-12-27T17:58:57Z in response to SystemAdminThe response from IBM Support:
"In working with our developer on your test case, we are finding that when using native schema there does not appear to be a way of preserving trailing zeros. Internally WTX truncates trailing zeros when ever the internal format is a number. XML schema pattern will not work on output. WTX does not use schema information on output.
The following are workarounds that can be taken:
1. Copy the schema and change the schema to have that output field defined as Text.
Use the new schema in output and the following rule.
2. If the schema was altered to have a main group, it would be possible to use a Xerces type tree. The Xerces type trees can be edited and output format can be entered that will enable preserving trailing spaces.
Note: Xerces type tree requires a main global document group or groups. (See ipo.xsd in WTX examples)
Given the limitation of the product, we hope you can take advantage of the above workarounds."
http://Test case attached. JJD