[xsl] Is there a way to skip non-numerical data while formatting numbers?

Subject: [xsl] Is there a way to skip non-numerical data while formatting numbers?
From: "Rashmi Rubdi" <rashmi.sub@xxxxxxxxx>
Date: Sun, 15 Apr 2007 17:49:07 -0400
Hello Everyone,

I'm using XSLT 1.0 , and I'm trying to format numerical data in the
price, shipping elements of the input XML as fillows:

<xsl:value-of select="format-number(number(price), '##,##,.00')"/>

<xsl:value-of select="format-number(number(shipping), '##,##,.00')"/>

<xsl:value-of select="format-number(number(price+shipping), '##,##,.00')"/>

The above formatting works well, except when a non-numeric data is
encountered in the price or shipping nodes.

The above statements result in a value of NaN -- I was hoping for a
blank value instead of getting a value of NaN.

I'm trying to find the best way to handle the above case, I was
thinking of checking the type of the price and shipping nodes with an
xsl:if statements before attempting to format them - but adding an
xsl:if each time reduces the response time of the resulting document
because every price/ shipping node would be checked.

Please suggest if there is a better way to suppress the NaN in the
event that the node contains a non-numeric value.

Any suggestions appreciated.

-Rashmi

Current Thread