← all checks
error //( xsl:if | xsl:when)[not(@test)]

Not using @test

Each xsl:if and xsl:when must have a test attribute. It sets a condition in the form of an XPath expression that returns true or false, which determines whether the contents of the element will be fulfilled.

Incorrect:

<xsl:when>
  <!-- body -->
</xsl:when>

or:

<xsl:if>
  <!-- body -->
</xsl:if>

Correct:

<xsl:when test="@ooo">
  <!-- body -->
</xsl:when>

or:

<xsl:if test="@ooo">
  <!-- body -->
</xsl:if>