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: newbie qtn: best way to display a specific range of records (say, 5-10, or whatever)


> 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


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