Subject: Re: [xsl] Group elements based on summing values (XSL 1.0) From: "Ihe Onwuka ihe.onwuka@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 6 Feb 2015 10:54:34 -0000 |
Is this homework? On Fri, Feb 6, 2015 at 10:44 AM, Kevin Bird kevinbrianbird@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hello, > > My XSL skills are a bit rusty. > > Starting from the first <num> element, I need to create the smallest group > possible where the sum of the <num> elements totals 10 or more. I am only > able to use XSL 1.0. > > INPUT: > <row> > <num>3</num> > <num>4</num> > <num>4</num> > <num>7</num> > <num>12</num> > <num>15</num> > <num>1</num> > </row> > > OUTPUT: > <row> > <group1> > <num>3</num> > <num>4</num> > <num>4</num> > </group1> > <group2> > <num>7</num> > <num>12</num> > <num>15</num> > <num>1</num> > </group2> > </row> > > Any help/pointers appreciated. > > -- > Kevin
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Group elements based on summi, Kevin Bird kevinbria | Thread | Re: [xsl] Group elements based on s, Kevin Bird kevinbria |
[xsl] Group elements based on summi, Kevin Bird kevinbria | Date | Re: [xsl] Group elements based on s, Kevin Bird kevinbria |
Month |