xsl-list
[Top] [All Lists]

Re: [xsl] [XSLT2] Some common, generic grouping problems

2006-06-30 03:44:55
andrew welch wrote:

<root>
  <arbitrary />
  <elem       color="dark-red" />
  <elem       color="red" />
  <arbitrary  color="none" />
  <elem       color="red" />
  <elem       color="light-red" />
  <arbitrary />
  <elem       color="dark-red" />
  <elem       color="red" />
  <arbitrary  color="none" />
  <elem       color="red" />
  <elem       color="light-red" />
  <arbitrary />
</root>
[...]
That is of course if I've scaled up the input correctly, no comment
from the OP so far.

Yes, this is how the input would scale. I'm sorry for not replying
earlier to the solutions given so far (Andrew, David) - I must admit
that I am still digesting the code given to extract and understand the
underlying idea(s).

For your (Andrew's) solution to example #1, am I right that the
underlying idea could be paraphrased as:

"Group by start, then tail-trim the resulting groups to end (using a
nested grouping from end)"?

I hope I can give a verbal write-up of the ideas behind the solutions
for the other cases as well as soon as I have fully grasped them myself...

-Christian



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--