← all checks
warning //xsl:variable[every $x in (//xsl:variable/../*//@*) satisfies not(contains($x, concat('$', @name)))]

Unused variable

A variable that is declared but whose $name never appears in any attribute value in the stylesheet is dead code and should be removed.

Incorrect:

<xsl:variable name="greeting" select="'Hello'"/>
<!-- $greeting is never referenced -->

Correct:

<xsl:variable name="greeting" select="'Hello'"/>
<p><xsl:value-of select="$greeting"/></p>