[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Sorting an xml
---------------------------------------------------------- It would be easier to understand if you give what output xml you are looking for. you can try: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- default identity translation --> <xsl:template match="*|@*|comment()|processing-instruction()|text()"> <xsl:copy> <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/> </xsl:copy> </xsl:template> <!-- start processing with the root element --> <xsl:template match="shopinglist"> <xsl:copy> <xsl:apply-templates select="item"> <xsl:sort select="place"/> </xsl:apply-templates> </xsl:copy> </xsl:template> </xsl:stylesheet> It will reorder the source xml item elements according to the "place" -- Jagdishwar B.
|
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
|