Subject: Re: Conditional inclusion
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 02 Aug 2000 19:09:32 +0100
|
Brian,
>I need to conditionally append a NEXT hyperlink at the end of the list of
>WINDOWSIZE records if LASTINDEX < NUMMATCHES.
>
>I have also tried xsl:if but I cannot figure out how to construct the test:-
>
> <xsl:if test="{Results/NumMatches/row/NUMMATCHES} >
>{Results/LastIndex/row/LASTINDEX}" >
You're almost there. You don't need to use the {}s within the xsl:if test.
{}s are only used to show attribute value templates when the XSLT
Processor is expecting a literal value. Within a test, the XSLT Processor
is expecting a boolean expression, so you can just use:
<xsl:if test="/Results/NumMatches/row/NUMMATCHES >
/Results/LastIndex/row/LASTINDEX">
<!-- insert NEXT -->
</xsl:if>
I hope that helps,
Jeni
Dr Jeni Tennison
Epistemics Ltd * Strelley Hall * Nottingham * NG8 6PE
tel: 0115 906 1301 * fax: 0115 906 1304 * email: jeni.tennison@xxxxxxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|