private void LoadSchema(string uri, string url) { if (this.XmlResolver == null) { return; } if (SchemaInfo.TargetNamespaces.ContainsKey(uri) && nsManager.LookupPrefix(uri) != null) { return; } SchemaInfo schemaInfo = null; if (SchemaCollection != null) { schemaInfo = SchemaCollection.GetSchemaInfo(uri); } if (schemaInfo != null) { if (schemaInfo.SchemaType != SchemaType.XSD) { throw new XmlException(Res.Xml_MultipleValidaitonTypes, string.Empty, this.PositionInfo.LineNumber, this.PositionInfo.LinePosition); } SchemaInfo.Add(schemaInfo, EventHandler); return; } if (url != null) { LoadSchemaFromLocation(uri, url); } }
private void LoadSchema(string uri) { if (this.schemaInfo !.TargetNamespaces.ContainsKey(uri)) { return; } if (this.XmlResolver == null) { return; } SchemaInfo?schemaInfo = null; if (SchemaCollection != null) { schemaInfo = SchemaCollection.GetSchemaInfo(uri); } if (schemaInfo != null) { if (schemaInfo.SchemaType != SchemaType.XDR) { throw new XmlException(SR.Xml_MultipleValidationTypes, string.Empty, this.PositionInfo.LineNumber, this.PositionInfo.LinePosition); } this.schemaInfo.Add(schemaInfo, EventHandler); return; } LoadSchemaFromLocation(uri); }