← all checks
warning safe fix checked over the tokens, not an XPath rule

--fix rewrites this one: the correction is deterministic, and leaves the stylesheet meaning what it meant.

Redundant double negation

not(not(x)) negates x twice, which only coerces it to a boolean. A reader has to cancel the two nots in their head and then wonder whether the author meant something subtler. Write boolean(x), or plain x where only a truth is taken: a test, a use-when, an operand of and or or, or a condition.

Incorrect:

<xsl:if test="not(not(@enabled))">
<xsl:value-of select="@a and not(not(@enabled))"/>
<xsl:value-of select="not(not(@enabled))"/>

Correct:

<xsl:if test="@enabled">
<xsl:value-of select="@a and @enabled"/>
<xsl:value-of select="boolean(@enabled)"/>