gpt4 book ai didi

net.sf.saxon.expr.XPathContextMajor.trackFocus()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 18:29:40 26 4
gpt4 key购买 nike

本文整理了Java中net.sf.saxon.expr.XPathContextMajor.trackFocus()方法的一些代码示例,展示了XPathContextMajor.trackFocus()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XPathContextMajor.trackFocus()方法的具体详情如下:
包路径:net.sf.saxon.expr.XPathContextMajor
类名称:XPathContextMajor
方法名:trackFocus

XPathContextMajor.trackFocus介绍

暂无

代码示例

代码示例来源:origin: net.sf.saxon/Saxon-HE

public TailCall processLeavingTail() throws XPathException {
    evaluationContext.trackFocus(selectedItems.iterate());
    evaluationContext.setCurrentMode(targetMode);
    evaluationContext.setCurrentComponent(targetMode);
    return targetMode.getActor().applyTemplates(params, tunnelParams, evaluationContext, locationId);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

public TailCall processLeavingTail() throws XPathException {
    evaluationContext.trackFocus(selectedItems.iterate());
    evaluationContext.setCurrentMode(targetMode);
    evaluationContext.setCurrentComponent(targetMode);
    return targetMode.getActor().applyTemplates(params, tunnelParams, evaluationContext, locationId);
  }
}

代码示例来源:origin: net.sf.saxon/Saxon-HE

/**
 * 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);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

/**
 * 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);
}

代码示例来源:origin: net.sf.saxon/Saxon-HE

/**
 * 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);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

/**
 * 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);
}

代码示例来源:origin: net.sf.saxon/Saxon-HE

/**
   * Perform the built-in template action for a given item.
   *  @param item         the item to be processed
   * @param parameters   the parameters supplied to apply-templates
   * @param tunnelParams the tunnel parameters to be passed through
   * @param context      the dynamic evaluation context
   * @param locationId   location of the instruction (apply-templates, apply-imports etc) that caused
*                     the built-in template to be invoked     @throws net.sf.saxon.trans.XPathException
   */

  public void process(Item item, ParameterSet parameters,
            ParameterSet tunnelParams, XPathContext context,
            Location locationId) throws XPathException {
    if (item instanceof NodeInfo && ((NodeInfo) item).getNodeKind() == Type.DOCUMENT) {
      XPathContextMajor c2 = context.newContext();
      c2.setOrigin(this);
      c2.trackFocus(((NodeInfo) item).iterateAxis(AxisInfo.CHILD));
      c2.setCurrentComponent(c2.getCurrentMode());
      TailCall tc = c2.getCurrentMode().getActor().applyTemplates(parameters, tunnelParams, c2, locationId);
      while (tc != null) {
        tc = tc.processLeavingTail();
      }
    }
    // otherwise, do nothing
  }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

/**
   * Perform the built-in template action for a given item.
   *  @param item         the item to be processed
   * @param parameters   the parameters supplied to apply-templates
   * @param tunnelParams the tunnel parameters to be passed through
   * @param context      the dynamic evaluation context
   * @param locationId   location of the instruction (apply-templates, apply-imports etc) that caused
*                     the built-in template to be invoked     @throws net.sf.saxon.trans.XPathException
   */

  public void process(Item item, ParameterSet parameters,
            ParameterSet tunnelParams, XPathContext context,
            Location locationId) throws XPathException {
    if (item instanceof NodeInfo && ((NodeInfo) item).getNodeKind() == Type.DOCUMENT) {
      XPathContextMajor c2 = context.newContext();
      c2.setOrigin(this);
      c2.trackFocus(((NodeInfo) item).iterateAxis(AxisInfo.CHILD));
      c2.setCurrentComponent(c2.getCurrentMode());
      TailCall tc = c2.getCurrentMode().getActor().applyTemplates(parameters, tunnelParams, c2, locationId);
      while (tc != null) {
        tc = tc.processLeavingTail();
      }
    }
    // otherwise, do nothing
  }

代码示例来源:origin: net.sf.saxon/Saxon-HE

XPathContextMajor c2 = context.newContext();
    c2.setOrigin(this);
    c2.trackFocus(node.iterateAxis(AxisInfo.ATTRIBUTE));
    XPathContextMajor c2 = context.newContext();
    c2.setOrigin(this);
    c2.trackFocus(node.iterateAxis(AxisInfo.CHILD));
XPathContextMajor c2 = context.newContext();
c2.setOrigin(this);
c2.trackFocus(members);

代码示例来源:origin: net.sf.saxon/Saxon-HE

XPathContextMajor c2 = context.newContext();
c2.setOrigin(this);
FocusIterator focusIter = c2.trackFocus(iter);
c2.setCurrentRegexIterator(iter);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

XPathContextMajor c2 = context.newContext();
c2.setOrigin(this);
FocusIterator focusIter = c2.trackFocus(iter);
c2.setCurrentRegexIterator(iter);

代码示例来源:origin: net.sf.saxon/Saxon-HE

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;
}

代码示例来源:origin: net.sf.saxon/Saxon-HE

XPathContextMajor c2 = context.newContext();
    c2.setOrigin(this);
    c2.trackFocus(node.iterateAxis(AxisInfo.CHILD));
XPathContextMajor c2 = context.newContext();
c2.setOrigin(this);
c2.trackFocus(members);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

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;
}

代码示例来源:origin: net.sf.saxon/Saxon-HE

public TailCall processLeavingTail(XPathContext context) throws XPathException {
  XPathContextMajor c2 = context.newContext();
  c2.setOrigin(this);
  FocusIterator iter = c2.trackFocus(getSelectExpression().iterate(context));
  c2.setCurrentTemplateRule(null);
  PipelineConfiguration pipe = c2.getReceiver().getPipelineConfiguration();

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

public TailCall processLeavingTail(XPathContext context) throws XPathException {
  XPathContextMajor c2 = context.newContext();
  c2.setOrigin(this);
  FocusIterator iter = c2.trackFocus(getSelectExpression().iterate(context));
  c2.setCurrentTemplateRule(null);
  PipelineConfiguration pipe = c2.getReceiver().getPipelineConfiguration();

代码示例来源:origin: net.sf.saxon/Saxon-HE

FocusIterator<?> iter = c2.trackFocus(getSelect().iterate(context));
c2.setCurrentTemplateRule(null);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

FocusIterator<?> iter = c2.trackFocus(getSelect().iterate(context));
c2.setCurrentTemplateRule(null);

代码示例来源:origin: net.sf.saxon/Saxon-HE

c2.trackFocus(iter);
c2.setCurrentMode(targetMode);
c2.setOrigin(this);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

c2.trackFocus(iter);
c2.setCurrentMode(targetMode);
c2.setOrigin(this);

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com