[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Sort an xml file by the using the ordering/sorting in
I want to sort the elements of an xml file, The criteria of ordering is actually specified in another xml file. Can i use xsl to sort one xml file by the using the ordering data from another xml file?: I give a small e.g. The Original xml file: main.xml <myRoot> <myElement key=3D"Tokyo" country=3D"JAP">I am Tokyo</myElement> <myElement key=3D"NewYork" country=3D"US">I am NewYork</myElement> <myElement key=3D"Sydney" country=3D"AUS">I am Sydney</myElement> <myElement key=3D"London" country=3D"UK">I am London</myElement> </myRoot> The Sorting Criteria xml file: SortingOrder.xml: <mySortingOrder> <myElement key=3D"NewYork" /> <myElement key=3D"London" /> <myElement key=3D"Tokyo" /> <myElement key=3D"Sydney" /> </mySortingOrder>
in the final xml, the myElement elements are sorted according to the sortin= g order specified in SortingOrder.xml. Can i achieve this using xsl? Normally for the xsl:sort the sorting information should be present in the element itself. Thanks in advance. Jagdishwar.
|
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
|