You can use this XPath:
//a[b/c/@d = 'text1' and b/c/@d = 'text4']/b/c[@d = 'text5']/@e
It will select e="text15" and e="text35" of 1st and 3rd a/b
XSLT:
<xsl:template match="//a[b/c/@d = 'text1' and b/c/@d = 'text4']/b/c[@d = 'text5']">
<xsl:value-of select="@e"/>
</xsl:template>