← all checks
error /xsl:stylesheet[count(xsl:template) > 0 and count(xsl:output) = 0]

Not using output

Every stylesheet that has templates must declare xsl:output to specify the serialization format explicitly. Omitting it leaves the output method implementation-defined and leads to inconsistent results across processors. A module with no templates — one imported into a pipeline that sets the output itself — is exempt, since it never serializes on its own.

Incorrect:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <html><body><xsl:value-of select="."/></body></html>
  </xsl:template>
</xsl:stylesheet>

Correct:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" encoding="UTF-8"/>
  <xsl:template match="/">
    <html><body><xsl:value-of select="."/></body></html>
  </xsl:template>
</xsl:stylesheet>