This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: escaping from CDATA


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]