|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Generating XML(HTML) from script in IE5b2...
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








