Thanks for all the suggestions I have found the solution I was after.
I had the basic idea but my XPATH was incorrect:
<xsl:variable name="x" select="RETAILER_STATEMENT/STATEMENT_HEADER/out"/>
<xsl:for-each select="RETAILER_STATEMENT/TRANSACTIONS/TRANSACTION">
<xsl:if test="position() > 0">
<xsl:if test="position() < $x">
<TR>
<TD class='clsVpTableCell'><xsl:value-of
select="TransactionDate"/></TD>
<TD class='clsVpTableCell'><xsl:value-of
select="StatementDescription"/></TD>
<TD class='clsVpTableCell'><xsl:value-of
select="ShortDescription"/></TD>
<TD class='clsVpTableCell'><xsl:value-of
select="TransactionCurrency"/></TD>
<TD class='clsVpTableCell'><xsl:value-of
select="RetailerTransactionAmount"/></TD>
<TD class='clsVpTableCell'><xsl:value-of
select="RetailerCurrency"/></TD>
<TD class='clsVpTableCell'><xsl:value-of
select="SettlementCurrencyAmount"/></TD>
<TD class='clsVpTableCell'><xsl:value-of
select="CustomersTransactionDate"/></TD>
<TD class='clsVpTableCell'><xsl:value-of
select="CustomersTransactionCurrency"/></TD>
</TR>
</xsl:if>
</xsl:if>
</xsl:for-each>
Cheers,
Charlie
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list