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

Join elements by name, with spaces in between

Subject: Join elements by name, with spaces in between
From: Yves Forkl <Y.Forkl@xxxxxx>
Date: Mon, 12 Feb 2007 14:47:19 +0100
 Join elements by name
Hi,

in XSLT 2.0 I want to join adjacent sibling elements of the same name, and spaces in between should be included on this occasion. The elements may appear in any order. For instance, if a, b and c instances may need joining, whereas x instances do never repeat and thus are never joined (this is meant to be one single line):

<e><x>x</x> <a>a1</a> <a>a2</a> <b>b</b> <c>c1</c> <c>c2</c> <a>a3</a></e>

should become

<e><x>x</x> <a>a1 a2</a> <b>b</b> <c>c1 c2</c> <a>a3</a></e>

My idea is to use for-each-group, but I can't figure out how to process the siblings and the possible space in between only once and in the right order.

Can you help me?

Yves

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-2011 All Rights Reserved.