[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: A more concise way to handle empty numeric element
Mark Anderson wrote:
I have to process an XML file that contains a lot of numeric data. Many of the elements that have no value are empty instead of being zero and it may differ for each line, for example
If you have other child elements than cost1, cost2, cost3 then you could do <xsl:value-of select="format-number(sum(*[text() and (self::cost1 or self::cost2 or self::cost3)]),'#,###')"/> -- Martin Honnen http://JavaScript.FAQTs.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|