internal void ResetParentInElementIdAttrMap(string attrLocalName, string attrNS, string oldVal, string newVal)
{
XmlElement parentElem = parent as XmlElement;
Debug.Assert(parentElem != null);
XmlDocument doc = parent.OwnerDocument;
Debug.Assert(doc != null);
XmlName attrname = doc.GetIDInfoByElement(parentElem.XmlName);
if (attrname != null && attrname.LocalName == attrLocalName && attrname.NamespaceURI == attrNS)
{
doc.RemoveElementWithId(oldVal, parentElem); //add the element into the hashtable
doc.AddElementWithId(newVal, parentElem);
}
}