Returning child nodes of a particular type and their properties (Umbraco)
===

I'm trying to write some XSLT which basically should go through the following algorithm:

    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 <div> tags
        end if
    end if

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:

    <xsl:for-each select="$currentPage/ancestor-or-self::Home//AccordionItem[@isDoc]">
        <div id="accordion">
            <h3><a href='#'><xsl:value-of select="accordionItemTitle"/></a></h3>
            <div><xsl:value-of select="accordionItemContent" disable-output-escaping="yes" />
            </div>
        </div>
    </xsl:for-each>

Can anyone offer any suggestions as to why this wouldn't be working correctly? Thanks in advanced!
