if (newNode.getQName().compareTo(AttrImpl.XML_ID_QNAME) == 0) {
if (newNode.getQName().equalsSimple(AttrImpl.XML_ID_QNAME)) {
    public void updateChild(Node oldChild, Node newChild)            throws DOMException {        if (!(oldChild instanceof NodeImpl))            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, "wrong node type");        NodeImpl old = (NodeImpl) oldChild;        NodeImpl newNode = (NodeImpl) newChild;        if (old.getParentGID() != gid)            throw new DOMException(DOMException.NOT_FOUND_ERR,                    "node is not a child of this element");        if (newNode.getNodeType() == Node.ATTRIBUTE_NODE) {        	if (newNode.getQName().compareTo(AttrImpl.XML_ID_QNAME) == 0) {					// an xml:id attribute. Normalize the attribute and set its type to ID        		AttrImpl attr = (AttrImpl) newNode;        		attr.setValue(StringValue.trimWhitespace(StringValue.collapseWhitespace(attr.getValue())));        		attr.setType(AttrImpl.ID);        	}        }                NodeImpl previous = (NodeImpl) old.getPreviousSibling();        if (previous == null)            previous = this;        else            previous = getLastNode(previous);        ownerDocument.broker.removeNode(old, old.getPath(), null);        ownerDocument.broker.endRemove();        newNode.gid = old.gid;        ownerDocument.broker.insertAfter(previous, newNode);        NodePath path = newNode.getPath();        ownerDocument.broker.index(newNode, path);		if (newNode.getNodeType() == Node.ELEMENT_NODE)			ownerDocument.broker.endElement(newNode, path, null);        ownerDocument.broker.flush();    }