xslt --> position() function
I'm learning xslt at the moment, I want to use the following as a means to compare a value to the same value on a previous node in a node set.
<xsl:if test="column[@name='Database Name']/@value!=(//records/record)[string(position()-1)]/column[@name='Database Name']/@value">
where the data looks a bit like this
<records>
<record>
<column name="Database Name" value="DB1"/>
</record>
<record>
<column name="Database Name" value="DB2"/>
</record>
</records>
Unfortunately the bit where I refer to position() - 1 doesn't work. using a value-of on it's own will output it as text and sometimes it will display something (usually the first node) but it can't do the comparison.
HELP!!!