System.Xml.Schema.SchemaInfo.GetAttributeXdr C# (CSharp) Méthode

GetAttributeXdr() public méthode

public GetAttributeXdr ( SchemaElementDecl ed, XmlQualifiedName qname ) : SchemaAttDef
ed SchemaElementDecl
qname System.Xml.XmlQualifiedName
Résultat SchemaAttDef
        public SchemaAttDef GetAttributeXdr(SchemaElementDecl ed, XmlQualifiedName qname) {
            SchemaAttDef attdef = null;
            if (ed != null) {
                attdef = ed.GetAttDef(qname);;
                if (attdef == null) {
                    if (!ed.ContentValidator.IsOpen || qname.Namespace.Length == 0) {
                        throw new XmlSchemaException(Res.Sch_UndeclaredAttribute, qname.ToString());
                    }
                    attdef = (SchemaAttDef)attributeDecls[qname];
                    if (attdef == null && targetNamespaces.Contains(qname.Namespace)) {
                        throw new XmlSchemaException(Res.Sch_UndeclaredAttribute, qname.ToString());
                    }
                }
            }
            return attdef;
        }