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

sort/group/count problem

Subject: sort/group/count problem
From: "Xu, Xiaocun" <XXu@xxxxxxxxxxxxxxxxxx>
Date: Sat, 4 Nov 2000 22:45:24 -0500
group count
Hi,

  I currently have a XML document with the attached structure, my goal is to
sort/group/count based on the information in the elements.  My questions
are:
1. Is the XML structure attached efficient?  Should I put most of the
elements, such as all children of <item>, to be attributes instead?
2. How should I sort all items within each batch based on itemid, and
display each of the group separately?
3. How should I count all distinctive itemid within each batch?
I was able to figure out "count(//itemid[not(.=preceding::itemid)])" count
all disctinctive itemid, but it was for all items in the XML document, not
within the scope of each batch.

Any suggestions much appreciated,

Xiaocun Xu
xxu@xxxxxxxxxxxxxxxxxx


original XML document:
	<batchlist>
             <batch>
		<batchid>102</batchid>
		<date>09/29/2000</date>
		<itemlist>
		    <item>
			<itemid>Z1000</itemid>
			<description>PILLOW</description>
			<duedate>09/29/2000</duedate>
			<division>RETAIL BRAND 001</division>
			<orderid>00001113-001</orderid>
			<poid>0000881</poid>
			<units>1</units>
			<cmz>N</cmz>
		    </item>
                    <item>...</item>
		</itemlist>
              </batch>
              <batch>...</batch>
	</batchlist>


 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.