private void LoadDocument()
{
if (!_input.FindStylesheetElement())
{
ReportError(/*[XT_002]*/SR.Xslt_WrongStylesheetElement);
return;
}
Debug.Assert(_input.NodeType == XmlNodeType.Element);
if (_input.IsXsltNamespace())
{
if (
_input.IsKeyword(_atoms.Stylesheet) ||
_input.IsKeyword(_atoms.Transform)
)
{
LoadRealStylesheet();
}
else
{
ReportError(/*[XT_002]*/SR.Xslt_WrongStylesheetElement);
_input.SkipNode();
}
}
else
{
LoadSimplifiedStylesheet();
}
_input.Finish();
}