contacts.xml will be the starting point for this exercise.

In a first step we do a little xml to xhtml conversion in order to view our data in a table.
contacts2html.xslt:

The result is the following:

Now suppose we want to merge cell's in the city column.
mergecells.xslt snippet:

The final output looks like this:

This demo shows you it's quite easy to calculate the rowspan using the 'deep-equal' function recursively.
Cheers,
Robby
Nice Robby, which tool do you use for XML files and making these nice snapshots?
ReplyDelete--
Danny
I use Altova XML spy (and it's eclipse plugin) for working with everything XML related. For screenshots I always use screenhunter 5.0 which is free and easy to use.
ReplyDelete--
Robby