void EvaluateCore(XslTransformProcessor p, Hashtable withParams)
        {
            if (XslTransform.TemplateStackFrameOutput != null)
            {
                XslTransform.TemplateStackFrameOutput.WriteLine(LocationMessage);
            }

            p.PushStack(stackSize);

            if (parameters != null)
            {
                if (withParams == null)
                {
                    int len = parameters.Count;
                    for (int i = 0; i < len; i++)
                    {
                        XslLocalParam param = (XslLocalParam)parameters [i];
                        param.Evaluate(p);
                    }
                }
                else
                {
                    int len = parameters.Count;
                    for (int i = 0; i < len; i++)
                    {
                        XslLocalParam param = (XslLocalParam)parameters [i];
                        object        o     = withParams [param.Name];
                        if (o != null)
                        {
                            param.Override(p, o);
                        }
                        else
                        {
                            param.Evaluate(p);
                        }
                    }
                }
            }

            if (content != null)
            {
                content.Evaluate(p);
            }

            p.PopStack();
        }
Esempio n. 2
0
 private void EvaluateCore(XslTransformProcessor p, Hashtable withParams)
 {
     if (XslTransform.TemplateStackFrameOutput != null)
     {
         XslTransform.TemplateStackFrameOutput.WriteLine(this.LocationMessage);
     }
     p.PushStack(this.stackSize);
     if (this.parameters != null)
     {
         if (withParams == null)
         {
             int count = this.parameters.Count;
             for (int i = 0; i < count; i++)
             {
                 XslLocalParam xslLocalParam = (XslLocalParam)this.parameters[i];
                 xslLocalParam.Evaluate(p);
             }
         }
         else
         {
             int count2 = this.parameters.Count;
             for (int j = 0; j < count2; j++)
             {
                 XslLocalParam xslLocalParam2 = (XslLocalParam)this.parameters[j];
                 object        obj            = withParams[xslLocalParam2.Name];
                 if (obj != null)
                 {
                     xslLocalParam2.Override(p, obj);
                 }
                 else
                 {
                     xslLocalParam2.Evaluate(p);
                 }
             }
         }
     }
     if (this.content != null)
     {
         this.content.Evaluate(p);
     }
     p.PopStack();
 }