I have the following xsl that sorts my xml alphabetically:
Here is my solution.
You can decide via parameters "per-row" and "show-empty" if you want empty cells to show up or if you want to hide them. I'm sure a much more elegant version exists, but I could not come up with one. ;-) Comments welcome.
With this input:
This output is produced (the title attributes were just for debugging. I left them in, remove them anytime):
A
Agenda
B
Boo
F
Foo
P
Policy
Policy
R
Report
Report
T
Test1
Test2