Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Limit the number of items processed in XML [Thread Next] Re: Limit the number of items processed in XMLTo: NULL Date: 1/2/2006 6:32:00 PM On Mon, 2 Jan 2006 10:17:02 -0800, "K" <K@d...> wrote: >I have an XML snipped as follows: > ><Root> ><Item>1</Item> ><Item>2</Item> ><Item>3</Item> ><Item>4</Item> ><Item>5</Item> ></Root> > >When I apply my XSL to display the HTML, I want to limit to the top 3 items >regardless of how many items are there in my XML. How do I do this? Probably like this : <xsl:for-each select="/Root/Item[position() < 4]"> <xsl:value-of select="." /> </xsl:for-each> Cheers - Neil | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
