private void CopyPosition(XmlSchemaAnnotated to, XmlSchemaAnnotated from, bool copyParent) {
to.SourceUri = from.SourceUri;
to.LinePosition = from.LinePosition;
to.LineNumber = from.LineNumber;
to.SetUnhandledAttributes(from.UnhandledAttributes);
if (copyParent) {
to.Parent = from.Parent;
}
}