System.Xml.DocumentSchemaValidator.FindSchemaInfo C# (CSharp) Méthode

FindSchemaInfo() private méthode

private FindSchemaInfo ( XmlAttribute attributeToValidate ) : XmlSchemaAttribute
attributeToValidate XmlAttribute
Résultat System.Xml.Schema.XmlSchemaAttribute
        private XmlSchemaAttribute FindSchemaInfo(XmlAttribute attributeToValidate)
        {
            XmlElement parentElement = attributeToValidate.OwnerElement;
            XmlSchemaObject schemaObject = FindSchemaInfo(parentElement);
            XmlSchemaComplexType elementSchemaType = GetComplexType(schemaObject);
            if (elementSchemaType == null)
            {
                return null;
            }
            XmlQualifiedName attName = new XmlQualifiedName(attributeToValidate.LocalName, attributeToValidate.NamespaceURI);
            XmlSchemaAttribute schemaAttribute = elementSchemaType.AttributeUses[attName] as XmlSchemaAttribute;
            if (schemaAttribute == null)
            {
                XmlSchemaAnyAttribute anyAttribute = elementSchemaType.AttributeWildcard;
                if (anyAttribute != null)
                {
                    if (anyAttribute.NamespaceList.Allows(attName))
                    { //Match wildcard against global attribute
                        schemaAttribute = _schemas.GlobalAttributes[attName] as XmlSchemaAttribute;
                    }
                }
            }
            return schemaAttribute;
        }

Same methods

DocumentSchemaValidator::FindSchemaInfo ( XmlElement elementToValidate ) : XmlSchemaObject