This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: comapring numbers with greater than and less than



The instruction
<xsl:if test="position() &lt; $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() &lt; $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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]