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

XslApplyImports() private method

private XslApplyImports ( ) : XslNode
return XslNode
        private XslNode XslApplyImports()
        {
            ContextInfo ctxInfo = _input.GetAttributes();
            if (!_input.CanHaveApplyImports)
            {
                ReportError(/*[XT_015]*/SR.Xslt_InvalidApplyImports);
                _input.SkipNode();
                return null;
            }

            List<XslNode> content = LoadWithParams(InstructionFlags.None);

            ctxInfo.SaveExtendedLineInfo(_input);

            if (V1)
            {
                if (content.Count != 0)
                {
                    ISourceLineInfo contentInfo = content[0].SourceLine;
                    if (!_input.ForwardCompatibility)
                    {
                        _compiler.ReportError(contentInfo, /*[XT0260]*/SR.Xslt_NotEmptyContents, _atoms.ApplyImports);
                    }
                    else
                    {
                        return SetInfo(f.Error(XslLoadException.CreateMessage(contentInfo, /*[XT0260]*/SR.Xslt_NotEmptyContents, _atoms.ApplyImports)), null, ctxInfo);
                    }
                }
                content = null;
            }
            else
            {
                if (content.Count != 0) ReportNYI("xsl:apply-imports/xsl:with-param");
                content = null;
            }

            return SetInfo(f.ApplyImports(/*Mode:*/_curTemplate.Mode, _curStylesheet, _input.XslVersion), content, ctxInfo);
        }