|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Formatting of numbers, dynamically
I am current using format-number($node, '#,##0.00') for formatting currency.
We are now implementing foreign currencies into our application. For every
transaction, I have an element, CurrencyCode, which contains the ISO
currencyCode and an attribute @minor_unit which tells me how many digits
follow the decimal seperator. My question is how I can dynamically build
the formatting string.
I was reading this morning in the March 2002 issue of MSDN magazine about
how XSLT is a "Functional programming language", and therefore xsl:variable
entities are "not really variables, rather runtime-assigned constants"
because once they are assigned, the values cannot be changed. So, this lead
me to start thinking about how I could wrap an xsl:for-each with the
xsl:variable element to produce my output. What I don't know if how to
obtain functionality like:
for(i=0;i<=@minor_unit;i++){ ... };
I do not want to use an enbedded JScript solution because I want the XSL to
be portable (namely between MSXML and Xalan). So, how would I construct the
@select attribute in the xsl:for-each to just loop a predetermined number of
times?
--
David B. Bitton
david@xxxxxxxxxxxxxx
www.codenoevil.com
Diversa ab illis virtute valemus.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








