This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Basic xsl:choose question
- From: David Carlisle <davidc at nag dot co dot uk>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 17 Jun 2002 10:27:13 +0100
- Subject: Re: [xsl] Basic xsl:choose question
- References: <000b01c21696$ff2c3d30$cd72003e@242cgyw7d7uhs3>
- Reply-to: xsl-list at lists dot mulberrytech dot com
<xsl:when test="name()[@type='father']">
That is a syntax error as name() returns a string, the name of the
current node, and you can not apply [....] predicates to a string, only
a node set.
You want to test if the current node has a type attribute with value
father, so that's just
<xsl:when test="@type='father'">
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