private int FindAttribute(string name, string nspace, ref string prefix) {
Debug.Assert(this.attributeCount <= this.attributeList.Count);
for (int attrib = 0; attrib < this.attributeCount; attrib ++) {
Debug.Assert(this.attributeList[attrib] != null && this.attributeList[attrib] is BuilderInfo);
BuilderInfo attribute = (BuilderInfo) this.attributeList[attrib];
if (Keywords.Equals(attribute.LocalName, name)) {
if (Keywords.Equals(attribute.NamespaceURI, nspace)) {
return attrib;
}
if (Keywords.Equals(attribute.Prefix, prefix)) {
// prefix conflict. Should be renamed.
prefix = string.Empty;
}
}
}
return -1;
}