← all checks
error recommended //(xsl:variable | xsl:param | xsl:call-template | xsl:function | xsl:key | xsl:attribute-set | xsl:character-map | xsl:accumulator | xsl:element | xsl:attribute | xsl:processing-instruction | xsl:namespace)[not(@name) and not(@_name)] | //(xsl:variable | xsl:param | xsl:with-param | xsl:call-template | xsl:template | xsl:function | xsl:key | xsl:attribute-set | xsl:decimal-format | xsl:character-map | xsl:mode | xsl:accumulator | xsl:element | xsl:attribute)[xslint:attribute(., 'name') = '']

A name that is missing or empty

An empty name="" holds no QName, so the stylesheet is a static error and no processor compiles it. It usually marks a name deleted mid-edit, and nothing says which name was meant, so write it back. A missing @name fails the same way on an element that requires one.

Incorrect:

<xsl:variable name="" select="count(item)"/>
<xsl:key name="" match="section" use="@id"/>
<xsl:call-template name=""/>
<xsl:variable select="count(item)"/>

Correct:

<xsl:variable name="items" select="count(item)"/>
<xsl:key name="sections" match="section" use="@id"/>
<xsl:call-template name="summary"/>
<xsl:variable name="total" select="count(item)"/>

An xsl:template, xsl:mode, or xsl:decimal-format may leave its name out, though never empty. An empty name on xsl:namespace declares the default namespace, and one on xsl:processing-instruction fails only at run time, so neither is reported. The XSLT 3.0 spelling _name="" is empty too.