This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Non-existing node
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Non-existing node
- From: Francis Norton <francis at redrice dot com>
- Date: Mon, 17 Sep 2001 10:37:06 +0100
- References: <4AD94ABEB713D411B1E300A0C99599261B270A@mail.bowneglobal.es>
- Reply-To: xsl-list at lists dot mulberrytech dot com
"Casadome, Francisco Javier" wrote:
>
>
> Ok, but the parser has to compare against something, so my question is
> if there's any reserved word or something to refer to an empty-nodeset.
> Let's say the reserved word is "ENS" (Empty Node Set), that way you could
> write something like this:
>
> <xsl:if test="Parent/MyNode=ENS">...</xsl:if>
>
> To select all "Parent" nodes that don't have a "MyNode" child.
> Maybe it's just me... sometimes I just can't see the easy way to solve
> problems :)
>
Ah, if your question is "how I can tell if a nodeset is empty?" then one
answer is
<xsl:if test="count(Parent/MyNode)=0">...</xsl:if>
HTH -
Francis.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list