This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: number("2,000") -> NaN


For removing or replacing one character, you can use the 
translate()-function.

<xsl:value-of select="translate(any_number, ',', '')"/>
replaces every comma by 'nothing'.

Now you have a number.

Regards,

Joerg

Morten Primdahl wrote:

> Hi. Xalan-J outputs <xsl:number level="any"/> formatted
> with grouping separator , (comma) as in 1,024
> 
> I need a numerical value which I can do some arithmetic
> on. I tried using the number() function, but to no avail.
> How can I strip the grouping separator or get a proper number
> rather than the formatted string?
> 
> Thanks,
> 
> Morten


-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7411
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]