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

Re: Re: group together subsequent elements?

Subject: Re: Re: group together subsequent elements?
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 17 Mar 2012 10:43:19 -0400
Re:  Re: group together subsequent elements?
At 2012-03-17 15:16 +0100, MatDj Cepl wrote:
On 17.3.2012 12:12, Andrew Welch wrote:
XSLT can do that in several ways, but you will need to provide better
samples covering all of your requirements and edge cases to save going
through the loop.  Do you need a 1.0 solution or can you use 2.0?

Sorry, I should say that I need 1.0 if possible.

When using XSLT 1.0 I've done this by creating a key table assigning to all text nodes the generated identifier of the trigger element to which the text nodes belong.

Then when you encounter a trigger element you can
retrieve all of the text nodes associated with that element.

This also works in XSLT 2.0, but without any
examples from you illustrating various
combinations or scenarios of the kinds of text
aggregation you need, it is impossible for any
volunteer on the list to help you in a substantial way.

Please provide a few samples of your input with
their respective desired output for each.

I hope the above at least helps a bit.

. . . . . . . . . . Ken

p.s. be careful using XSLT 1.0 in Microsoft IE
... the white-space-only text node between two
elements will be unavailable in the data model of
the document and you won't know that it was ignored by their XSLT processor

--
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/uoui9h
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/s/
G. Ken Holman                   mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal

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.