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

Multiple Sorts problem

Subject: Multiple Sorts problem
From: Jitu <jibhatia@xxxxxxxxxxx>
Date: Sat, 24 Aug 2002 22:09:44 +0530
multiple sorts
I have following sort conditions :

<xsl:sort select="child::node()[position() = $sortColPos]" order="{$sOrder}"/> <xsl:sort select="child::node()[local-name() = $sortColName1]" order="{$sOrder}"/>
<xsl:sort select="child::node()[local-name() = $sortColName2]" />


If $sortColPos has a valid value like 1, 2 etc.. it works.
But if does not have a valid value..for example it has a "" or '1000000' (not valid for my case), then the sort conditions following it simply fail. They do not work.


What i want is that, if the $sortColPos has invalid value, the first sort should obviously not happen, but the two sorts statements following it should succeed.

The idea is i may either have the first SORT condition valid, OR the Two sort conditions following it valid. All three will never be valid. Since i cannot use sort statements within IF conditions...i put all of them one after another, assuming whichever conditio does not satisfy, that sort statement will simply be ignored.

Pls let me know your valuable inputs.

Thanks.



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.