[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Sort doesn't seem to sort
Lainaus Steve Dondley <stevedondley@xxxxxxxxx>: | I'm learning XML and running trivial examples from a book. However, I | stumbled on a problem with this XSL code snippet: | | <xsl:for-each select="//vendor" > | <xsl:sort select="vendor_name"/> | <h2><xsl:value-of select="vendor_name"/></h2> | </xsl:for-each> | | Within the XML doc, there are vendor names that appear in the following | order in the XML doc: | | Conners Chair Company | Just a Vendor | Wally's Wonderful World of Furniture | Crazy Marge's Bed Emporium | Zu Zu's Pedals | | When I process the doc with IE 6.0, the vendor names are output in this | order: | | Wally's Wonderful World of Furniture | Just a Vendor | Zu Zu's Pedals | Conners Chair Company | Crazy Marge's Bed Emporium | | This isn't the expected alphabetical order output. What gives? | | | XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list | | Dont know about IE transformations, but with XalanC++ I get the right answer: RESULT: <h2>Conners Chair Company</h2> <h2>Crazy Marge's Bed Emporium</h2> <h2>Just a Vendor</h2> <h2>Wally's Wonderful World of Furniture</h2> <h2>Zu Zu's Pedals</h2> XML what I used: <?xml version='1.0'?> <vendors> <vendor> <vendor_name>Conners Chair Company</vendor_name> </vendor> <vendor> <vendor_name>Just a Vendor</vendor_name> </vendor> <vendor> <vendor_name>Wally's Wonderful World of Furniture</vendor_name> </vendor> <vendor> <vendor_name>Crazy Marge's Bed Emporium</vendor_name> </vendor> <vendor> <vendor_name>Zu Zu's Pedals</vendor_name> </vendor> </vendors> Transformation file (xslt) is the same as yours. Cheers, Jarkko *************************************************** * Jarkko Moilanen * * Project Researcher, ITCM (www.itcm.org) * * Profound XML technology Expert * * University of Tampere * * Hypermedia Laboratory * *************************************************** 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
|