Re: [xsl] escaping from CDATA

Subject: Re: [xsl] escaping from CDATA
From: "Steve Renshaw" <renshaw_steve@xxxxxxxxxxx>
Date: Fri, 26 Oct 2001 10:45:43 +0000
Thanks Jeni. I got a version of the following to work but I don't
understand why I need the reference to string() - isn't that the
problem that my node is text in the first place - why do I have
to convert it to a string?

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
               xmlns:msxsl="urn:schemas-microsoft-com:xslt"
               xmlns:user="http://mycompany.com/mynamespace";
               version="1.0">

 <msxsl:script language="JavaScript" implements-prefix="user">
   <![CDATA[
     function createNodeset(arg) {
       var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
       xmlDoc.loadXML(arg);
       return xmlDoc;
     }
   ]]>
 </msxsl:script>
 <xsl:template match="CdataNode">
  <xsl:variable name="arg" select="."/>
  <xsl:value-of select="user:createNodeset(string($arg))"/>
 </xsl:template>
</xsl:stylesheet>



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread