This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

math


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]