This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Child Nodes


   X-VirusChecked: Checked
   From: Richard Mitchell <Richard.Mitchell@vbnonline.com>
   Date: Fri, 7 Sep 2001 09:01:40 +0100 
   Sender: owner-xsl-list@lists.mulberrytech.com
   Reply-To: xsl-list@lists.mulberrytech.com
   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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]