private void SetupValidation(ValidationType valType) { validator = BaseValidator.CreateInstance(valType, this, schemaCollection, eventHandling, processIdentityConstraints); XmlResolver resolver = GetResolver(); validator.XmlResolver = resolver; if (outerReader.BaseURI.Length > 0) { validator.BaseUri = (resolver == null) ? new Uri(outerReader.BaseURI, UriKind.RelativeOrAbsolute) : resolver.ResolveUri(null, outerReader.BaseURI); } coreReaderImpl.ValidationEventHandling = (validationType == ValidationType.None) ? null : eventHandling; }