|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Sorting and replacing content
Hi,
You can iterate the elements with lower case names and sort selecting the corresponding upper case element: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <result> <xsl:for-each select="*/*[translate(name(), 'ABCDE', 'abcde') = name()]"> <xsl:sort select="../*[name() = translate(name(current()), 'abcde', 'ABCDE')]"/> <no><xsl:value-of select="."/></no> </xsl:for-each> </result> </xsl:template> </xsl:stylesheet> <?xml version="1.0" encoding="UTF-8"?> <result><no>30</no><no>40</no><no>10</no><no>50</no><no>20</no></result> Best Regards, George ----------------------------------------------- George Cristian Bina <oXygen/> XML Editor & XSLT Editor/Debugger http://www.oxygenxml.com Kenny Bogoe (BogoeMD) wrote: Hi,
|
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
|

Cart








