[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Distinct Grouping and filtering
Subject: Re: [xsl] Distinct Grouping and filtering From: "KUMAR NINGASHETTY" <kningashetty@xxxxxxxxxxxxxxxx> Date: Tue, 28 May 2002 17:32:03 -0400 |
Thanks though... It helps partially ,,,i will work on it further to see if i can make it work -K >>> joerg.heinicke@xxxxxx 05/28/02 05:01PM >>> Does this help?? http://sources.redhat.com/ml/xsl-list/2002-05/msg01261.html Joerg KUMAR NINGASHETTY wrote: > 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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Distinct Grouping and fil, Joerg Heinicke | Thread | [xsl] whitespace, normbishop1 |
Re: [xsl] <xsl:key> and use attribu, J.Pietschmann | Date | [xsl] whitespace, normbishop1 |
Month |
Keywords