throws SiteTreeException, DocumentException {
SiteTree tree = getPublication().getTree(area);
SiteTreeNode node = tree.getNode(documentid);
if (node == null) {
throw new DocumentException(
"Document-id " + documentid + " not found.");
}
Label label = node.getLabel(language);
if (label == null) {
throw new DocumentException(
"Label for language " + language + " not found.");
}
if (href.equals("")) href = null;
// FIXME: This is somewhat of a hack. See also RenameLabelTask.java
tree.removeLabel(documentid, label);