[xsl] How do I check to see if any of my descendants contain a certain value?

Subject: [xsl] How do I check to see if any of my descendants contain a certain value?
From: "Richard Sayre" <richardsayre@xxxxxxxxx>
Date: Fri, 3 Aug 2007 09:33:34 -0330
I am trying to check me XML to see if any of the descendants contain a
certian value.

The XML is:

<root>

<type>

<id>5</id>
<inUse>0</inUse>

<childTypes>
<key>1</key>
<value>
<type>
<id>6</id>
   <inUse>1</inUse>
    <childTypes>
         <key>4</key>
          <value>
                 ......
          </value>
    </childTypes>

</type>
</value>
</childTypes>

</type>

</root>

I can have unlimited Child Types in each type.  When I get to a
certain type, I want to check and see if this node or any descendants
of this node has a value of 0 for the inUse node.

This is what I tried but it did not work:

 <xsl:if test="descendant-or-self::inUse = 0">


  </xsl:if>

Is there any way to do this?

Thank you,

Rich

Current Thread