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

append values to a String

Subject: append values to a String
From: "Wang, Dongzhi (ACF)" <DWang@xxxxxxxxxxx>
Date: Wed, 12 Feb 2003 10:52:16 -0500
xsl append string
Hi,

I had a similar question to the one Stevenson just asked about variable.  I
know it's impossible to re-assign value to a variable in XSL, that's why I
don't know what to do in here.  

Here's the xml:

<Sample>
	<K1/>
	<K2>something</K2>
	<K3>something else</K3>
	<K4/>
</Sample>

I'd like to loop through all the children nodes under <Sample>, find those
have non-empty value, and construct a String with all those values append to
each other with a "," delimiter in between them, i.e. the result String
should look like:  "something,something else,".  And I need to assign this
String to a variable since I need to use it elsewhere.

There might be more than 80 children nodes under <Sample>, that's why I
don't want to hard-code concat() in this case...

Any suggestion is highly appreciated!

Thanks,
Dongzhi

 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.