oldChild.coreDetach(coreGetOwnerDocument(true));
if (newChild instanceof CoreChildNode) {
if (nextSibling == null) {
coreAppendChild((CoreChildNode)newChild, false);
} else {
nextSibling.coreInsertSiblingBefore((CoreChildNode)newChild);
}
} else if (newChild instanceof CoreDocumentFragment) {
if (nextSibling == null) {
coreAppendChildren((CoreDocumentFragment)newChild);
} else {