Here is a scenario where an alphabetical index is created into 3 columns. But, the approach for dividing them into columns has some scope of improvement.
Creating alphabetical index with fixed number of columns in XSLT 2.0
In the above scenario, is there a way if the 3 columns can be made as much equal as possible without breaking a letter group.
I would suggest the following approach:
XSLT 2.0
Given your input example, the result will be:
Of course, in the real implementation, you will want use
xsl-apply-templates
instead ofxsl:copy-of
here:to remove the "scaffolding" and format the output to your liking.