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: picking and choosing


a possible solution would be this (there's plenty of solution depending on
your XML):

if your NEWSTORY(s) have been sorted based on priority...
get all stories upto but not including the 6th.

<xsl:templates match="NEWSTORIES">
  <xsl:if test="position() &lt; 6"> 
	<xsl:apply-templates select="NEWSTORY"/>
  </xsl:if> 
</xsl:templates> 


-----Original Message-----
From: Michael [mailto:mlilley@eurobell.co.uk]
Sent: Tuesday, September 19, 2000 1:28 PM
To: xsl-list@mulberrytech.com
Subject: picking and choosing


Hi, I'm new to xsl and I'm sorry if this sounds dumb:

I need to know how to write an xsl file that can take only 5 items from an
xml file that 30 items in it...
I am taking a newsfeed in XML, but the feed itself has 30 stories, and I
only want to display the first 5 - Is that possible?

Thanks
Micahel


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


 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]