((TdmTreeAbstraction) ta).ch = ch; boolean rootHasMatch = ta.lookupBase( branchRoot ) != null; if( rootHasMatch ) { List stopNodes = ta.getStopNodes(branchRoot); DiffOperation op = new DiffOperation(DiffOperation.ROOT_COPY,null,null,-1); ta.content(op,true); copy(stopNodes); ta.content(op,false); } else { DiffOperation op = new DiffOperation(DiffOperation.ROOT_INSERT,null,null,-1); ta.content(op,true); insert(branchRoot); ta.content(op,false);
this.ch = ch; try { diff(branchRoot); } catch (IOException x) { throw new SAXException(x);
  public void diff(ContentHandler ch) throws SAXException {    ((TdmTreeAbstraction) ta).ch = ch;    boolean rootHasMatch = ta.lookupBase( branchRoot ) != null; //Q  m.getBranchRoot().hasBaseMatch();    if( rootHasMatch ) {      List stopNodes = ta.getStopNodes(branchRoot);      DiffOperation op = new DiffOperation(DiffOperation.ROOT_COPY,null,null,-1);      ta.content(op,true);      copy(stopNodes);      ta.content(op,false);    } else {      DiffOperation op = new DiffOperation(DiffOperation.ROOT_INSERT,null,null,-1);      ta.content(op,true);      insert(branchRoot);      ta.content(op,false);    }  }