XSL: List divided into columns.

Posted by kalininew on Stack Overflow See other posts from Stack Overflow or by kalininew
Published on 2010-03-17T11:42:33Z Indexed on 2010/03/17 12:01 UTC
Read the original article Hit count: 348

Filed under:
|
|
|

Hello, help me please. There is a list of nodes.

<list>
  <item>1</item>
  <item>2</item>
  <item>3</item>
  <item>4</item>
  <item>5</item>
  <item>6</item>
  <item>7</item>
  and so on...
</list>

Need to divide the list of "n" (arbitrary number) equal parts.

If the number of nodes is not divided equally, then let the last set of nodes will contain the remainder of the division.

For example, if the input list contains 33 elements and the output should have 4 parts with uniformly distributed elements. At the exit to get 3 parts to 9 of elements and one part with 6 elements in the sum of 33.

© Stack Overflow or respective owner

Related posts about xsl

Related posts about xslt