RE: [xsl] Calculating

Subject: RE: [xsl] Calculating
From: "Clapham, Paul" <pclapham@xxxxxxxxxxxxx>
Date: Mon, 28 May 2001 08:23:00 -0700
Probably this doesn't work for Gunter because he is not using the namespace


-----Original Message-----
From: Lawrence Mielniczuk [mailto:lwm@xxxxxxxxxxxxxxx]
Sent: May 28, 2001 06:04
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Calculating

I'm sure there are more elegant solutions but try this:

Given XML
<?xml version="1.0"?>

<?xml version="1.0"?>
<xsl:transform xmlns:xsl="";
<xsl:output method="text"/>

<xsl:template match="thing">
	<xsl:value-of select="./amount * ./price"/>


bash$ saxon thing.xml thing.xsl
> Hello,
> in my XML file I got two elements named price and amount. Is it
> possible to multiplicate the value of these elements in a xsl
> stylesheet and display it as total amount.
> In a book I found an example, that in XSL files you can work with
> arithmetical terms, but every syntax I tried, did not work. I always
> got the error "Expected token 'eof' found '*'".
> Thanks in advance
> Günter Hofmann

 XSL-List info and archive:

Current Thread