Subject: Re: [xsl] Truncate input From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Mon, 11 Sep 2006 16:56:22 +0200 |
-- using <xsl:number /> <xsl:number value="$yourinput" format="1.00" />
-- using round() <xsl:value-of select="round($yourinput * 100) div 100" />
-- using fixed() (will truncate) <xsl:value-of select="fixed($yourinput * 100) div 100" />
-- converting your number: <xsl:value-of select="translate ( $yournumber , ',' , '.' )" />
Cheers, Abel Braaksma http://abelleba.metacarpus.com
Hi all,
i need to truncate input that can be write in a box i have a var v1=2 if after coma there is more then v1 numbers then it must be truncate to v1 es...
if i insert 3,45678 in the input it let me write only 3,45 because v1=2
i think this must be done in the tags <input > </input> i'm already in the case that the number is real ecc..
How can i do?..is there an option like <input format="">?
thx for replies
Current Thread |
---|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Truncate input, Steve | Thread | [xsl] Transforming Learning Object , Jaebin Lee |
Re: [xsl]   appearing as ? in F, David Carlisle | Date | [xsl] Keyword xsl:key may not be us, Jaebin Lee |
Month |