[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|