bool AddAttributesForSpan (HtmlTextWriter writer)
{
if (HasAttributes) {
AttributeCollection attributes = Attributes;
ICollection k = attributes.Keys;
string [] keys = new string [k.Count];
k.CopyTo (keys, 0);
foreach (string key in keys) {
if (!IsInputOrCommonAttr (key))
continue;
if (common_attrs == null)
common_attrs = new AttributeCollection (new StateBag ());
common_attrs [key] = Attributes [key];
attributes.Remove (key);
}
if (attributes.Count > 0) {
attributes.AddAttributes (writer);
return true;
}
}
return false;
}
#if NET_2_0