This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: comapring numbers with greater than and less than
- To: xsl-list at mulberrytech dot com
- Subject: Re: comapring numbers with greater than and less than
- From: David_Marston at lotus dot com
- Date: Thu, 24 Aug 2000 13:24:26 -0400
- Reply-To: xsl-list at mulberrytech dot com
The instruction
<xsl:if test="position() < $totalcount div 2">
certainly should work in all 1.x versions of Xalan.
Perhaps it "doesn't work" because $totalcount doesn't
contain the correct value, but the syntax should be okay.
I gather that $totalcount is specified as a variable to
avoid evaluating count(something) repeatedly. Why not put
the whole right-hand-side into a variable so you can just
say
<xsl:if test="position() < $divider">
and do a diagnostic display of $divider before you start
to ensure it has the value you expect?
Of course, it's also possible that position() isn't
being applied in the context you expected.
.................David Marston
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list