This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Limiting a FOR-EACH loop
- From: "Martinez, Brian" <brian dot martinez at trip dot com>
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 18 Sep 2002 13:10:05 -0600
- Subject: RE: [xsl] Limiting a FOR-EACH loop
- Reply-to: xsl-list at lists dot mulberrytech dot com
> From: Wes Kubo [mailto:wkubo@galdosinc.com]
> Sent: Wednesday, September 18, 2002 12:54 PM
> Subject: RE: [xsl] Limiting a FOR-EACH loop
> I tried it out and it worked...no prob. Have you added the
> other necessary
> elements?, e.g.
>
> <xsl:template match="/">
> <xsl:variable name="x" select="'4'"/>
> <xsl:for-each select="/search/results/*[position() <= $x]">
> <xsl:copy-of select="."/>
> </xsl:for-each>
> </xsl:template>
>
> Wes
Sorry to piggy-back . . . I haven't received Gurnam's reply.
If my code snippet doesn't work with your XML, Gurnam, then I'll probably
need to see a sample of your input. I made some assumptions about it based
on your original question.
cheers,
b.
| brian martinez brian.martinez@trip.com |
| senior gui programmer 303.708.7248 |
| trip network, inc. fax 303.790.9350 |
| 6436 s. racine cir. englewood, co 80111 |
| http://www.cheaptickets.com/ http://www.trip.com/ |
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list