|
Subject: [xsl] IQuestion about XSLT and Math Operations From: "Villani Alessandro" <villani.a@xxxxxxxxx> Date: Sun, 4 Dec 2005 13:48:29 +0100 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Recursively Processing Text Q, Matthew Broude | Thread | Re: [xsl] IQuestion about XSLT and , G. Ken Holman |
| RE: [xsl] XSL to analyse some XML l, Michael Kay | Date | Re: [xsl] XSLT Processing w/ Embedd, Michael B Allen |
| Month |