![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - [xsl] How to tell if no data returned [Thread Next] Re: [xsl] How to tell if no data returnedTo: Date: 10/2/2006 8:33:00 AM Hi Gary, Just test the for-each expression after the for-each instruction and output whatever note you want there <xsl:for-each="someExpression"> ... </xsl:for-each> <xsl:if test="not(someExpression)"> <note>someExpression does not select any nodes</note> </xsl:if> Best Regards, George --------------------------------------------------------------------- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger www.---.com Garry wrote: Hi all I have a problem which I would normally fix using a variable. I have a routine similar to that below. What I want to know is if it doesnt get into the for-each loop. If it doesnt it means no rows are written and I would like to add a note to the page if this is the case. Any suggestions how I might do this. Thanks Garry <xsl:for-each select="/stages/competition/leg/stage/classification/competitor[../../@no=$s Num]"> <xsl:if test="../@type = 'STAGE'"> <xsl:if test="../../../../@cno=$paramVal1"> ... row detail written here </xsl:if> </xsl:if> </xsl:for-each> | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
