public override void Evaluate(XslTransformProcessor p) { if (p.Debugger != null) { p.Debugger.DebugExecute(p, this.DebugInput); } // This intelligent optimization causes poor compatibility bug shown in bug #457065 // if (children == null) // return; XPathNodeIterator iter = sortEvaluator != null? sortEvaluator.SortedSelect(p) : p.Select(select); while (p.NodesetMoveNext(iter)) { p.PushNodeset(iter); p.PushForEachContext(); children.Evaluate(p); p.PopForEachContext(); p.PopNodeset(); } }
public override void Evaluate(XslTransformProcessor p) { if (p.Debugger != null) { p.Debugger.DebugExecute(p, this.DebugInput); } if (children == null) { return; } XPathNodeIterator iter = sortEvaluator != null? sortEvaluator.SortedSelect(p) : p.Select(select); while (p.NodesetMoveNext(iter)) { p.PushNodeset(iter); p.PushForEachContext(); children.Evaluate(p); p.PopForEachContext(); p.PopNodeset(); } }
public object Evaluate(XslTransformProcessor p) { if (this.select != null) { object obj = p.Evaluate(this.select); if (obj is XPathNodeIterator) { ArrayList arrayList = new ArrayList(); XPathNodeIterator xpathNodeIterator = (XPathNodeIterator)obj; while (xpathNodeIterator.MoveNext()) { XPathNavigator xpathNavigator = xpathNodeIterator.Current; arrayList.Add(xpathNavigator.Clone()); } obj = new ListIterator(arrayList, p.XPathContext); } return(obj); } if (this.content != null) { DTMXPathDocumentWriter2 dtmxpathDocumentWriter = new DTMXPathDocumentWriter2(p.Root.NameTable, 200); Outputter newOutput = new GenericOutputter(dtmxpathDocumentWriter, p.Outputs, null, true); p.PushOutput(newOutput); if (p.CurrentNodeset.CurrentPosition == 0) { p.NodesetMoveNext(); } this.content.Evaluate(p); p.PopOutput(); return(dtmxpathDocumentWriter.CreateDocument().CreateNavigator()); } return(string.Empty); }
protected override object GetValue(XslTransformProcessor p) { p.PushNodeset(new SelfIterator(p.Root, p.XPathContext)); p.NodesetMoveNext(); Evaluate(p); p.PopNodeset(); return(p.globalVariableTable [this]); }
public override void Evaluate(XslTransformProcessor p) { if (p.Debugger != null) { p.Debugger.DebugExecute(p, base.DebugInput); } XPathNodeIterator xpathNodeIterator = (this.sortEvaluator == null) ? p.Select(this.select) : this.sortEvaluator.SortedSelect(p); while (p.NodesetMoveNext(xpathNodeIterator)) { p.PushNodeset(xpathNodeIterator); p.PushForEachContext(); this.children.Evaluate(p); p.PopForEachContext(); p.PopNodeset(); } }
public object Evaluate(XslTransformProcessor p) { if (select != null) { object o = p.Evaluate(select); // To resolve variable references correctly, we // have to collect all the target nodes here. // (otherwise, variables might be resolved with // different level of variable stack in // XslTransformProcessor). if (o is XPathNodeIterator) { ArrayList al = new ArrayList(); XPathNodeIterator iter = (XPathNodeIterator)o; while (iter.MoveNext()) { al.Add(iter.Current.Clone()); } o = new ListIterator(al, p.XPathContext); } return(o); } else if (content != null) { DTMXPathDocumentWriter2 w = new DTMXPathDocumentWriter2(p.Root.NameTable, 200); Outputter outputter = new GenericOutputter(w, p.Outputs, null, true); p.PushOutput(outputter); if (p.CurrentNodeset.CurrentPosition == 0) { p.NodesetMoveNext(); } content.Evaluate(p); p.PopOutput(); return(w.CreateDocument().CreateNavigator()); } else { return(""); } }
public object Evaluate (XslTransformProcessor p) { if (select != null) { object o = p.Evaluate (select); // To resolve variable references correctly, we // have to collect all the target nodes here. // (otherwise, variables might be resolved with // different level of variable stack in // XslTransformProcessor). if (o is XPathNodeIterator) { ArrayList al = new ArrayList (); XPathNodeIterator iter = (XPathNodeIterator) o; while (iter.MoveNext ()) al.Add (iter.Current.Clone ()); o = new ListIterator (al, p.XPathContext); } return o; } else if (content != null) { DTMXPathDocumentWriter2 w = new DTMXPathDocumentWriter2 (p.Root.NameTable, 200); Outputter outputter = new GenericOutputter(w, p.Outputs, null, true); p.PushOutput (outputter); if (p.CurrentNodeset.CurrentPosition == 0) p.NodesetMoveNext (); content.Evaluate (p); p.PopOutput (); return w.CreateDocument ().CreateNavigator (); } else { return ""; } }
protected override object GetValue (XslTransformProcessor p) { p.PushNodeset (new SelfIterator (p.Root, p.XPathContext)); p.NodesetMoveNext (); Evaluate (p); p.PopNodeset (); return p.globalVariableTable [this]; }
public override void Evaluate (XslTransformProcessor p) { if (p.Debugger != null) p.Debugger.DebugExecute (p, this.DebugInput); // This intelligent optimization causes poor compatibility bug shown in bug #457065 // if (children == null) // return; XPathNodeIterator iter = sortEvaluator != null ? sortEvaluator.SortedSelect (p) : p.Select (select); while (p.NodesetMoveNext (iter)) { p.PushNodeset (iter); p.PushForEachContext (); children.Evaluate (p); p.PopForEachContext(); p.PopNodeset (); } }