internal XmlSchemaAttribute FindAttributeRef(ICollection attributes, string attributeName, string nsURI)
{
foreach(XmlSchemaObject xsa in attributes)
{
XmlSchemaAttribute schemaAttribute = xsa as XmlSchemaAttribute;
if (schemaAttribute != null)
{
if (schemaAttribute.RefName.Name == attributeName && schemaAttribute.RefName.Namespace == nsURI) {
return schemaAttribute;
}
}
}
return null;
}