System.Xml.Xsl.Xslt.XsltLoader.LoadSimplifiedStylesheet C# (CSharp) Method

LoadSimplifiedStylesheet() private method

private LoadSimplifiedStylesheet ( ) : void
return void
        private void LoadSimplifiedStylesheet()
        {
            Debug.Assert(!_input.IsXsltNamespace());
            Debug.Assert(_curTemplate == null);

            // Prefix will be fixed later in LoadLiteralResultElement()
            _curTemplate = f.Template(/*name:*/null, /*match:*/"/", /*mode:*/nullMode, /*priority:*/double.NaN, _input.XslVersion);

            // This template has mode=null match="/" and no imports
            _input.CanHaveApplyImports = true;
            XslNode lre = LoadLiteralResultElement(/*asStylesheet:*/true);
            if (lre != null)
            {
                SetLineInfo(_curTemplate, lre.SourceLine);

                List<XslNode> content = new List<XslNode>();
                content.Add(lre);
                SetContent(_curTemplate, content);
                if (!_curStylesheet.AddTemplate(_curTemplate))
                {
                    Debug.Fail("AddTemplate() returned false for simplified stylesheet");
                }
            }
            _curTemplate = null;
        }