This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Child Nodes
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Child Nodes
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Sat, 8 Sep 2001 18:45:04 +0100
- CC: xsl-list at lists dot mulberrytech dot com
- References: <191E23677373D411BFB900D0B7A7BA28394BA5@mail.vbnonline.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
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