internal NavigatorInput ResolveDocument(Uri absoluteUri)
{
Debug.Assert(_xmlResolver != null);
object input = _xmlResolver.GetEntity(absoluteUri, null, null);
string resolved = absoluteUri.ToString();
if (input is Stream)
{
XmlTextReaderImpl tr = new XmlTextReaderImpl(resolved, (Stream)input);
{
tr.XmlResolver = _xmlResolver;
}
// reader is closed by Compiler.LoadDocument()
return new NavigatorInput(Compiler.LoadDocument(tr).CreateNavigator(), resolved, _rootScope);
}
else if (input is XPathNavigator)
{
return new NavigatorInput((XPathNavigator)input, resolved, _rootScope);
}
else
{
throw XsltException.Create(SR.Xslt_CantResolve, resolved);
}
}