Subject: Re: [xsl] Simple problem - complicated solution From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Thu, 16 May 2002 21:11:02 +0200 |
<avg value="{sum(datum/@value)/count(datum/@value)}"/>
I think that Joerg meant to write <avg value="{sum(datum/@value) div count(datum/@value)}"/> instead.
Cheers, Stuart
-----Original Message-----
<xsl:template match="data">
<!-- selects the first datum/@value with not a following datum/@value
less than this one --> <min value="{datum[not(../datum/@value < @value)]/@value}"/> <!-- selects the first datum/@value with not a following datum/@value
greater than this one --> <max value="{datum[not(../datum/@value > @value)]/@value}"/> <!-- like in mathematics: avg = sum / count --> <avg value="{sum(datum/@value)/count(datum/@value)}"/> </xsl:template>
Regards,
Joerg
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Simple problem - complica, Stuart Celarier | Thread | RE: [xsl] Simple problem - complica, Stuart Celarier |
Re: [xsl] Document() and &, B. Tommie Usdin | Date | Re: [xsl] Beginner XSL question, Joerg Heinicke |
Month |