Subject: Re: [xsl] Distinct Grouping and filtering From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Tue, 28 May 2002 23:01:25 +0200 |
Hi,
In the following xml i need to group by "reg_name" as the outer group and then groupby "stateid" at the next level
Basically need to group applicants whose stateid belonging to same region .Within which only distinct stateid should be picked .Duplicate stateid belonging to same region need to be filtered.
I did try using Keys and preceeding sibling comparision approach .But i guess i didnt do it right ...ANy pointers .
Result looks like : ―---------------------- Reg1 GA <some row of data> PA <some row of data> Reg2 NY <some row of data> VA <some row of data> Reg3 NY <some row of data> GA <some row of data>
Source XML is : ―--------------------
<stream>
<rep>
<states>
<region id="111">
<reg_name>Reg1</reg_name>
<region>
<region id="333">
<reg_name>Reg3</reg_name>
<region> <region id="222">
<reg_name>Reg2</reg_name>
<region> </states>
<apps> <applicant idref="111" statid="GA">
<company>xxx</company>
<amount>2200</amount>
</applicant>
<applicant idref="333" statid="NY">
<company>yyyy</company>
<amount>3200</amount> </applicant>
<applicant idref="333" statid="GA">
<company>zz</company>
<amount>4200</amount> </applicant>
<applicant idref="222" statid="NY">
<company>pp</company>
<amount>5200</amount> </applicant> <applicant idref="222" statid="VA">
<company>qq</company>
<amount>6200</amount> </applicant> <applicant idref="111" statid="GA">
<company>rr</company>
<amount>7200</amount>
</applicant>
<applicant idref="111" statid="PA">
<company>ss</company>
<amount>8200</amount>
</applicant> </apps>
</rep>
</stream>
THanks for your time -Kum
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Distinct Grouping and filteri, KUMAR NINGASHETTY | Thread | Re: [xsl] Distinct Grouping and fil, KUMAR NINGASHETTY |
Re: [xsl] Conditional document merg, David Carlisle | Date | RE: [xsl] XSL-FO Java API, Tim Meals |
Month |