xsl-list
[Top] [All Lists]

AW: variable and arithmetrics

2004-11-10 03:24:52
Hi Andreas,

Have you tried 
<xsl:variable name="priceInCents" select="//thing/@priceInEuro * 100"/>

I tired it with an example xml and got a correct return value...

You're interested in the result of the calculation, aren't you?

Hope this helps.

Wbr,
Roman 



-----Ursprüngliche Nachricht-----
Von: Andreas Andersson [mailto:andreas(_at_)travelstart(_dot_)se]
Gesendet: Mittwoch, 10. November 2004 11:06
An: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Betreff: [xsl] variable and arithmetrics

Hi!

I've been trying to figure out how to assign  av variable an arithmetic
value.

What I want to do is something like this (in pseudo code)

<xsl:variable name="priceInCents">
    <xsl:value-of select="//thing/@priceInEuro" />*100
</xsl:variable>

Thanks.

--
Andreas Andersson
IT Dept.
Travelstart Nordic
andreas(_at_)travelstart(_dot_)se
http://www.travelstart.se

--+------------------------------------------------------------------
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>
--+--



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



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