I don’t think @it_vegard is answering the original question, although his answer is correct if you want to insert quotes into an attribute (I would personally insert a variable containing an unescaped quote symbol).
I think @ksawery is really asking how to output an HTML5 boolean attribute, like the code snippet on the line below:
<img alt />
In that case, the only way I know you can achieve that using the output methods provided by XSLT is by unescaping a text string, by using the following code:
<xsl:text disable-output-escaping="yes"><img alt /></xsl:text>
The W3 spec provides an alternative solution for boolean attributes:
If the [boolean] attribute is present, its value must either be the empty string or a value that is an ASCII case-insensitive match for the attribute’s canonical name, with no leading or trailing whitespace.
The spec contains the following examples:
<input type="checkbox" checked name="cheese" disabled />
<input type="checkbox" checked="checked" name="cheese" disabled="disabled" />
Both are valid HTML5, but only the second example is possible in XSLT unless you want to resort to unescaped text like in my proposed solution above.
In other words, for boolean attributes just make sure that the attribute value matches the attribute name.
However, the example in the OP of an alt attribute on an img tag concerns me. Alt attributes are not boolean attributes! They are always required on img tags, and the value must either be a string containing descriptive text, or an empty string
While the W3 spec does provide some guidelines for when empty alt attributes in chapter 126.96.36.199.2, their wording is very general and vague.
I would instead follow the much more real-world-oriented guidelines given by WebAIM for alternate text on images. Their examples are extremely well chosen, and provides good guidelines for common use cases.