title: Returning child nodes of a particular type and their properties (Umbraco)
body: <p>I'm trying to write some XSLT which basically should go through the following algorithm:</p>
  
  <pre><code>if child of current node is of type Accordion
      if child of Accordion node is of type AccordionItem
          take the AccordionItem's title and content and display in &lt;div&gt; tags
      end if
  end if
  </code></pre>
  
  <p>It seems pretty straight forward, but the code I currently have doesn't appear to be working as it should. I must be missing something, but I can't figure out exactly what. Here's my XSLT code so far:</p>
  
  <pre><code>&lt;xsl:for-each select="$currentPage/ancestor-or-self::Home//AccordionItem[@isDoc]"&gt;
      &lt;div id="accordion"&gt;
          &lt;h3&gt;&lt;a href='#'&gt;&lt;xsl:value-of select="accordionItemTitle"/&gt;&lt;/a&gt;&lt;/h3&gt;
          &lt;div&gt;&lt;xsl:value-of select="accordionItemContent" disable-output-escaping="yes" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>Can anyone offer any suggestions as to why this wouldn't be working correctly? Thanks in advanced!</p>