[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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
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...

&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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.