|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Group and sort by group element occurrences
Long time reader, first time poster. I have an xml doc that is the result of a keyword search, which list the keyword, and all pages by id that have that instance of the keyword. The output looks like this. <?xml version="1.0" encoding="UTF-8"?> <docroot> <token>apply <pageid>1</pageid> <pageid>3</pageid> <pageid>84</pageid> </token> <token>international <pageid>3</pageid> <pageid>5</pageid> <pageid>84</pageid> </token> <token>financial aid <pageid>5</pageid> <pageid>84</pageid> </token> </docroot> I need to transform this this into a grouped and sorted list of page id's, so that the instances of pageid that occur the most frequently are first, and so that each pageid is listed only once. The above xml would then look like this. <docroot> <pageid>84</pageid> <pageid>3</pageid> <pageid>5</pageid> <pageid>1</pageid> </docroot> It seems like a fairly simple transform, but I just cant get it to sort properly and then have only the unique page ids. I just end up with a flat list of the original document, or nothing at all. Thanks, Josh Simerman Graduate Assistant, Web Developer Systems & Accounting Graduate Programs Indiana University, Kelley School of Business XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








