[xsl] math

Subject: [xsl] math
From: ronald heller <ronald@xxxxxxxxxxx>
Date: Wed, 30 May 2001 10:20:08 +0100
assuming  I have the following xml:
<math>
        <number>500</number>
        <operator> div </operator>
        <number>50</number>
        <operator> * </operator>
        <number>10</number>
</math>

you can gues what my objective is:
<xsl:value-of select="500 div 50 * 10"/>

How can I do this with XSLT, for all I seem to get for output is the string: "500 div 50 * 10" in stead of 100.

a (futile) attempt:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
        <xsl:output method = "html" encoding="Windows-1252" />

        <xsl:template match="/">
        <xsl:variable name="expr">
                <xsl:apply-templates select="math"/>
        </xsl:variable>
                <html>
                        <head></head>
                        <body><xsl:value-of select="$expr"/></body>
                </html>
        </xsl:template>
</xsl:stylesheet>

some suggestions please :-)


Ronald ---------------------------------------------------------------------


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



Current Thread