xsl-list
[Top] [All Lists]

Re: [xsl] Confused using a loop...

2007-03-28 08:27:29
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



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--