public void ValidateThenAddAdditionalSchemas()
{
XmlSchemaValidator val;
XmlSchemaInfo info = new XmlSchemaInfo();
val = CreateValidator(new XmlSchemaSet());
val.AddSchema(XmlSchema.Read(XmlReader.Create(new StringReader("<?xml version=\"1.0\" ?>\n" +
"<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\n" +
" targetNamespace=\"uri:tempuri1\">\n" +
" <xs:element name=\"foo\" type=\"xs:string\" />\n" +
"</xs:schema>")), null));
val.Initialize();
val.ValidateElement("foo", "uri:tempuri1", info);
val.SkipToEndElement(info);
val.AddSchema(XmlSchema.Read(XmlReader.Create(new StringReader("<?xml version=\"1.0\" ?>\n" +
"<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\n" +
" targetNamespace=\"uri:tempuri2\">\n" +
" <xs:element name=\"bar\" type=\"xs:string\" />\n" +
"</xs:schema>")), null));
val.ValidateElement("bar", "uri:tempuri2", info);
val.SkipToEndElement(info);
val.EndValidation();
return;
}