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

◆ XslNumber()

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

Definition at line 1523 of file XsltLoader.cs.

1524 {
1526 string value = ParseStringAttribute(0, "value");
1527 string text = ParseStringAttribute(1, "select");
1528 if (text != null)
1529 {
1530 ReportNYI("xsl:number/@select");
1531 }
1532 NumberLevel level = NumberLevel.Single;
1533 if (_input.MoveToXsltAttribute(2, "level"))
1534 {
1535 switch (_input.Value)
1536 {
1537 case "single":
1538 level = NumberLevel.Single;
1539 break;
1540 case "multiple":
1541 level = NumberLevel.Multiple;
1542 break;
1543 case "any":
1544 level = NumberLevel.Any;
1545 break;
1546 default:
1548 {
1550 }
1551 break;
1552 }
1553 }
1554 string count = ParseStringAttribute(3, "count");
1555 string from = ParseStringAttribute(4, "from");
1556 string text2 = ParseStringAttribute(5, "format");
1557 string lang = ParseStringAttribute(6, "lang");
1558 string letterValue = ParseStringAttribute(7, "letter-value");
1559 string value2 = ParseStringAttribute(8, "ordinal");
1560 if (!string.IsNullOrEmpty(value2))
1561 {
1562 ReportNYI("xsl:number/@ordinal");
1563 }
1564 string groupingSeparator = ParseStringAttribute(9, "grouping-separator");
1565 string groupingSize = ParseStringAttribute(10, "grouping-size");
1566 if (text2 == null)
1567 {
1568 text2 = "1";
1569 }
1571 return SetInfo(AstFactory.Number(level, count, from, value, text2, lang, letterValue, groupingSeparator, groupingSize, _input.XslVersion), null, attributes);
1572 }
static string Xslt_InvalidAttrValue
Definition SR.cs:1884
Definition SR.cs:7
bool MoveToXsltAttribute(int attNum, string attName)
Definition XsltInput.cs:681
void ReportError(string res, params string[] args)
string ParseStringAttribute(int attNum, string attName)
static XslNode SetInfo(XslNode to, List< XslNode > content, XsltInput.ContextInfo info)
readonly XsltInput.XsltAttribute[] _numberAttributes

References System.Xml.Xsl.Xslt.XsltLoader._input, System.Xml.Xsl.Xslt.XsltLoader._numberAttributes, System.Xml.Xsl.Xslt.XsltLoader.CheckNoContent(), System.count, System.Xml.Xsl.Xslt.XsltInput.ForwardCompatibility, System.Xml.Xsl.Xslt.XsltInput.GetAttributes(), System.Xml.Xsl.Xslt.XsltInput.MoveToXsltAttribute(), System.Xml.Xsl.Xslt.AstFactory.Number(), System.Xml.Xsl.Xslt.XsltLoader.ParseStringAttribute(), System.Xml.Xsl.Xslt.XsltLoader.ReportError(), System.Xml.Xsl.Xslt.XsltLoader.ReportNYI(), System.Xml.Xsl.Xslt.XsltLoader.SetInfo(), System.text, System.value, System.Xml.Xsl.Xslt.XsltInput.Value, System.SR.Xslt_InvalidAttrValue, and System.Xml.Xsl.Xslt.XsltInput.XslVersion.

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