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

◆ XslValueOf()

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

Definition at line 1574 of file XsltLoader.cs.

1575 {
1577 string text = ParseStringAttribute(0, "select");
1578 string text2 = ParseStringAttribute(1, "separator");
1579 bool flag = ParseYesNoAttribute(2, "disable-output-escaping") == TriState.True;
1580 if (text2 == null)
1581 {
1583 {
1584 text2 = ((text != null) ? " " : string.Empty);
1585 }
1586 }
1587 else
1588 {
1589 ReportNYI("xsl:value-of/@separator");
1590 }
1591 List<XslNode> list = null;
1592 if (V1)
1593 {
1594 if (text == null)
1595 {
1596 _input.SkipNode();
1597 return SetInfo(AstFactory.Error(XslLoadException.CreateMessage(attributes.lineInfo, System.SR.Xslt_MissingAttribute, "select")), null, attributes);
1598 }
1600 }
1601 else
1602 {
1603 list = LoadContent(text != null);
1605 if (list.Count != 0)
1606 {
1607 ReportNYI("xsl:value-of/*");
1608 list = null;
1609 }
1610 }
1611 return SetInfo(AstFactory.XslNode(flag ? XslNodeType.ValueOfDoe : XslNodeType.ValueOf, null, text, _input.XslVersion), null, attributes);
1612 }
static string Xslt_MissingAttribute
Definition SR.cs:1882
static string Xslt_NoSelectNoContent
Definition SR.cs:2004
Definition SR.cs:7
readonly XsltInput.XsltAttribute[] _valueOfAttributes
List< XslNode > LoadContent(bool hasSelect)
TriState ParseYesNoAttribute(int attNum, string attName)
void CheckError(bool cond, string res, params string[] args)
string ParseStringAttribute(int attNum, string attName)
static XslNode SetInfo(XslNode to, List< XslNode > content, XsltInput.ContextInfo info)

References System.Xml.Xsl.Xslt.XsltLoader._input, System.Xml.Xsl.Xslt.XsltLoader._valueOfAttributes, System.Xml.Xsl.Xslt.XsltInput.BackwardCompatibility, System.Xml.Xsl.Xslt.XsltLoader.CheckError(), System.Xml.Xsl.Xslt.XsltLoader.CheckNoContent(), System.Xml.Xsl.XslLoadException.CreateMessage(), System.Xml.Xsl.Xslt.XsltInput.ElementName, System.Xml.Xsl.Xslt.AstFactory.Error(), System.Xml.Xsl.Xslt.XsltInput.GetAttributes(), System.Xml.Xsl.Xslt.XsltInput.ContextInfo.lineInfo, System.list, System.Xml.Xsl.Xslt.XsltLoader.LoadContent(), System.Xml.Xsl.Xslt.XsltLoader.ParseStringAttribute(), System.Xml.Xsl.Xslt.XsltLoader.ParseYesNoAttribute(), System.Xml.Xsl.Xslt.XsltLoader.ReportNYI(), System.Xml.Xsl.Xslt.XsltLoader.SetInfo(), System.Xml.Xsl.Xslt.XsltInput.SkipNode(), System.text, System.Xml.Xsl.Xslt.XsltLoader.V1, System.Xml.Xsl.Xslt.AstFactory.XslNode(), System.SR.Xslt_MissingAttribute, System.SR.Xslt_NoSelectNoContent, and System.Xml.Xsl.Xslt.XsltInput.XslVersion.

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