Re: [xsl] Child Nodes

Subject: Re: [xsl] Child Nodes
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sat, 8 Sep 2001 18:45:04 +0100
   X-VirusChecked: Checked
   From: Richard Mitchell <Richard.Mitchell@xxxxxxxxxxxxx>
   Date: Fri, 7 Sep 2001 09:01:40 +0100 
   Sender: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
   Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
   X-MailLoop: 1
   Content-Type: text/plain;
	   charset="iso-8859-1"
   Content-Length: 672

   David
   > > A predicate like [1<=count(*)] will do that for you.
   > or, simpler: *
   > 
   > 
   > <xsl:when test="*">there are children</xsl:when>
   > <xsl:otherwise>there are none</xsl:otherwise>
   > 
   Hmmm won't this test for comments and processing instructions?

   Richard

No. * just selects elements, if you want to test for comments and pis as
well use test="node()"

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread