xsl-list
[Top] [All Lists]

RE: calculating pow of numbers and a final sum

2003-01-22 03:11:16
Look at 
http://exslt.org/math/functions/power/index.html

Edward Middleton

-----Original Message-----
From: Andreas Mecky [mailto:andreasmecky(_at_)yahoo(_dot_)de]
Sent: Wednesday, January 22, 2003 6:06 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] calculating pow of numbers and a final sum


Hello everybody,

I am kind of a newbie to this mailing list and I have a problem that keeps
me busy for some time now.
I am working on a code generator for some java classes.
This is my XML:

<?xml version="1.0" ?>
<logging>
  <target name="init"/>
  <target name="debug"/>
  <target name="fatal"/>
</logging>

this should result in:

public static final int INIT = 1;
public static final int DEBUG = 2;
public static final int FATAL = 4;
public static final int ALL = 8;

I can get everything working except the numbers. How can I calculate the
numbers which
are something like counter=2^(pos-1)?
This all entry is generated automatically. At this point I need either to
sum all former values
or do the same calculation as mentioned above.

Some research on google did not helped me out.

Any suggestions?

Thanx in advance

Andreas

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Bis zu 100 MB Speicher bei http://premiummail.yahoo.de


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


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