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();
        }
예제 #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();
 }
예제 #3
0
파일: XslTemplate.cs 프로젝트: nobled/mono
		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 ();
		}