[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Working through a sorted nodeset 3 at a time

Subject: Re: Working through a sorted nodeset 3 at a time
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sun, 11 Jul 2004 22:29:07 +0100
xpath sorted
 select="current()[position() mode 3 = 1" mode="hits_page" />

current() always selects exactly one node, so position() is going to be
equal to 1, so the predicate here is doing nothing (even if you fix the
mod(e) typo and the missing ]

hard to know quite what you want since you didn't show your input or your
desired output but if you move the predicate to somewhere where
position() is determined by the xsl:sort it's probably closer to a
solution:

    <xsl:template match="ROW" mode="sorted_list">
<xsl:if test="position() mod 3 = 1">
        <xsl:apply-templates select="." mode="hits_page" />
</xsl:if>
    </xsl:template>

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.