@Override
  public Void onElement(DElementPattern p) {
    myDepth++;
    try {
      if (myDepth == myTargetDepth || myTargetDepth == -1) {
        myRoots.add(p);
        return myTargetDepth != -1 ? null : super.onElement(p);
      } else {
        return super.onElement(p);
      }
    } finally {
      myDepth--;
    }
  }
@Override
  public Void onElement(DElementPattern p)