[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

IQuestion about XSLT and Math Operations

Subject: IQuestion about XSLT and Math Operations
From: "Villani Alessandro" <villani.a@xxxxxxxxx>
Date: Sun, 4 Dec 2005 13:48:29 +0100
xslt math
Hi,
i would like to know if i can perform some math operation between fields
generated by xslt without use variables

Example:
XML`

<?xml version="1.0"?>
<test>
     <parameters>
          <r2>200000</r2>
          <r3>1</r3>
          <r31>1</r31>
     </parameters>
<test>


XSLT`


<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
     <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
     <xsl:template match="parameters">
          <xsl:param name="r50">
                <xsl:value-of select="r3*r2"/>
          </xsl:param>
          <elab>
                <tab0>
                     <r10>
                          <c0>null</c0>
                          <c1>
                               <xsl:value-of select="r2"/>
                          </c1>
                          <c2><xsl:value-of select="$r50"/></c2>
                     </r10>
                     <r11>
                          <c0>
                               <xsl:value-of select="r2"/>
                          </c0>
                          <c1>
                               <xsl:value-of select="r2 - r6"/>
                          </c1>
                          <c2>null</c2>
                     </r11>
                     <r12>
                          <c0>null</c0>
                          <c1>
                               <xsl:value-of select="r2 - r6"/>
                          </c1>
                          <c2>
                          How I can perform, if possible , this type of
operation: [value of r11/c1 + value of r12/c1] whithout use xsl:param.
</c2>
                     </r12>
                </tab0>
          </elab>
     </xsl:template>
</xsl:stylesheet>



Thank you very much

Hi

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.