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 |
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:
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.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] re-ordering an instance t, Michael Kay | Thread | Re: [xsl] Is there a way to skip no, David Carlisle |
RE: [xsl] saxon:evaluate and extern, Scott Lynch | Date | Re: [xsl] Is there a way to skip no, David Carlisle |
Month |