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

Sorting using an element in a comma delimited string v

Subject: Sorting using an element in a comma delimited string value
From: amarjit.s.bhullar@xxxxxxxxxxxxx
Date: Wed, 14 Mar 2001 14:50:54 -0500
sort delimited string
Hi:
I am trying to sort and group the following xml document. The output result
should be first sorted and grouped using the first element(eg 299) in the
<SupplierPartAuxiliaryID> tag  value 299,472967,3,,,,,. (comma delimited
string) and then sorted by the value from the <SupplierPartID> tag.

I am having problem extracting the first element from the comma delimited
string.

Could someone help me out ?

Thanks
Amarjit

Here is the XML document:
<?xml version="1.0" encoding="UTF-8"?>
<Cart>
    <ItemOut quantity="1"  lineNumber="1">
        <ItemID>
            <SupplierPartID>102200</SupplierPartID>
     <SupplierPartAuxiliaryID>299,472967,3,,,,,</SupplierPartAuxiliaryID>
        </ItemID>
        <ItemDetail>
               <UnitPrice>
                    <Money currency="CAD">24.9</Money>
               </UnitPrice>
          </ItemDetail>
    </ItemOut>
    <ItemOut quantity="2"  lineNumber="2">
        <ItemID>
            <SupplierPartID>102208</SupplierPartID>
     <SupplierPartAuxiliaryID>299,472967,4,,,,,</SupplierPartAuxiliaryID>
        </ItemID>
        <ItemDetail>
               <UnitPrice>
                    <Money currency="CAD">59.9</Money>
               </UnitPrice>
          </ItemDetail>
    </ItemOut>
    <ItemOut quantity="3"  lineNumber="3">
        <ItemID>
            <SupplierPartID>1030</SupplierPartID>

<SupplierPartAuxiliaryID>299,472967,5,N,N,N,,N</SupplierPartAuxiliaryID>
        </ItemID>
         <ItemDetail>
               <UnitPrice>
                   <Money currency="CAD">2.46</Money>
               </UnitPrice>
          </ItemDetail>
    </ItemOut>
    <ItemOut quantity="4"  lineNumber="4">
        <ItemID>
            <SupplierPartID>1040</SupplierPartID>

<SupplierPartAuxiliaryID>299,472967,2,Y,Y,Y,100,Y</SupplierPartAuxiliaryID>
        </ItemID>
        <ItemDetail>
               <UnitPrice>
                   <Money currency="CAD">5.84</Money>
               </UnitPrice>
          </ItemDetail>
    </ItemOut>
    <ItemOut quantity="3"  lineNumber="5">
        <ItemID>
            <SupplierPartID>1030</SupplierPartID>

<SupplierPartAuxiliaryID>289,472967,5,N,N,N,,N</SupplierPartAuxiliaryID>
        </ItemID>
         <ItemDetail>
               <UnitPrice>
                   <Money currency="CAD">2.46</Money>
               </UnitPrice>
          </ItemDetail>
    </ItemOut>
    <ItemOut quantity="4"  lineNumber="6">
        <ItemID>
            <SupplierPartID>1040</SupplierPartID>

<SupplierPartAuxiliaryID>289,472967,2,Y,Y,Y,100,Y</SupplierPartAuxiliaryID>
        </ItemID>
        <ItemDetail>
               <UnitPrice>
                   <Money currency="CAD">5.84</Money>
               </UnitPrice>
          </ItemDetail>
    </ItemOut>
    <ItemOut quantity="3"  lineNumber="7">
        <ItemID>
            <SupplierPartID>1030</SupplierPartID>

<SupplierPartAuxiliaryID>292,472967,5,N,N,N,,N</SupplierPartAuxiliaryID>
        </ItemID>
         <ItemDetail>
               <UnitPrice>
                   <Money currency="CAD">2.46</Money>
               </UnitPrice>
          </ItemDetail>
    </ItemOut>
    <ItemOut quantity="4"  lineNumber="8">
        <ItemID>
            <SupplierPartID>1040</SupplierPartID>

<SupplierPartAuxiliaryID>292,472967,2,Y,Y,Y,100,Y</SupplierPartAuxiliaryID>
        </ItemID>
        <ItemDetail>
               <UnitPrice>
                   <Money currency="CAD">5.84</Money>
               </UnitPrice>
          </ItemDetail>
    </ItemOut>
</Cart>

This message is for the designated recipient only and may contain
privileged or confidential information.  If you have received it in error,
please notify the sender immediately and delete the original.  Any other
use of the email by you is prohibited.



 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.