|
Subject: sort/group/count problem From: "Xu, Xiaocun" <XXu@xxxxxxxxxxxxxxxxxx> Date: Sat, 4 Nov 2000 22:45:24 -0500 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: different XSL processors {RE: X, Jeni Tennison | Thread | Re: sort/group/count problem, Jeni Tennison |
| Re: apply-templates iside for-each?, Colin Muller | Date | Re: Applying Templates, Jeni Tennison |
| Month |