Something like this:
<xsl:template match="table">
<table>
<xsl:copy-of select="child::node()"/>
<xsl:if test="following-sibling::*[1][self::address]">
<tr><xsl:copy-of select="following-sibling::*[1]"/></tr>
</xsl:if>
</table>
</xsl:template>
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference