[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|