[thelist] Testing for presence of node

Lindsay Evans lindsay at redsquare.com.au
Thu Jun 20 20:47:01 CDT 2002


> In my XSLT stylesheet, I need to be able to test if the <category>
> node I'm working with contains a <subcategory> node.

Funnily enough, I had to do exactly the same thing yesterday :o)

Try this:

<xsl:if test="not(count(./subcategory) = 0)">
...
</xsl:if>

--
 Lindsay Evans.
 Developer,
 Red Square Productions.

 [p] 8596.4000
 [f] 8596.4001
 [w] www.redsquare.com.au





More information about the thelist mailing list