Well, you are here because you are using XSLT and have noticed that IE conditional tag or comment is not showing up in output of XSLT transformation. What could be the reason?
Reason is that XSLT transformation does not output comments given in XSL sheets to HTML stream. So how to use IE conditional tags when you really need them.
The answer is <xsl:comment>
before (not working):
<!--[if IE]> something special for Internet Explorer <![endif]-->
after (working perfectly):
<xsl:comment><![CDATA[[if IE]> something speical for Internet Explorer <![endif]]]></xsl:comment>
In the example above we are using <xsl:comment> tag to output <!-- --> to HTML stream and using CDATA type to outupt rest of the code inside the comment tags. So one little hack and desired output presented.
No comments:
Post a Comment