[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: count selected nodes in for-each
Hi Kristof:
At 04:23 PM 4/4/01, you wrote: xsl:choose is outside the xsl:for-each of course Why "of course"? Ahh -- given your example, it seems you want some logic like: <xsl:for-each select="(...)"> ... </xsl:for-each> <xsl:if test="(no nodes were handled by for-each)"> </xsl:if> Then you could just do <xsl:for-each select="document('../../released_xml/news_xml_en/newsticker.xml')/News/Block[@STARTDATE = '01']" >...</xsl:for-each> <xsl:if test="not(document('../../released_xml/news_xml_en/newsticker.xml')/News/Block[@STARTDATE = '01'])">...</xsl:if> or, more efficiently and clearer: <xsl:variable name="blocks" select="document('../../released_xml/news_xml_en/newsticker.xml')/News/Block[@STARTDATE = '01']"/> <xsl:for-each select="$blocks" >...</xsl:for-each> <xsl:if test="not($blocks)">...</xsl:if> But of course I'm still guessing a bit as to what you're trying to do...:-) Cheers, Wendell -----Original Message----- From: David Carlisle [mailto:davidc@xxxxxxxxx] Sent: woensdag 4 april 2001 17:11 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: count selected nodes in for-each
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
|