internal void Compile(NavigatorInput input, XmlResolver xmlResolver)
{
Debug.Assert(input != null);
Debug.Assert(xmlResolver != null);
Debug.Assert(_input == null && _atoms == null);
_xmlResolver = xmlResolver;
PushInputDocument(input);
_rootScope = _scopeManager.PushScope();
_queryStore = new List<TheQuery>();
try
{
this.rootStylesheet = new Stylesheet();
PushStylesheet(this.rootStylesheet);
Debug.Assert(_input != null && _atoms != null);
try
{
this.CreateRootAction();
}
catch (XsltCompileException)
{
throw;
}
catch (Exception e)
{
throw new XsltCompileException(e, this.Input.BaseURI, this.Input.LineNumber, this.Input.LinePosition);
}
this.stylesheet.ProcessTemplates();
_rootAction.PorcessAttributeSets(this.rootStylesheet);
this.stylesheet.SortWhiteSpace();
if (_globalNamespaceAliasTable != null)
{
this.stylesheet.ReplaceNamespaceAlias(this);
_rootAction.ReplaceNamespaceAlias(this);
}
}
finally
{
PopInputDocument();
}
Debug.Assert(_rootAction != null);
Debug.Assert(this.stylesheet != null);
Debug.Assert(_queryStore != null);
Debug.Assert(_input == null && _atoms == null);
}