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]

Grouping nodes by 4 using "(position() mod 4)*100"


I would like to display n amounts of nodes in a for-each and group them by
4's ie 12 menu items witha repeating pattern every 4 menu items. Looking in
the MSXML documentation I came up with the following XSL:

<xsl:if test="(position() mod 4)*100 = 0">
 <p>remainder = 0</p>
 </xsl:if>
 <xsl:if test="(position() mod 4)*100 = 25">
 <p>remainder = .25</p>
 </xsl:if>
 <xsl:if test="(position() mod 4)*100 = 50">
 <p>remainder = .5</p>
 </xsl:if>
 <xsl:if test="(position() mod 4)*100 = 75">
 <p>remainder = .75</p>
 </xsl:if>

Which I could extend to do what I need. However when I ran it I got the
following error

MSXML3.DLL error '80004005'
Unknown method. -->position()<-- mod 4*100 = 0
Which indicates the position function is not available... Is there somewhere
I need to do some sort of include etc.. to have this function available?
Thanks in advance,
Brad Crouch


 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]