blob: 138f70316220d949d93c042884fca81d28b8c0c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="utf-8"/>
<xsl:template match="val">
<val>
<current>
<xsl:value-of select="."/>
</current>
<smooth>
<xsl:value-of select="floor(sum(preceding-sibling::val[position() < 4] | following-sibling::val[position() < 4]) div count(preceding-sibling::val[position() < 4] | following-sibling::val[position() < 4]))"/>
</smooth>
<delta>
<xsl:value-of select=". - preceding-sibling::val[1]"/>
</delta>
</val>
</xsl:template>
</xsl:stylesheet>
|