[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Beginner's question: Mathematical Calculations in XSL
I'm attempting to do multiplication and additon calculations in my XSL template. I've seen several posts to various newsgroups about this same scenario, and I've tested my calculations using the examples and corrected answers posted. However, I'm getting the same error when I do the calculations with the examples as I'm getting when I use my 'live' documents. Everything that I've read says that what I've got should work. Please help! Thanks in advance. Ami D. Yanero, MCP Software Developer, McGee Corporation P: 704.882.1500 x409 F: 704.882.0219 E: AmiY@xxxxxxxxxxxxx ********************************************** "Man is still the most extraordinary computer." --John F. Kennedy +-*/+-*/+-*/+-*/+-*/+-*/+-*/+-*/+-*/+-*/+-*/+-*/+-*/+-*/+-*/+-*/+-*/+-*/ +-*/+-*/+-*/+-*/+-*/ Error: ====== Expected token 'eof' found '*'. number(one) -->*<-- number(two) * number(three) XML Doc: ======== <?xml version = "1.0" encoding = "UTF-8"?> <?xml-stylesheet href = 'file:///P:/Projects/QuickQuote/test.xsl' type = 'text/xsl'?> <numbers> <one>abc1</one> <two>2</two> <three>3</three> </numbers> XSL Doc: ======== <?xml version="1.0" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <html> <body> <font face="arial"> <xsl:for-each select="numbers"> <table width="100%" cellpadding="1" cellspacing="0" bordercolor="#c0c0c0"> <tr> <td valign="top"><strong>One: </strong></td> <td valign="top"><xsl:value-of select="one" /></td> </tr> <tr> <td valign="top"><strong>Two: </strong></td> <td valign="top"><xsl:value-of select="two" /></td> </tr> <tr> <td valign="top"><strong>Three: </strong></td> <td valign="top"><xsl:value-of select="three" /></td> </tr> <tr> <td valign="top"><strong>Added: </strong></td> <td valign="top"> <xsl:value-of select="number(one) * number(two) * number(three)"/> </td> </tr> </table> </xsl:for-each> </font> </body> </html> </xsl:template> </xsl:stylesheet> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|