[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Youre easiest solution would be to use starts-with as so:
<xsl:if test="starts-with(string($number), '-')"><xsl:value-of select="$number * -1"/></xsl:if>
or the same style using the substring-after method...
<xsl:if test="starts-with(string($number), '-')"><xsl:value-of select="concat('(', substring-after(string($number), '-'), ')')"/></xsl:if>
Either way, this should work...
Regards,
<M:D/>
Jaime Stuardo wrote:
Re: [xsl] Formatting negative numbers with format-number
Subject: Re: [xsl] Formatting negative numbers with format-number From: "M. David Peterson" <m.david@xxxxxxxxxx> Date: Wed, 07 Jul 2004 14:36:58 -0600 |
Youre easiest solution would be to use starts-with as so:
<xsl:if test="starts-with(string($number), '-')"><xsl:value-of select="$number * -1"/></xsl:if>
or the same style using the substring-after method...
<xsl:if test="starts-with(string($number), '-')"><xsl:value-of select="concat('(', substring-after(string($number), '-'), ')')"/></xsl:if>
Either way, this should work...
Regards,
<M:D/>
Jaime Stuardo wrote:
Hi all...
Is it posible using format-number function that the negative numbers to be displayed enclosed in brackets? for example, -1234 = (1234)
Jaime
--+------------------------------------------------------------------ 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@xxxxxxxxxxxxxxxxxxxxxx> --+--
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Formatting negative numbers with fo, Jaime Stuardo | Thread | RE: [xsl] XSL Problem, cknell |
Formatting negative numbers with fo, Jaime Stuardo | Date | RE: [xsl] XSL pattern needed for be, Tracy Atteberry |
Month |