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

Sorting a XML file with XSL

Subject: Sorting a XML file with XSL
From: Buddhi Dananjaya <buddhi@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 24 Oct 2007 13:17:29 +0530
 Sorting a XML file with XSL
Hi All,
Following is my sample XML file, I want to sort this base on <comment> tag and make a new XML file using a style sheet (XSLT),
Can anyone help me..?


- Buddhi -

(Sort - <data></data> tag blocks which carry same <comment> inner text, should come closer)

<root>
   <data name="MN_UTL10">
       <value>&amp;New Add-In...</value>
       <comment>NewAddin.cs</comment>
   </data>
   <data name="MN_EDTMNU">
       <value>&amp;Edit</value>
       <comment>Main.cs</comment>
   </data>
   <data name="MN_EDT1">
       <value>Cu&amp;t</value>
       <comment>Main.cs</comment>
   </data>
   <data name="MN_EDT2">
       <value>&amp;Copy</value>
       <comment>Main.cs</comment>
   </data>
   <data name="MN_EDT3">
       <value>&amp;Paste</value>
       <comment>Main.cs</comment>
   </data>
   <data name="MN_EDT4">
       <value>&amp;Delete</value>
       <comment>Text.cs</comment>
   </data>
   <data name="MN_EDT5">
       <value>&amp;Undo</value>
       <comment>Main.cs</comment>
   </data>
   <data name="MN_EDT6">
       <value>&amp;Redo</value>
       <comment>Main.cs</comment>
   </data>
   <data name="MN_EDT7">
       <value>Select All</value>
       <comment>Text.cs</comment>
   </data>
   <data name="MN_FLMNU">
       <value>&amp;File</value>
       <comment>Text.cs</comment>
   </data>
   <data name="MN_FL1">
       <value>&amp;New</value>
       <comment>Main.cs</comment>
   </data>
   <data name="MN_FL2">
       <value>New Command File</value>
       <comment>Text.cs</comment>
   </data>
   <data name="MN_FL3">
       <value>New Visual File</value>
       <comment>Main.cs</comment>
   </data>
   <data name="MN_FL4">
       <value>&amp;Open File</value>
       <comment>Main.cs</comment>
   </data>
   <data name="MN_FL5">
       <value>&amp;Close</value>
       <comment>Text.cs</comment>
   </data>
</root>

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.