gpt4 book ai didi

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

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

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

XPathContextMajor.setOriginatingConstructType介绍

暂无

代码示例

代码示例来源:origin: net.sourceforge.saxon/saxon

/**
 * Process this template, with the possibility of returning a tail call package if the template
 * contains any tail calls that are to be performed by the caller.
 * @param context the XPath dynamic context
 * @param rule the template rule that caused this template to be invoked. When a template has
 * a match pattern defined as a union, there can be more than one Rule referring to the same template,
 * and further calls on next-match or apply-imports need to know which one in in force
 * @return null if the template exited normally; but if it was a tail call, details of the call
 * that hasn't been made yet and needs to be made by the caller
*/
public TailCall applyLeavingTail(XPathContext context, Rule rule) throws XPathException {
  if (body==null) {
    // fast path for an empty template
    return null;
  }
  XPathContextMajor c2 = context.newContext();
  c2.setOriginatingConstructType(Location.TEMPLATE);
  c2.setCurrentTemplateRule(rule);
  if (bodyIsTailCallReturner) {
    return ((TailCallReturner)body).processLeavingTail(c2);
  } else {
    body.process(c2);
    return null;
  }
}

代码示例来源:origin: net.sourceforge.saxon/saxon

/**
 * Construct a Closure by supplying the expression and the set of context variables.
 * @param expression the expression to be lazily evaluated
 * @param context the dynamic context of the expression including for example the variables
 * on which it depends
 * @param ref the number of references to the value being lazily evaluated; this affects
 * the kind of Closure that is created
 * @return the Closure, a virtual value that can later be materialized when its content is required
*/
public static Value make(Expression expression, XPathContext context, int ref) throws XPathException {
  // special cases such as TailExpressions and shared append expressions are now picked up before
  // this method is called (where possible, at compile time)
  Value v = context.getConfiguration().getOptimizer().makeClosure(expression, ref, context);
  if (v instanceof Closure) {
    Closure c = (Closure)v;
    c.expression = expression;
    c.savedXPathContext = context.newContext();
    c.savedXPathContext.setOriginatingConstructType(Location.LAZY_EVALUATION);
    c.saveContext(expression, context);
    return c;
  } else {
    return v;
  }
}

代码示例来源:origin: org.opengis.cite.saxon/saxon9

/**
 * Construct a Closure by supplying the expression and the set of context variables.
 * @param expression the expression to be lazily evaluated
 * @param context the dynamic context of the expression including for example the variables
 * on which it depends
 * @param ref the number of references to the value being lazily evaluated; this affects
 * the kind of Closure that is created
 * @return the Closure, a virtual value that can later be materialized when its content is required
*/
public static Value make(Expression expression, XPathContext context, int ref) throws XPathException {
  // special cases such as TailExpressions and shared append expressions are now picked up before
  // this method is called (where possible, at compile time)
  Value v = context.getConfiguration().getOptimizer().makeClosure(expression, ref, context);
  if (v instanceof Closure) {
    Closure c = (Closure)v;
    c.expression = expression;
    c.savedXPathContext = context.newContext();
    c.savedXPathContext.setOriginatingConstructType(Location.LAZY_EVALUATION);
    c.saveContext(expression, context);
    return c;
  } else {
    return v;
  }
}

代码示例来源:origin: net.sourceforge.saxon/saxon

this.instruction = instruction;
savedXPathContext = context.newContext();
savedXPathContext.setOriginatingConstructType(Location.LAZY_EVALUATION);

代码示例来源:origin: org.opengis.cite.saxon/saxon9

this.instruction = instruction;
savedXPathContext = context.newContext();
savedXPathContext.setOriginatingConstructType(Location.LAZY_EVALUATION);

代码示例来源:origin: net.sourceforge.saxon/saxon

SequenceIterator iter = node.iterateAxis(Axis.CHILD);
XPathContextMajor c2 = context.newContext();
c2.setOriginatingConstructType(Location.BUILT_IN_TEMPLATE);
TailCall tc = applyTemplates(
    iter, context.getCurrentMode(), parameters, tunnelParams, c2, backwardsCompatible, locationId);

代码示例来源:origin: net.sourceforge.saxon/saxon

initialContext.setOriginatingConstructType(Location.CONTROLLER);
  Template t = initialTemplate;
  XPathContextMajor c2 = initialContext.newContext();
  initialContext.setOriginatingConstructType(Location.CONTROLLER);
  c2.openStackFrame(t.getStackFrameMap());
  c2.setLocalParameters(new ParameterSet());

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