|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] sort/group/count problem
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
|
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
|

Cart








