For a long while I've thought this to be impossible, but recently I ran into a few useful sources. It turns out both IE and non-IE comments are quite possible to generate from XSLT. Both use a very different syntax.
This piece of XSLT code from the source code of this very website demonstrates how to use the two types of conditional comments:
<xsl:comment><![CDATA[[if !IE]><!]]></xsl:comment>
<style type="text/css" media="screen">
<xsl:comment>
@import url("style/Moz.main.css"); /* level 1 */
@import url("style/Moz.window.css"); /* level 2 */
@import url("style/Moz.document.css"); /* level 3 */
</xsl:comment>
</style>
<xsl:comment><![CDATA[<![endif]]]></xsl:comment>
<xsl:comment>[if IE]>
<![CDATA[
<style type="text/css" media="screen">
@import url('style/IE.main.css'); /* level 1 */
@import url('style/IE.window.css'); /* level 2 */
@import url('style/IE.document.css'); /* level 3 */
</style>
]]>
<![endif]</xsl:comment>
The resulting code is:
<!--[if !IE]><!-->
<style type="text/css" media="screen">
<!--
@import url("style/Moz.main.css"); /* level 1 */
@import url("style/Moz.window.css"); /* level 2 */
@import url("style/Moz.document.css"); /* level 3 */
-->
</style>
<!--<![endif]-->
<!--[if IE]>
<style type="text/css" media="screen">
@import url('style/IE.main.css'); /* level 1 */
@import url('style/IE.window.css'); /* level 2 */
@import url('style/IE.document.css'); /* level 3 */
</style>
<![endif]-->