Re: JavaScript error in CDATA section: IE specific

Subject: Re: JavaScript error in CDATA section: IE specific
From: "Paal Eriksen" <pserik@xxxxxxxxxxx>
Date: Mon, 10 Apr 2000 12:27:02 CEST
I experienced the same error. What I dis was to find another way around so i could get the result as i wanted. I did inform microsoft about the problem, cause it seems like it's the parser which has a bug.

Cheers
Paal Steven

From: Charlie Kaiman <ckaiman@xxxxxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxx
To: "XSL-List (E-mail)" <XSL-List@xxxxxxxxxxxxxxxx>
Subject: JavaScript error in CDATA section: IE specific
Date: Fri, 7 Apr 2000 12:09:46 -0400

I'm wondering if someone has experienced a problem with IE, where a
character in a CDATA section is returned as an entity reference????  Here's
my JavaScript code (wrapped in a CDATA section, in an XSL Style Sheet):

<SCRIPT LANGUAGE="JavaScript">
<![CDATA[

function xmlParse() {
 source = document.XMLDocument;
 xNode = source.getElementsByTagName("data_x").item(0);
 strXNode = xNode.text;
 for (i = 0; i < strXNode.length; i++) {
  alert(strXNode);
 }
}
]]></SCRIPT>

I am getting an error due to the script being parsed out as:

<SCRIPT LANGUAGE="JavaScript">
<![CDATA[

function xmlParse() {
 source = document.XMLDocument;
 xNode = source.getElementsByTagName("data_x").item(0);
 strXNode = xNode.text;
 for (i = 0; i &lt; strXNode.length; i++) {
  alert(strXNode);
 }
}
]]></SCRIPT>

Note the "&lt;" in the script????  Is this a bug, or am I doing something
wrong?  Has anyone experienced the same problem?  Thanks!!

______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com


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



Current Thread