Generating XML(HTML) from script in IE5b2...

Subject: Generating XML(HTML) from script in IE5b2...
From: Guy_Murphy@xxxxxxxxxx
Date: Mon, 4 Jan 1999 14:24:30 +0000
Hi.

Was wondering if anybody could help with the following piece of script
under IE5b2 (on the server-side)....

     <xsl:script>
          <![CDATA[
               function displayVert (node) {
                    var result = '';
                    var text = node.text;

                    for (var i = 0; i < text.length; i++) {
                         result += '<div>'+text.substr(i, 1)+'</div>';

                    }

                    return result;
               }
          ]]>
     </xsl:script>

The problem I'm getting is that what winds up in the browser is something
like...

&lt;div&gt;C&lt;/div&gt;&lt;div&gt;o&lt;/div&gt;&lt;div&gt;l&lt;/div&gt;&lt
;div&gt; &lt;/div&gt;&lt;div&gt;1&lt;/div&gt;

Now whether this is what gets returned from the function I can't be sure,
as I'm still not that confident in this whole area. I tried acting on the
node tree
directly, testing with...
node.text = 'blah';
...but that threw an error.

On a broader note, I feel we need a method in XSL for iterating through
character data of an element, or if I've missed a convenient
 methodology for doing this, I'd be grateful if somebody would point it
out.

Thanks for any advice.

Guy.



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


Current Thread