public void v13()
{
string xsdPath = Path.Combine(TestData._Root, @"bug435368.xsd");
string xmlPath = Path.Combine(TestData._Root, @"bug435368.xml");
XmlSchemaSet xs = new XmlSchemaSet();
xs.Add(null, xsdPath);
XmlDocument xd = new XmlDocument();
xd.Load(xmlPath);
xd.Schemas = xs;
// Modify a, partially validate
XPathNavigator xpn = xd.CreateNavigator().SelectSingleNode("/root/a");
xpn.SetValue("b");
xd.Validate(null, ((IHasXmlNode)xpn).GetNode());
// Modify sg1, partially validate- validate will throw exception
xpn = xd.CreateNavigator().SelectSingleNode("/root/sg1");
xpn.SetValue("a");
xd.Validate(null, ((IHasXmlNode)xpn).GetNode());
return;
}