Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ LoadInstructions() [4/4]

List< XslNode > System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions ( List< XslNode > content,
InstructionFlags flags )
inlineprivate

Definition at line 1205 of file XsltLoader.cs.

1206 {
1208 {
1209 throw XsltException.Create(System.SR.Xslt_InputTooComplex);
1210 }
1213 {
1214 bool flag = true;
1215 int num = 0;
1216 do
1217 {
1218 XmlNodeType nodeType = _input.NodeType;
1219 XslNode instruction;
1220 if (nodeType != XmlNodeType.Element)
1221 {
1222 if (nodeType == XmlNodeType.Whitespace)
1223 {
1224 continue;
1225 }
1226 if (nodeType != XmlNodeType.SignificantWhitespace)
1227 {
1228 flag = false;
1229 }
1230 instruction = SetLineInfo(AstFactory.Text(_input.Value), _input.BuildLineInfo());
1231 }
1232 else
1233 {
1234 string namespaceUri = _input.NamespaceUri;
1235 string localName = _input.LocalName;
1236 if (namespaceUri == _atoms.UriXsl)
1237 {
1239 if (instructionFlags != 0)
1240 {
1241 string text = (((flags & instructionFlags) == 0) ? System.SR.Xslt_UnexpectedElement : ((!flag) ? System.SR.Xslt_NotAtTop : null));
1242 if (text != null)
1243 {
1244 ReportError(text, _input.QualifiedName, elementName);
1245 flag = false;
1246 _input.SkipNode();
1247 continue;
1248 }
1249 }
1250 else
1251 {
1252 flag = false;
1253 }
1254 instruction = (Ref.Equal(localName, _atoms.ApplyImports) ? XslApplyImports() : (Ref.Equal(localName, _atoms.ApplyTemplates) ? XslApplyTemplates() : (Ref.Equal(localName, _atoms.CallTemplate) ? XslCallTemplate() : (Ref.Equal(localName, _atoms.Copy) ? XslCopy() : (Ref.Equal(localName, _atoms.CopyOf) ? XslCopyOf() : (Ref.Equal(localName, _atoms.Fallback) ? XslFallback() : (Ref.Equal(localName, _atoms.If) ? XslIf() : (Ref.Equal(localName, _atoms.Choose) ? XslChoose() : (Ref.Equal(localName, _atoms.ForEach) ? XslForEach() : (Ref.Equal(localName, _atoms.Message) ? XslMessage() : (Ref.Equal(localName, _atoms.Number) ? XslNumber() : (Ref.Equal(localName, _atoms.ValueOf) ? XslValueOf() : (Ref.Equal(localName, _atoms.Comment) ? XslComment() : (Ref.Equal(localName, _atoms.ProcessingInstruction) ? XslProcessingInstruction() : (Ref.Equal(localName, _atoms.Text) ? XslText() : (Ref.Equal(localName, _atoms.Element) ? XslElement() : (Ref.Equal(localName, _atoms.Attribute) ? XslAttribute() : (Ref.Equal(localName, _atoms.Variable) ? XslVarPar() : (Ref.Equal(localName, _atoms.Param) ? XslVarPar() : (Ref.Equal(localName, _atoms.Sort) ? XslSort(num++) : LoadUnknownXsltInstruction(elementName)))))))))))))))))))));
1255 }
1256 else
1257 {
1258 flag = false;
1260 }
1261 }
1262 AddInstruction(content, instruction);
1263 }
1264 while (_input.MoveToNextSibling());
1265 }
1267 return content;
1268 }
static string Xslt_NotAtTop
Definition SR.cs:1870
static string Xslt_InputTooComplex
Definition SR.cs:1862
Definition SR.cs:7
ISourceLineInfo BuildLineInfo()
XslNode LoadLiteralResultElement(bool asStylesheet)
void ReportError(string res, params string[] args)
static void AddInstruction(List< XslNode > content, XslNode instruction)
XslNode LoadUnknownXsltInstruction(string parentName)
XslNode XslSort(int sortNumber)
static XslNode SetLineInfo(XslNode node, ISourceLineInfo lineInfo)

References System.Xml.Xsl.Xslt.XsltLoader._atoms, System.Xml.Xsl.Xslt.XsltLoader._input, System.Xml.Xsl.Xslt.XsltLoader._loadInstructionsDepth, System.Xml.Xsl.Xslt.XsltLoader.AddInstruction(), System.Xml.Xsl.Xslt.KeywordsTable.ApplyImports, System.Xml.Xsl.Xslt.KeywordsTable.ApplyTemplates, System.Xml.Xsl.Xslt.KeywordsTable.Attribute, System.Xml.Xsl.Xslt.XsltInput.BuildLineInfo(), System.Xml.Xsl.Xslt.KeywordsTable.CallTemplate, System.Xml.Xsl.Xslt.KeywordsTable.Choose, System.Xml.Xsl.Xslt.KeywordsTable.Comment, System.Xml.Xsl.Xslt.KeywordsTable.Copy, System.Xml.Xsl.Xslt.KeywordsTable.CopyOf, System.Xml.Xsl.XsltException.Create(), System.Xml.Dictionary, System.Xml.Xsl.Xslt.KeywordsTable.Element, System.Xml.Xsl.Xslt.XsltInput.ElementName, System.Xml.Ref.Equal(), System.Xml.Xsl.Xslt.KeywordsTable.Fallback, System.Xml.Xsl.Xslt.KeywordsTable.ForEach, System.Xml.Xsl.Xslt.KeywordsTable.If, System.LocalAppContextSwitches.LimitXPathComplexity, System.Xml.Xsl.Xslt.XsltLoader.LoadLiteralResultElement(), System.Xml.Xsl.Xslt.XsltLoader.LoadUnknownXsltInstruction(), System.Xml.Xsl.Xslt.XsltInput.LocalName, System.Xml.Xsl.Xslt.KeywordsTable.Message, System.Xml.Xsl.Xslt.XsltInput.MoveToFirstChild(), System.Xml.Xsl.Xslt.XsltInput.MoveToNextSibling(), System.Xml.Xsl.Xslt.XsltInput.NamespaceUri, System.Xml.Xsl.Xslt.XsltInput.NodeType, System.Xml.Xsl.Xslt.KeywordsTable.Number, System.Xml.Xsl.Xslt.KeywordsTable.Param, System.Xml.Xsl.Xslt.KeywordsTable.ProcessingInstruction, System.Xml.Xsl.Xslt.XsltInput.QualifiedName, System.Xml.Xsl.Xslt.XsltLoader.ReportError(), System.Xml.Xsl.Xslt.XsltLoader.SetLineInfo(), System.Xml.Xsl.Xslt.XsltInput.SkipNode(), System.Xml.Xsl.Xslt.KeywordsTable.Sort, System.text, System.Xml.Xsl.Xslt.AstFactory.Text(), System.Xml.Xsl.Xslt.KeywordsTable.Text, System.Xml.Xsl.Xslt.KeywordsTable.UriXsl, System.Xml.Xsl.Xslt.XsltInput.Value, System.Xml.Xsl.Xslt.KeywordsTable.ValueOf, System.Xml.Xsl.Xslt.KeywordsTable.Variable, System.Xml.Xsl.Xslt.XsltLoader.XslApplyImports(), System.Xml.Xsl.Xslt.XsltLoader.XslApplyTemplates(), System.Xml.Xsl.Xslt.XsltLoader.XslAttribute(), System.Xml.Xsl.Xslt.XsltLoader.XslCallTemplate(), System.Xml.Xsl.Xslt.XsltLoader.XslChoose(), System.Xml.Xsl.Xslt.XsltLoader.XslComment(), System.Xml.Xsl.Xslt.XsltLoader.XslCopy(), System.Xml.Xsl.Xslt.XsltLoader.XslCopyOf(), System.Xml.Xsl.Xslt.XsltLoader.XslElement(), System.Xml.Xsl.Xslt.XsltLoader.XslFallback(), System.Xml.Xsl.Xslt.XsltLoader.XslForEach(), System.Xml.Xsl.Xslt.XsltLoader.XslIf(), System.Xml.Xsl.Xslt.XsltLoader.XslMessage(), System.Xml.Xsl.Xslt.XsltLoader.XslNumber(), System.Xml.Xsl.Xslt.XsltLoader.XslProcessingInstruction(), System.Xml.Xsl.Xslt.XsltLoader.XslSort(), System.SR.Xslt_InputTooComplex, System.SR.Xslt_NotAtTop, System.Xml.Xsl.Xslt.XsltLoader.XslText(), System.Xml.Xsl.Xslt.XsltLoader.XslValueOf(), and System.Xml.Xsl.Xslt.XsltLoader.XslVarPar().