Example for the usage of axes in XSLT:
<xsl:for-each select="cdlist/cd/work">
<xsl:choose>
<xsl:when test=". = 'Sweet Lorraine'" >
<td>
<xsl:value-of select="ancestor::cd/artist"/>
</td>
</xsl:when>
</xsl:choose>
</xsl:for-each>