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

Re: Confused using a loop...

Subject: Re: Confused using a loop...
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Wed, 28 Mar 2007 17:25:26 +0200
Re:  Confused using a loop...
Austin, Darrel wrote:
The problem is that my result isn't sorted.

I'm a bit confused as to how SORT works. My first select should be
selecting all menuItems that are or ar a child of one with a specific
pageID.

Then, I assume the sort commands sorts that group of selected menuItems

To learn how xsl:sort works, I suggest you use xsl:value-of right after the statement that should be doing the sorting:


<xsl:sort select="some/Xpath">
<sort-by>
   <xsl:value-of select="some/Xpath">
</sort-by>

The select of xsl:sort is relative to the context item. If <sort-by> in the output does not contain anything, your xpath is wrong and that is why sort 'does not work'.

On 'how sort works': it takes the string-normalized value of the nodes you select in xsl:sort and uses that to sort by.

Cheers,
-- Abel

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.