/** * Return an Iterator to iterate over the values of a sequence. The value of every * expression can be regarded as a sequence, so this method is supported for all * expressions. This default implementation relies on the process() method: it * "pushes" the results of the instruction to a sequence in memory, and then * iterates over this in-memory sequence. * <p>In principle instructions should implement a pipelined iterate() method that * avoids the overhead of intermediate storage.</p> * * @param context supplies the context for evaluation * @return a SequenceIterator that can be used to iterate over the result * of the expression * @throws XPathException if any dynamic error occurs evaluating the * expression */ /*@NotNull*/ public SequenceIterator<?> iterate(XPathContext context) throws XPathException { GroupIterator master = getGroupIterator(context); XPathContextMajor c2 = context.newContext(); c2.setOrigin(this); c2.trackFocus(master); c2.setCurrentGroupIterator(master); c2.setCurrentTemplateRule(null); return new ContextMappingIterator<>(this, c2); }
/** * Return an Iterator to iterate over the values of a sequence. The value of every * expression can be regarded as a sequence, so this method is supported for all * expressions. This default implementation relies on the process() method: it * "pushes" the results of the instruction to a sequence in memory, and then * iterates over this in-memory sequence. * <p/> * In principle instructions should implement a pipelined iterate() method that * avoids the overhead of intermediate storage. * * @param context supplies the context for evaluation * @return a SequenceIterator that can be used to iterate over the result * of the expression * @throws XPathException if any dynamic error occurs evaluating the * expression */ public SequenceIterator iterate(XPathContext context) throws XPathException { GroupIterator master = getGroupIterator(context); XPathContextMajor c2 = context.newContext(); c2.setOrigin(this); c2.setCurrentIterator(master); c2.setCurrentGroupIterator(master); c2.setCurrentTemplateRule(null); return new ContextMappingIterator(this, c2); }
c2.setCurrentIterator(base); c2.setOrigin(origin); c2.setCurrentGroupIterator((GroupIterator)base);
/** * Return an Iterator to iterate over the values of a sequence. The value of every * expression can be regarded as a sequence, so this method is supported for all * expressions. This default implementation relies on the process() method: it * "pushes" the results of the instruction to a sequence in memory, and then * iterates over this in-memory sequence. * <p/> * In principle instructions should implement a pipelined iterate() method that * avoids the overhead of intermediate storage. * * @param context supplies the context for evaluation * @return a SequenceIterator that can be used to iterate over the result * of the expression * @throws XPathException if any dynamic error occurs evaluating the * expression */ public SequenceIterator iterate(XPathContext context) throws XPathException { GroupIterator master = getGroupIterator(context); XPathContextMajor c2 = context.newContext(); c2.setOrigin(this); c2.setCurrentIterator(master); c2.setCurrentGroupIterator(master); c2.setCurrentTemplateRule(null); return new ContextMappingIterator(this, c2); }
c2.setCurrentIterator(base); c2.setOrigin(origin); c2.setCurrentGroupIterator((GroupIterator)base);
/** * Return an Iterator to iterate over the values of a sequence. The value of every * expression can be regarded as a sequence, so this method is supported for all * expressions. This default implementation relies on the process() method: it * "pushes" the results of the instruction to a sequence in memory, and then * iterates over this in-memory sequence. * <p>In principle instructions should implement a pipelined iterate() method that * avoids the overhead of intermediate storage.</p> * * @param context supplies the context for evaluation * @return a SequenceIterator that can be used to iterate over the result * of the expression * @throws XPathException if any dynamic error occurs evaluating the * expression */ /*@NotNull*/ public SequenceIterator<?> iterate(XPathContext context) throws XPathException { GroupIterator master = getGroupIterator(context); XPathContextMajor c2 = context.newContext(); c2.setOrigin(this); c2.trackFocus(master); c2.setCurrentGroupIterator(master); c2.setCurrentTemplateRule(null); return new ContextMappingIterator<>(this, c2); }
c2.setCurrentIterator((FocusIterator<Item<?>>)base); GroupIterator groupIter = (GroupIterator)((FocusTrackingIterator)base).getUnderlyingIterator(); c2.setCurrentGroupIterator(groupIter);
c2.setCurrentIterator((FocusIterator<Item<?>>)base); GroupIterator groupIter = (GroupIterator)((FocusTrackingIterator)base).getUnderlyingIterator(); c2.setCurrentGroupIterator(groupIter);
public TailCall processLeavingTail(XPathContext context) throws XPathException { Controller controller = context.getController(); GroupIterator groupIterator = getGroupIterator(context); XPathContextMajor c2 = context.newContext(); c2.setOrigin(this); c2.setCurrentIterator(groupIterator); c2.setCurrentGroupIterator(groupIterator); c2.setCurrentTemplateRule(null); if (controller.isTracing()) { TraceListener listener = controller.getTraceListener(); while (true) { Item item = groupIterator.next(); if (item == null) { break; } listener.startCurrentItem(item); action.process(c2); listener.endCurrentItem(item); } } else { while (true) { Item item = groupIterator.next(); if (item == null) { break; } action.process(c2); } } return null; }
public TailCall processLeavingTail(XPathContext context) throws XPathException { Controller controller = context.getController(); GroupIterator groupIterator = getGroupIterator(context); XPathContextMajor c2 = context.newContext(); c2.setOrigin(this); c2.setCurrentIterator(groupIterator); c2.setCurrentGroupIterator(groupIterator); c2.setCurrentTemplateRule(null); if (controller.isTracing()) { TraceListener listener = controller.getTraceListener(); while (true) { Item item = groupIterator.next(); if (item == null) { break; } listener.startCurrentItem(item); action.process(c2); listener.endCurrentItem(item); } } else { while (true) { Item item = groupIterator.next(); if (item == null) { break; } action.process(c2); } } return null; }
public TailCall processLeavingTail(XPathContext context) throws XPathException { Controller controller = context.getController(); assert controller != null; PipelineConfiguration pipe = context.getReceiver().getPipelineConfiguration(); GroupIterator groupIterator = getGroupIterator(context); XPathContextMajor c2 = context.newContext(); c2.setOrigin(this); FocusIterator focusIterator = c2.trackFocus(groupIterator); c2.setCurrentGroupIterator(groupIterator); c2.setCurrentTemplateRule(null); pipe.setXPathContext(c2); if (controller.isTracing()) { TraceListener listener = controller.getTraceListener(); assert listener != null; Item item; while ((item = focusIterator.next()) != null) { listener.startCurrentItem(item); getActionExpression().process(c2); listener.endCurrentItem(item); } } else { while (focusIterator.next() != null) { getActionExpression().process(c2); } } pipe.setXPathContext(context); return null; }
public TailCall processLeavingTail(XPathContext context) throws XPathException { Controller controller = context.getController(); assert controller != null; PipelineConfiguration pipe = context.getReceiver().getPipelineConfiguration(); GroupIterator groupIterator = getGroupIterator(context); XPathContextMajor c2 = context.newContext(); c2.setOrigin(this); FocusIterator focusIterator = c2.trackFocus(groupIterator); c2.setCurrentGroupIterator(groupIterator); c2.setCurrentTemplateRule(null); pipe.setXPathContext(c2); if (controller.isTracing()) { TraceListener listener = controller.getTraceListener(); assert listener != null; Item item; while ((item = focusIterator.next()) != null) { listener.startCurrentItem(item); getActionExpression().process(c2); listener.endCurrentItem(item); } } else { while (focusIterator.next() != null) { getActionExpression().process(c2); } } pipe.setXPathContext(context); return null; }
c2.setTunnelParameters(assembleTunnelParams(context, tunnelParams)); if (isWithinDeclaredStreamableConstruct) { c2.setCurrentGroupIterator(null);
c2.setTunnelParameters(assembleTunnelParams(context, tunnelParams)); if (isWithinDeclaredStreamableConstruct) { c2.setCurrentGroupIterator(null);
c2.setCurrentComponent(targetMode); if (inStreamableConstruct) { c2.setCurrentGroupIterator(null);
c2.setCurrentComponent(targetMode); if (inStreamableConstruct) { c2.setCurrentGroupIterator(null);