← all checks
warning suggested fix /*[if (self::xsl:*) then (not(@version) and not(@_version)) else (not(@xsl:version) and .//xsl:* and not(.//(xsl:stylesheet | xsl:transform | xsl:package)))] | /*[not(self::xsl:*)]//(xsl:stylesheet | xsl:transform | xsl:package)[not(@version) and not(@_version)]

--fix-suggestions rewrites this one, and a plain --fix leaves it alone: the correction changes what the stylesheet does, or is one of several the check would accept.

Missing version in stylesheet

A stylesheet that declares no XSLT version is invalid, and a conformant processor rejects it. Declare version on the xsl:stylesheet, xsl:transform, or xsl:package root.

Incorrect:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <!-- stylesheet logic -->
</xsl:stylesheet>

Correct:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <!-- stylesheet logic -->
</xsl:stylesheet>

A simplified stylesheet, whose root is a literal result element, declares xsl:version on that root instead. A stylesheet embedded in a data document declares version on its own xsl:stylesheet element.