doc.building = building;
  public Node cloneNode(boolean deep)  {    DomNode node = (DomNode) clone();        if (deep)      {        DomDocument doc = (nodeType == DOCUMENT_NODE) ?          (DomDocument) node : node.owner;        for (DomNode ctx = first; ctx != null; ctx = ctx.next)          {            DomNode newChild = (DomNode) ctx.cloneNode(deep);            newChild.setOwner(doc);            node.appendChild(newChild);          }      }    if (nodeType == ENTITY_REFERENCE_NODE)      {        node.makeReadonly();      }    notifyUserDataHandlers(UserDataHandler.NODE_CLONED, this, node);    return node;  }