xsl-list
[Top] [All Lists]

Re: test if null

2005-06-28 03:39:34





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(_at_)gmai         To:      
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com                                
         
                      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!

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>