public XmlSchemaAttribute[] GetExpectedAttributes()
{
if (_currentState == ValidatorState.Element || _currentState == ValidatorState.Attribute)
{
SchemaElementDecl elementDecl = _context.ElementDecl;
ArrayList attList = new ArrayList();
if (elementDecl != null)
{
foreach (SchemaAttDef attDef in elementDecl.AttDefs.Values)
{
if (_attPresence[attDef.Name] == null)
{
attList.Add(attDef.SchemaAttribute);
}
}
}
if (_nsResolver.LookupPrefix(_nsXsi) != null)
{ //Xsi namespace defined
AddXsiAttributes(attList);
}
return attList.ToArray(typeof(XmlSchemaAttribute)) as XmlSchemaAttribute[];
}
else if (_currentState == ValidatorState.Start)
{
if (_partialValidationType != null)
{
XmlSchemaAttribute attribute = _partialValidationType as XmlSchemaAttribute;
if (attribute != null)
{
return new XmlSchemaAttribute[1] { attribute };
}
}
}
return s_emptyAttributeArray;
}