whit this code I understood
source:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<parent>
<variable>A</variable>
<child>
<variable>B</variable>
</child>
</parent>
xslt:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" />
<xsl:template match="/parent">
<xsl:value-of select="string('using current')"/>
<xsl:choose>
<xsl:when test="child[current()/variable = 'A']">
<xsl:text> child[current()/variable = 'A']// -> is true</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> child[current()/variable = 'A']// -> is false</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="string(' using dot')"/>
<xsl:choose>
<xsl:when test="child[./variable = 'A']">
<xsl:text> child[./variable = 'A']// -> is true</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> child[./variable = 'A']// -> is false</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="string(' using dot')"/>
<xsl:choose>
<xsl:when test="child[./variable = 'B']">
<xsl:text> child[./variable = 'B']// -> is true</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> child[./variable = 'B']// -> is false</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
output:
using current
child[current()/variable = 'A']// -> is true
using dot
child[./variable = 'A']// -> is false
using dot
child[./variable = 'B']// -> is true
so, you can check that with "current" function you are looking for inside the current node, not inside the child, such as with the dot.