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

◆ ResolveVariable()

QilNode IXPathEnvironment. System.Xml.Xsl.Xslt.QilGenerator.ResolveVariable ( string prefix,
string name )
inlineprivate

Implements System.Xml.Xsl.XPath.IXPathEnvironment.

Definition at line 2235 of file QilGenerator.cs.

2236 {
2237 if (!_allowVariables)
2238 {
2239 throw new XslLoadException(System.SR.Xslt_VariablesNotAllowed);
2240 }
2242 QilNode qilNode = _scope.LookupVariable(name, uri);
2243 if (qilNode == null)
2244 {
2245 throw new XslLoadException(System.SR.Xslt_InvalidVariable, Compiler.ConstructQName(prefix, name));
2246 }
2247 XmlQueryType xmlType = qilNode.XmlType;
2248 if (qilNode.NodeType == QilNodeType.Parameter && xmlType.IsNode && xmlType.IsNotRtf && xmlType.MaybeMany && !xmlType.IsDod)
2249 {
2250 qilNode = _f.TypeAssert(qilNode, XmlQueryTypeFactory.NodeSDod);
2251 }
2252 return qilNode;
2253 }
static string Xslt_InvalidVariable
Definition SR.cs:1902
static string Xslt_VariablesNotAllowed
Definition SR.cs:1980
Definition SR.cs:7
QilNode TypeAssert(QilNode expr, XmlQueryType t)
V LookupVariable(string localName, string uri)
readonly CompilerScopeManager< QilIterator > _scope
readonly XsltQilFactory _f
string ResolvePrefixThrow(bool ignoreDefaultNs, string prefix)

References System.Xml.Xsl.Xslt.QilGenerator._allowVariables, System.Xml.Xsl.Xslt.QilGenerator._f, System.Xml.Xsl.Xslt.QilGenerator._scope, System.Xml.Xsl.Xslt.Compiler.ConstructQName(), System.Xml.Dictionary, System.Xml.Xsl.XmlQueryType.IsDod, System.Xml.Xsl.XmlQueryType.IsNode, System.Xml.Xsl.XmlQueryType.IsNotRtf, System.Xml.Xsl.Xslt.CompilerScopeManager< V >.LookupVariable(), System.Xml.Xsl.XmlQueryType.MaybeMany, System.Xml.Xsl.XmlQueryTypeFactory.NodeSDod, System.prefix, System.Xml.Xsl.Xslt.QilGenerator.ResolvePrefixThrow(), System.Xml.Xsl.Qil.QilPatternFactory.TypeAssert(), System.SR.Xslt_InvalidVariable, and System.SR.Xslt_VariablesNotAllowed.