从XSLT生成IE版本条件注释块

从XSLT生成IE版本条件注释块,xslt,conditional-comments,Xslt,Conditional Comments,我试图添加以下条件注释: <!doctype html> <!--[if lt IE 7 ]> <html class="ie6"> <![endif]--> <!--[if IE 7 ]> <html class="ie7"> <![endif]--> <!--[if IE 8 ]> <html class="ie8"> <![endif]--> <!--[

我试图添加以下条件注释:

<!doctype html>
<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
<!--[if IE 7 ]>    <html class="ie7"> <![endif]-->
<!--[if IE 8 ]>    <html class="ie8"> <![endif]-->
<!--[if IE 9 ]>    <html class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class=""> <!--<![endif]-->
<head>

到xsl文件:

<xsl:comment>
      <![CDATA[[if lt IE 7 ]> <head class="ie6"> <![endif]]]>
      <![CDATA[[if IE 7 ]>    <head class="ie7"> <![endif]]]>
      <![CDATA[[if IE 8 ]>    <head class="ie8"> <![endif]]]>
      <![CDATA[[if IE 9 ]>    <head class="ie9"> <![endif]]]>
      <![CDATA[[if (gt IE 9)|!(IE)]><!--> <head class=""> <!--<![endif]]]>
    </xsl:comment>


这些条件中的每一个都需要是单独的


[如果(gt IE 9)|!(IE)]>

这些条件中的每一个都需要是一个单独的


[如果(gt IE 9)|!(IE)]>
<xsl:comment><![CDATA[[if lt IE 7 ]> <html class="ie6"> <![endif]]]></xsl:comment>
<xsl:comment><![CDATA[[if IE 7 ]> <html class="ie7"> <![endif]]]></xsl:comment>
<xsl:comment><![CDATA[[if IE 8 ]> <html class="ie8"> <![endif]]]></xsl:comment>
<xsl:comment><![CDATA[[if IE 9 ]> <html class="ie9"> <![endif]]]></xsl:comment>
<xsl:comment>[if (gt IE 9)|!(IE)]></xsl:comment>
<html class=""> <xsl:comment><![endif]</xsl:comment>
  <!-- rest of the content goes here -->
</html>