Skip to Content
Using XML with Legacy Business Applications
book

Using XML with Legacy Business Applications

by Michael C. Rawlins
August 2003
Intermediate to advanced content levelIntermediate to advanced
624 pages
15h 3m
English
Addison-Wesley Professional
Content preview from Using XML with Legacy Business Applications

Rounding versus Truncation

I said earlier in the chapter that for numeric fields that allowed truncation of excess fractional digits we would truncate rather than round. However, I realize that there may be business cases for rounding, and doing the rounding in XSLT may not necessarily be the most elegant solution. To add rounding we would need to modify the prepareOutput methods of the DataCellReal and DataCellN classes. To avoid the nastiness of floating point arithmetic I would probably split the source number into an integer and fractional digits. Then I would treat the fractional digits as an integer, rounding up at the appropriate decimal position, truncating, then concatenating the remaining fractional digits to the integer portion on ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning XML with C# 7: XML Processing and Data Access for C# Developers

Beginning XML with C# 7: XML Processing and Data Access for C# Developers

Bipin Joshi
XML Hacks

XML Hacks

Michael Fitzgerald
XML Unleashed

XML Unleashed

Michael Morrison
XML in a Nutshell, 3rd Edition

XML in a Nutshell, 3rd Edition

Elliotte Rusty Harold, W. Scott Means

Publisher Resources

ISBN: 0321154940Purchase book