You are mistaking the stylesheet
element (the root element of an XSLT stylesheet) for html
(the root element of an HTML document).
The attributes you cite are the ones allowed for the stylesheet
element. See the relevant part of the specification here.
So, specify the lang
attribute on the html
element you output, not on the stylesheet
element.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="/">
<html lang="EN">
<!--HTML content-->
</html>
</xsl:template>
</xsl:stylesheet>
If you want anyone to diagnose your actual problem, you must needs show your XSLT code.