public virtual void SetAttribute(DomAttribute attr)
{
if (myAttributes == null)
{
myAttributes = new Dictionary<int, DomAttribute>();
}
//-----------
//some wellknownattr
switch ((WellknownName)attr.LocalNameIndex)
{
case WellknownName.Id:
{
this.attrElemId = attr;
this.OwnerDocument.RegisterElementById(this);
}
break;
case WellknownName.Class:
{
this.attrClass = attr;
}
break;
}
//--------------------
var attrNameIndex = this.OwnerDocument.AddStringIfNotExists(attr.LocalName);
myAttributes[attrNameIndex] = attr;//update or replace
attr.SetParent(this);
NotifyChange(ElementChangeKind.AddAttribute);
//---------------------
}
public void SetAttribute(string attrName, string value)