[xsl] calculating pow of numbers and a final sum

Subject: [xsl] calculating pow of numbers and a final sum
From: "Andreas Mecky" <andreasmecky@xxxxxxxx>
Date: Wed, 22 Jan 2003 10:06:09 +0100
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


Current Thread