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

RE: newbie qtn: best way to display a specific range o

Subject: RE: newbie qtn: best way to display a specific range of records (say, 5-10, or whatever)
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Wed, 19 Sep 2001 15:28:04 +0100
best ways to find range
> Ideally what I want to do is something like this:
>
> <xsl:for-each select="//data/job" startwith="//params/startrecord"
> numrecords="//params/numrecords">

You want

<xsl:variable name="start" select="number(//params/startrecord)"/>
<xsl:variable name="count" select="number(//params/numrecords)"/>
<xsl:for-each select="//data/job[position() &gt;= $start and position() &lt;
$start+$count]">

> I'd like to avoid
> the method of iterating over all records, and simply not
> displaying those outside the range.
>

Then you'll have to find a rather clever XSLT processor.

If you're going to process the same source document repeatedly then you
might find some way of building an index using <xsl:key> that avoids the
serial scan, but I suspect you're going to have to live with it.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.