Thanks Michael for the answer.
I ran out of time and used format-number() in the calculation - the problem was
I had '#' instead
of '0':
<xsl:decimal-format name="MyDecimalFormat" NaN="0" />
...
(format-number(HomePupils, '0', 'MyDecimalFormat')
This also covers converting NaN to zero...
Sean
Dealing with missing elements and empty elements are actually two slightly
different problems.
However, to get a default value of "0",
number(concat('0', string(HomePupils)))
works in both cases.
Michael Kay
...
I tried using format-number() to replace blanks with '0' and even
'number(0)', but when the
output
of format-number is used in a calculation, the result is NaN.
___________
Sean Ryan
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--