Пример #1
0
            void CompileXsltVariable(XPathXsltVariableExpr expr)
            {
#if NO
                // Remove this block if we never decide to use variables in an XPathMessageContext
                // It is here in case we decide to
                if (expr.Variable is XPathMessageVariable)
                {
                    this.codeBlock.Append(new PushXPathMessageVariableOpcode((XPathMessageVariable)expr.Variable));
                }
                else
                {
                    this.codeBlock.Append(new PushXsltVariableOpcode(expr.Context, expr.Variable));
                }
#endif
                this.codeBlock.Append(new PushXsltVariableOpcode(expr.Context, expr.Variable));
            }
        internal XPathExpr ParseVariableExpression()
        {
            XPathExpr expr = null;

            if (this.context != null)
            {
                XPathToken token = this.NextToken(XPathTokenID.Variable);
                if (token != null)
                {
                    NodeQName            name     = this.QualifyName(token.Prefix, token.Name);
                    string               prefix   = this.context.LookupPrefix(name.Namespace);
                    IXsltContextVariable variable = this.context.ResolveVariable(prefix, name.Name);
                    if (variable != null)
                    {
                        expr = new XPathXsltVariableExpr(this.context, variable);
                    }
                }
            }
            return(expr);
        }
Пример #3
0
            void CompileXsltVariable(XPathXsltVariableExpr expr)
            {
#if NO
                // Remove this block if we never decide to use variables in an XPathMessageContext
                // It is here in case we decide to
                if (expr.Variable is XPathMessageVariable)
                {
                    this.codeBlock.Append(new PushXPathMessageVariableOpcode((XPathMessageVariable)expr.Variable));
                }
                else
                {
                    this.codeBlock.Append(new PushXsltVariableOpcode(expr.Context, expr.Variable));
                }
#endif
                this.codeBlock.Append(new PushXsltVariableOpcode(expr.Context, expr.Variable));
            }
Пример #4
0
 private void CompileXsltVariable(XPathXsltVariableExpr expr)
 {
     this.codeBlock.Append(new PushXsltVariableOpcode(expr.Context, expr.Variable));
 }
Пример #5
0
        internal XPathExpr ParseVariableExpression()
        {
            XPathExpr expr = null;
            if (this.context != null)
            {
                XPathToken varTok = this.NextToken(XPathTokenID.Variable);
                if (varTok != null)
                {
                    NodeQName varName = this.QualifyName(varTok.Prefix, varTok.Name);
                    string prefix = this.context.LookupPrefix(varName.Namespace);

                    IXsltContextVariable var = this.context.ResolveVariable(prefix, varName.Name);
                    if (var != null)
                    {
                        expr = new XPathXsltVariableExpr(this.context, var);
                    }
                }
            }
            return expr;
        }
 private void CompileXsltVariable(XPathXsltVariableExpr expr)
 {
     this.codeBlock.Append(new PushXsltVariableOpcode(expr.Context, expr.Variable));
 }