Subject: Re: [xsl] Calculating cumulative values and min/max|
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Wed, 13 Jun 2007 10:00:26 +0100
a) in the predicate [@x = current()/@x], why is current node used and not the context node used? I guess I'm confused at to which @x is which in the predicate.
current() returns the current node from outside of the the XPath, so if you have:
then you are comparing @x on the parent node (the first @x in the predicate), and @x on the node thats currently being matched (the second @x).
<xsl:variable name="this" select="."/> <xsl:value-of select="parent::*[@x = $this/@x"/>
b) is it possible to calculate min/max values is this only possible in XSLT/XPATH 2.0?