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

Re: group together subsequent elements?

Subject: Re: group together subsequent elements?
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Sat, 17 Mar 2012 12:12:03 +0100
Re:  group together subsequent elements?
MatDj Cepl wrote:

I am probably missing something very obvious, but I have not found a way
how to combine group of same elements into one. Meaning, I have on input

n.: <spoj>mC!m</spoj> <spoj>zalC-benC-</spoj>

and I would like to get on output

n.: <linked>mC!m zalC-benC-</linked>

(number of elements in one group can vary).

Do I miss something completely trivial or it is one of those things
which XSLT cannot do?

I am sure there are easy solutions with XSLT 2.0 and for-each-group but without seeing more context it is hard to say whether you simply want
<xsl:for-each-group select="*" group-by="node-name(.)">
or
<xsl:for-each-group select="*" group-adjacent="node-name(.)">
So show us more context, like the parent element of those "spoj" elements, what kind of sibling elements there are, how the expected output looks with those siblings included.


--

	Martin Honnen --- MVP Data Platform Development
	http://msmvps.com/blogs/martin_honnen/

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.