internal void Add(SchemaInfo sinfo, ValidationEventHandler eventhandler)
        {
            if (schemaType == SchemaType.None)
            {
                schemaType = sinfo.SchemaType;
            }
            else if (schemaType != sinfo.SchemaType)
            {
                if (eventhandler != null)
                {
                    eventhandler(this, new ValidationEventArgs(new XmlSchemaException(Res.Sch_MixSchemaTypes, string.Empty)));
                }
                return;
            }

            foreach (string tns in sinfo.TargetNamespaces.Keys)
            {
                if (!targetNamespaces.ContainsKey(tns))
                {
                    targetNamespaces.Add(tns, true);
                }
            }

            foreach (KeyValuePair <XmlQualifiedName, SchemaElementDecl> entry in sinfo.elementDecls)
            {
                if (!elementDecls.ContainsKey(entry.Key))
                {
                    elementDecls.Add(entry.Key, entry.Value);
                }
            }
            foreach (KeyValuePair <XmlQualifiedName, SchemaElementDecl> entry in sinfo.elementDeclsByType)
            {
                if (!elementDeclsByType.ContainsKey(entry.Key))
                {
                    elementDeclsByType.Add(entry.Key, entry.Value);
                }
            }
            foreach (SchemaAttDef attdef in sinfo.AttributeDecls.Values)
            {
                if (!attributeDecls.ContainsKey(attdef.Name))
                {
                    attributeDecls.Add(attdef.Name, attdef);
                }
            }
            foreach (SchemaNotation notation in sinfo.Notations.Values)
            {
                if (!Notations.ContainsKey(notation.Name.Name))
                {
                    Notations.Add(notation.Name.Name, notation);
                }
            }
        }