3 Tables

Remove Empty Trailling Row

<..table script..>
 <script element="table" >
    <dom name="." xml="." method="table" class="tex4ht.XhtmmlUtilities" />
 </script>
-_-_-

<..static void table(dom)..>
 public static void table(Node dom) {
    Node tableNode = dom.getFirstChild();
    if( tableNode.hasChildNodes() ){
       Node trChild = tableNode.getLastChild();
       while( (trChild != null)
              &&
              !trChild.getNodeName().equals("tr") ){
          trChild = trChild.getPreviousSibling();
       }
       if( (trChild != null) && trChild.hasChildNodes() ){
          Node tdChild = trChild.getLastChild();
          while( (tdChild != null)
                 &&
                 !tdChild.getNodeName().equals("td") ){
             tdChild = tdChild.getPreviousSibling();
          }
          if( !tdChild.hasChildNodes() ){
             tableNode.removeChild( trChild );
          } else {
             Node child = tdChild.getFirstChild();
             if(
                (child.getNodeType() == Node.TEXT_NODE)
                &&
                ((Text) child).getWholeText().trim().equals("")
                &&
                (child.getNextSibling() == null)
             ){
                tableNode.removeChild( trChild );
 }  }  }  } }
-_-_-