xsl-list
[Top] [All Lists]

Re: [xsl] Creating a cheque type format using format-number (e.g. $********123.45CR)`

2006-06-08 02:28:04

would be a bit easier in 2.0 but in 1.0

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:variable name="pad" select="'********************'"/>
<xsl:template match="/">

<xsl:variable name="n"><xsl:value-of select="format-number(124456.78, 
'###,###.00CR')"/></xsl:variable>
$<xsl:value-of select="substring($pad,string-length($n))"/><xsl:value-of 
select="$n"/>
</xsl:template>

</xsl:stylesheet>

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>