Subject: RE: [xsl] newbie qtn: best way to display a specific range of records (say, 5-10, or whatever) From: "Chris Bayes" <chris@xxxxxxxxxxx> Date: Wed, 19 Sep 2001 15:36:25 +0100 |
Clark, You haven't shown us the xml so this can probably be greatly improved but try something like <xsl:for-each select="//data/job[(position() > //params/startrecord) and position() < //params/numrecords + //params/startrecord]"> ... Beginners rule number 2: Never use "//" Ciao Chris XML/XSL Portal http://www.bayes.co.uk/xml > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > Clark Freifeld > Sent: 19 September 2001 20:51 > To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] newbie qtn: best way to display a specific > range of records (say, 5-10, or whatever) > > > Hello all. I have just subscribed to the list, I am a newbie > to XSL. My > question is as follows: > > Ideally what I want to do is something like this: > > <xsl:for-each select="//data/job" startwith="//params/startrecord" > numrecords="//params/numrecords"> > A 'job' in turn contains a few levels of data, display it > here in various > ways, no problem. > </xsl:for-each> > > So you see what I want: just a specific range of records, > based on integer > parameters supplied in the xml document itself. Preferably > I'd like to avoid > the method of iterating over all records, and simply not > displaying those > outside the range. > > I'm sure this is something brutally obvious to the skilled > XSL user, but I > couldn't seem to find a clear way to do in the documentation > I looked at. > > Thanks! > > Clark > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] newbie qtn: best way to d, Michael Kay | Thread | [xsl] no newlines or carriage retur, Matt Alexander |
RE: [xsl] variable as select for te, Michael Kay | Date | RE: [xsl] Problem in XSL - eval fun, Chris Bayes |
Month |