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

XSLT grouping(?) issue

Subject: XSLT grouping(?) issue
From: Fredde Hedberg <syte_orion@xxxxxxxxx>
Date: Mon, 22 Dec 2008 01:20:26 -0800 (PST)
 XSLT grouping(?) issue
Hi,

I'm fairly new to XSLT and transformations and now I've run in to a problem
that I see no solution to.
I have a horrible formed incoming XML with a structure looking something like
this (simplified):

<Orders>
<StartOrderGroup><Id=1/></StartOrderGroup>
<Car><Id=2/></Car>
<Car><Id=3/></Car>
<Bus><Id=4/></Bus>
<EndOrderGroup><Id=5/></EndOrderGroup>
<Car><Id=6/></Car>
<Truck><Id=7/></Truck>
<StartOrderGroup><Id=8/></StartOrderGroup>
<Truck><Id=9/></Truck>
<EndOrderGroup><Id=10/></EndOrderGroup>
</Orders>

Sadly, I can't do anything about the format of this XML.
What I need to do is to select all nodes between a <StartOrderGroup>-element
and a <EndOrderGroup>-element, so that I get an output like:

Order
-----
Car - 2
Car - 3
Bus - 4

Order
-----
Truck - 9

I've fiddled around with the following-sibling and following axes and I've
tried using key, but I haven't yet found a way to make it work. I haven't
found an appropriate issue in the FAQ's either.
Is my request at all possible? If so, how? Any help is warmly appreciated.

Regards

Fredde


      __________________________________________________________
Ta
semester! - svk efter resor hos Kelkoo.
Jdmfvr pris pe flygbiljetter och
hotellrum hdr:
http://www.kelkoo.se/c-169901-resor-biljetter.html?partnerId=96914052

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.