[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Unusual Sort
David, *I* didn't ask the question, but nice, especially because the XSL is
simply a concretization of a way of approaching a problem.
I'm reminded of a problem presented to Ken Thompson (the UNIX guy): find which words in a list are anagrams of one another. His solution was beautifully elegant, especially for its simplicity. It consisted of the following: --for each word, generate a "key"--which is simply a word consisting of the original word's characters sorted. Eg. for word "apple", the key is "aelpp" --sort list based on key --extract groups of keys; their corresponding words are anagrams of one another And this is succintly expressed as an UNIX pipeline. Anyway, your <xsl:sort select="translate('FSJ','ABC',grade)"/> gives me a similar feeling! :-) --A From: "Williamson, Chris" <cwilliamson@xxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: "'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'" <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: Unusual Sort Date: Wed, 13 Apr 2005 10:33:42 -0400 _________________________________________________________________ On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
|
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
|