Subject:XSL SORTING PROBLEM !! Author:john jenkinson Date:09 May 2007 08:59 AM Originally Posted: 08 May 2007 10:08 AM
Hi
I am trying to sort a xml file using xslt in order to display the lowest RoomPrice for each Hotel node in order i.e if a Hotel has a RoomPrice of £49 and another RoomPrice of £59 (same Hotel) it should then put the one with £49 first. There are also mulitple Hotels and these should be sorted on lowest RoomPrice within each Hotel.
If anyone could help it would be of great benefit to me.
Subject:XSL SORTING PROBLEM !! Author:Elias Huter Date:09 May 2007 08:24 AM Originally Posted: 09 May 2007 07:47 AM
- Can there be more than one "RoomType" Node per "Hotel" node, or only mutliple "Room" Nodes?
- Must the prices per Room also be sorted or only the rooms and afterwards the hotels?
- Can you use XSLT 2.0 or only XSLT 1.0?
Subject:XSL SORTING PROBLEM !! Author:john jenkinson Date:09 May 2007 09:13 AM Originally Posted: 09 May 2007 09:07 AM
There is generally only one RoomType but there can be more than one RoomType (max 2). Each Hotel should be sorted by the lowest RoomPrice of any of it's rooms. The rooms should also be sorted by the lowestPrice per room.
XSL 1.0 is being used at the moment
Subject:XSL SORTING PROBLEM !! Author:Elias Huter Date:09 May 2007 10:32 AM
I'm sorry, I dont see a XSLT 1.0 solution although there might be one. Nontheless I acomplished to make a XSLT 2.0 solution, maybe it helps you or shows you a direction how to solve your problem.
Be aware that I tested the XSL a bit and it seems to work, please test it thoroughly anyway if you plan to use it.