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

Sort & Max simultaneous operations

Subject: Sort & Max simultaneous operations
From: aruniima.chakrabarti@xxxxxxxxxxxxxxxxxx
Date: Sat, 30 Aug 2003 13:06:47 +0530
max sort
Hi All, 
	I have a xml  which has the structure below. I need to pick the rows with attribute distinct C1 & the corresponding max attribute of C2 ...  What is the best way to the same ? 

Input xml :

<PickList>
    <TotalRows>33</TotalRows>
    <Columns C1="Deposit" C2="Period" C3="Status" C4="Value Date" C5="Maturity Date" C6="Deposit No"/>
    <Tags>ctlMskDepositNo *</Tags>
    <Rows>
        <Row C1="1" C2="1" C3="Closed " C4="23/10/2003" C5="23/04/2004" C6="1"/>
        <Row C1="1" C2="2" C3="Closed " C4="23/10/2003" C5="23/04/2004" C6="2"/>
        <Row C1="1" C2="3" C3="Closed " C4="23/10/2003" C5="23/04/2004" C6="3"/>
        <Row C1="1" C2="4" C3="Closed " C4="23/10/2003" C5="23/04/2004" C6="4"/>
        <Row C1="1" C2="5" C3="Matured " C4="23/10/2003" C5="23/04/2004" C6="5"/>
        <Row C1="1" C2="6" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="6"/>

        <Row C1="2" C2="1" C3="Closed" C4="23/10/2003" C5="23/04/2004" C6="7"/>
        <Row C1="2" C2="2" C3="Closed" C4="23/10/2003" C5="23/04/2004" C6="8"/>
        <Row C1="2" C2="3" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="9"/>
        <Row C1="2" C2="3" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="10"/>
        <Row C1="3" C2="1" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="11"/>
        <Row C1="4" C2="1" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="12"/>
        <Row C1="5" C2="1" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="13"/>

        <Row C1="5" C2="8" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="13"/>
        <Row C1="5" C2="6" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="11"/>
        <Row C1="5" C2="7" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="12"/>
    </Rows>
</PickList>


the reqd output:

<Rows>
<Row C1="1" C2="6" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="6"/>
<Row C1="2" C2="3" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="9"/>
<Row C1="2" C2="3" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="10"/>
<Row C1="3" C2="1" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="11"/>
<Row C1="4" C2="1" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="12"/>
<Row C1="5" C2="8" C3="Open" C4="23/10/2003" C5="23/04/2004" C6="12"/>
</Rows>

Thank you,

Regards,
aruniima





DISCLAIMER:
This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

 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.