/* Returns -1 if the lookup failed and 0 otherwise  */
int xmlRemoveRef(xmlDocPtr doc, xmlAttrPtr attr)
/* Returns -1 if the lookup failed and 0 otherwise  */
int xmlRemoveRef(xmlDocPtr doc, xmlAttrPtr attr)
{
        xmlFree(ID);
        return (-1);
    }
    target.l = ref_list;
    target.ap = attr;
    xmlListWalk(ref_list, xmlWalkRemoveRef, &target);
    if (xmlListEmpty(ref_list))
        xmlHashUpdateEntry(table, ID, NULL, (xmlHashDeallocator)
        xmlFreeRefList);
    xmlFree(ID);
    return(0);
}