[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Sort doesn't seem to sort

Subject: Re: Sort doesn't seem to sort
From: Jarkko.Moilanen@xxxxxx
Date: Wed, 2 Apr 2003 08:57:03 +0300
marge 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.