/** * 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 handles iteration for expressions that * return singleton values: for non-singleton expressions, the subclass must * provide its own implementation. * * @param context supplies the context for evaluation * @return a SequenceIterator that can be used to iterate over the result * of the expression * @throws net.sf.saxon.trans.XPathException * if any dynamic error occurs evaluating the * expression */ public SequenceIterator iterate(XPathContext context) throws XPathException { RegexIterator iter = getRegexIterator(context); XPathContextMajor c2 = context.newContext(); c2.setOrigin(this); c2.setCurrentIterator(iter); c2.setCurrentRegexIterator(iter); AnalyzeMappingFunction fn = new AnalyzeMappingFunction(iter, c2); return new ContextMappingIterator(fn, 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 handles iteration for expressions that * return singleton values: for non-singleton expressions, the subclass must * provide its own implementation. * * @param context supplies the context for evaluation * @return a SequenceIterator that can be used to iterate over the result * of the expression * @throws net.sf.saxon.trans.XPathException * if any dynamic error occurs evaluating the * expression */ public SequenceIterator iterate(XPathContext context) throws XPathException { RegexIterator iter = getRegexIterator(context); XPathContextMajor c2 = context.newContext(); c2.setOrigin(this); c2.setCurrentIterator(iter); c2.setCurrentRegexIterator(iter); AnalyzeMappingFunction fn = new AnalyzeMappingFunction(iter, c2); return new ContextMappingIterator(fn, 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 handles iteration for expressions that * return singleton values: for non-singleton expressions, the subclass must * provide its own implementation. * * @param context supplies the context for evaluation * @return a SequenceIterator that can be used to iterate over the result * of the expression * @throws net.sf.saxon.trans.XPathException * if any dynamic error occurs evaluating the * expression */ /*@NotNull*/ public SequenceIterator<?> iterate(XPathContext context) throws XPathException { RegexIterator iter = getRegexIterator(context); XPathContextMajor c2 = context.newContext(); c2.setOrigin(this); c2.trackFocus(iter); c2.setCurrentRegexIterator(iter); AnalyzeMappingFunction fn = new AnalyzeMappingFunction(iter, c2, getNonMatching(), getMatching()); return new ContextMappingIterator<>(fn, 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 handles iteration for expressions that * return singleton values: for non-singleton expressions, the subclass must * provide its own implementation. * * @param context supplies the context for evaluation * @return a SequenceIterator that can be used to iterate over the result * of the expression * @throws net.sf.saxon.trans.XPathException * if any dynamic error occurs evaluating the * expression */ /*@NotNull*/ public SequenceIterator<?> iterate(XPathContext context) throws XPathException { RegexIterator iter = getRegexIterator(context); XPathContextMajor c2 = context.newContext(); c2.setOrigin(this); c2.trackFocus(iter); c2.setCurrentRegexIterator(iter); AnalyzeMappingFunction fn = new AnalyzeMappingFunction(iter, c2, getNonMatching(), getMatching()); return new ContextMappingIterator(fn, c2); }
c2.setOrigin(this); c2.setCurrentIterator(iter); c2.setCurrentRegexIterator(iter);
c2.setOrigin(this); c2.setCurrentIterator(iter); c2.setCurrentRegexIterator(iter);
c2.setOrigin(this); FocusIterator focusIter = c2.trackFocus(iter); c2.setCurrentRegexIterator(iter);
c2.setOrigin(this); FocusIterator focusIter = c2.trackFocus(iter); c2.setCurrentRegexIterator(iter);