What I wish I could do in xsl is the following, but unfortunatly parent/position() is not valid.
XSL
<xsl:template match="li">
<bullet>
<xsl:apply-templates/>
</bullet>
<!-- if this is the last bullet AND there are no more "p" tags, output footer -->
<xsl:if test="count(ancestor::div/*) = parent/position()">
<footer/>
</xsl:if>
</xsl:template>
XML
<html>
<div>
<p>There is an x number of me</p>
<p>There is an x number of me</p>
<p>There is an x number of me</p>
<ul>
<li>list item</li>
<li>list item</li>
<li>list item</li>
<li>list item</li>
<li>list item</li>
</ul>
</div>
</html>
Anyone have any ideas how to figure out this problem from WITHIN my template match for li?
Thanks!