Domanda

I have added a conditional comment in XSL like

 <xsl:comment>          
    <![CDATA[
       [if IE]>
         <script type="text/javascript">
             registerDisplay = firstChild.currentStyle.display;
         </script>
       <![endif]            
     ]]>
 </xsl:comment>

I'm not seeing this my html source in IE. Any help is appreciated.

È stato utile?

Soluzione

If you're unlucky with the xsl:comment, I think alternatively you could use

<xsl:text disable-output-escaping="yes"><![CDATA[<!--[if IE]>
     <script type="text/javascript">
         registerDisplay = firstChild.currentStyle.display;
     </script>
   <![endif]-->]]>
</xsl:text>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top