This is probably one of those posts that I’ll use a million times and everyone else will say… that’s nice. Here’s how you create a conditional comment for IE6 with xsl. you need to use an xsl:comment and a cdata and don’t add any extra spacing.

  1. <xsl:comment><![CDATA[[if lte IE 6]>
  2. IE6 only element, such as an image or css file
  3. <![endif]]]></xsl:comment>

One Response to “Add a conditional comment with XSL”  

  1. 1 Jemaleddin

    Hey, methinks you need to escape more of the code in this post.

Leave a Reply