The overall goal is to remove all empty nodes--including nodes which would be made empty if the child empty nodes were removed. The following:
<xsl:template match="*[not(node())]"/>
will remove empty nodes, but will leave empty nodes that had only empty nodes in them previously. I think I need an xpath that will match all nodes that all descendants of which have no attributes and no text nodes (ignoring whitespace).