[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Selecting node sets for page by page output - without us
Aaron, >then i use a variable and a single <xsl:if> to check for the presence of a >topic name: > > <xsl:variable name="pos"><xsl:number/></xsl:variable> > <xsl:if test="number($pos)=1"> > <xsl:apply-templates select="../../topic"/> > </xsl:if> xsl:number without any attributes will give you the number of the node within the list of it's similar siblings - in your case the number of the story amongst the other story elements within the storyList. So generating that number and checking whether it's '1' or not is equivalent to asking the question 'is this the first story element under its storyList' or 'are there any preceding story elements to this one in the source?'. So, you could change your test to the slightly less ugly: <xsl:if test="not(preceding-sibling::story)"> <xsl:apply-templates select="../../topic" /> </xsl:if> Cheers, Jeni XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|