Subject: Re: [xsl] test if null From: omprakash.v@xxxxxxxxxxxxx Date: Tue, 28 Jun 2005 16:09:34 +0530 |
Hi, Try 1. <xsl:if test="not(NEWSFLASHAURL = '')"/> or 2. <xsl:if test="not(string-length(NEWSFLASHAURL) = 0)"/> or 3. <xsl:if test="not(count(*) = 0)"/> 1 and 2 check if the content of NEWSFLASHAURL is the zero-length string while 3 tests if NEWSFLASHAURL has no children. Hope this helps. Cheers, Omprakash.V -= jay =- <deepsweech@gmai To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx l.com> cc: (bcc: omprakash.v/Polaris) Subject: Re: [xsl] test if null 06/28/2005 02:59 PM Please respond to xsl-list ok michael here is my XML <?xml version="1.0" encoding="utf-8" ?> - <RetrieveNewsFlashDetailResult_1> - <RETRIEVENEWSFLASHDETAIL itmns="1"> <NEWSFLASHID>201</NEWSFLASHID> <NEWSFLASHTITLE>Check out the latest book review featured in The Sunday Times</NEWSFLASHTITLE> <NEWSFLASHADESC /> <NEWSFLASHAURL>Announcement/TSTReviewShow.asp</NEWSFLASHAURL> </RETRIEVENEWSFLASHDETAIL> - <RETRIEVENEWSFLASHDETAIL itmns="2"> <NEWSFLASHID>215</NEWSFLASHID> <NEWSFLASHTITLE>Libraries will be opened on Monday, 23 May 2005</NEWSFLASHTITLE> <NEWSFLASHADESC>We are please to announce that the following libraries will be opened on Monday, 23 May 2005 <br> <br> Regional and Standalone Community Libraries - 10am - 9am <br> Shopping Mall Community Libraries - 11am - 9pm <br> Community Children's Libraries - Closed. <br></NEWSFLASHADESC> <NEWSFLASHAURL /> </RETRIEVENEWSFLASHDETAIL> - <STATUS> <STATUSRETURN>0000</STATUSRETURN> </STATUS> </RetrieveNewsFlashDetailResult_1> notice the <NEWSFLASHAURL> node? the other has a value : <NEWSFLASHAURL>Announcement/TSTReviewShow.asp</NEWSFLASHAURL> and the other has none : <NEWSFLASHAURL /> how would i check this one? thnks! This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited. Visit Us at http://www.polaris.co.in
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] test if null, Joris Gillis | Thread | Re: [xsl] test if null, David Carlisle |
Re: [xsl] XSL siblings, omprakash . v | Date | Re: [xsl] test if null, David Carlisle |
Month |