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

◆ XslChoose()

XslNode System.Xml.Xsl.Xslt.XsltLoader.XslChoose ( )
inlineprivate

Definition at line 1424 of file XsltLoader.cs.

1425 {
1427 List<XslNode> content = new List<XslNode>();
1428 bool flag = false;
1429 bool flag2 = false;
1432 {
1433 do
1434 {
1435 switch (_input.NodeType)
1436 {
1437 case XmlNodeType.Element:
1438 {
1439 XslNode xslNode = null;
1440 if (Ref.Equal(_input.NamespaceUri, _atoms.UriXsl))
1441 {
1442 if (Ref.Equal(_input.LocalName, _atoms.When))
1443 {
1444 if (flag)
1445 {
1447 _input.SkipNode();
1448 break;
1449 }
1450 flag2 = true;
1451 xslNode = XslIf();
1452 }
1453 else if (Ref.Equal(_input.LocalName, _atoms.Otherwise))
1454 {
1455 if (flag)
1456 {
1458 _input.SkipNode();
1459 break;
1460 }
1461 flag = true;
1463 }
1464 }
1465 if (xslNode == null)
1466 {
1468 _input.SkipNode();
1469 }
1470 else
1471 {
1472 AddInstruction(content, xslNode);
1473 }
1474 break;
1475 }
1476 default:
1478 break;
1479 case XmlNodeType.Whitespace:
1480 case XmlNodeType.SignificantWhitespace:
1481 break;
1482 }
1483 }
1484 while (_input.MoveToNextSibling());
1485 }
1487 return SetInfo(AstFactory.Choose(), content, attributes);
1488 }
static string Xslt_DupOtherwise
Definition SR.cs:1966
static string Xslt_NoWhen
Definition SR.cs:1962
static string Xslt_WhenAfterOtherwise
Definition SR.cs:1964
static string Xslt_TextNodesNotAllowed
Definition SR.cs:1876
static string Xslt_UnexpectedElement
Definition SR.cs:1872
Definition SR.cs:7
void ReportError(string res, params string[] args)
static void AddInstruction(List< XslNode > content, XslNode instruction)
void CheckError(bool cond, string res, params string[] args)
static XslNode SetInfo(XslNode to, List< XslNode > content, XsltInput.ContextInfo info)

References System.Xml.Xsl.Xslt.XsltLoader._atoms, System.Xml.Xsl.Xslt.XsltLoader._input, System.Xml.Xsl.Xslt.XsltLoader.AddInstruction(), System.Xml.Xsl.Xslt.XsltLoader.CheckError(), System.Xml.Xsl.Xslt.AstFactory.Choose(), System.Xml.Dictionary, System.Xml.Xsl.Xslt.XsltInput.ElementName, System.Xml.Ref.Equal(), System.Xml.Xsl.Xslt.XsltInput.GetAttributes(), System.Xml.Xsl.Xslt.XsltInput.LocalName, 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.Otherwise, System.Xml.Xsl.Xslt.XsltInput.QualifiedName, System.Xml.Xsl.Xslt.XsltLoader.ReportError(), System.Xml.Xsl.Xslt.XsltLoader.SetInfo(), System.Xml.Xsl.Xslt.XsltInput.SkipNode(), System.Xml.Xsl.Xslt.KeywordsTable.UriXsl, System.Xml.Xsl.Xslt.KeywordsTable.When, System.Xml.Xsl.Xslt.XsltLoader.XslIf(), System.Xml.Xsl.Xslt.XsltLoader.XslOtherwise(), System.SR.Xslt_DupOtherwise, System.SR.Xslt_NoWhen, System.SR.Xslt_TextNodesNotAllowed, System.SR.Xslt_UnexpectedElement, and System.SR.Xslt_WhenAfterOtherwise.

Referenced by System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions().