|
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...
<div>C</div><div>o</div><div>l</div><
;div> </div><div>1</div>
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: XSL FO competition, Sebastian Rahtz | Thread | Generating XML(HTML) from script in, keshlam |
| Re: XSL FO competition, Sebastian Rahtz | Date | selectSingleNode vs selectNodes, Éric Riblair |
| Month |