xsl-list
[Top] [All Lists]

[xsl] XSLT grouping(?) issue

2008-12-22 04:20:52
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! - sök efter resor hos Kelkoo.
Jämför pris på flygbiljetter och hotellrum här:
http://www.kelkoo.se/c-169901-resor-biljetter.html?partnerId=96914052

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>