John,
if I understood you right then you always increment the numbered list even
when the person has a different address right ? I don't have time to test
someting but I am pretty sure you can achieve what you want by recursively
calling a "createTable" template for every person element and pass a
parameter incrementing the number. Or use a for-each and position() to know
in which position you are.
Where are you calling the testSameAddress tempalte from, now ?
Manolis
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list