- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.setLocalParameters()
方法的一些代码示例,展示了XPathContextMajor.setLocalParameters()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XPathContextMajor.setLocalParameters()
方法的具体详情如下:
包路径:net.sf.saxon.expr.XPathContextMajor
类名称:XPathContextMajor
方法名:setLocalParameters
[英]Set the local parameters for the current template call.
[中]为当前模板调用设置本地参数。
代码示例来源:origin: net.sourceforge.saxon/saxon
public TailCall processLeavingTail(XPathContext context) throws XPathException {
XPathContextMajor cm = (XPathContextMajor)context;
ParameterSet params = assembleParams(context, actualParams);
cm.setLocalParameters(params);
cm.requestTailCall(continueFunction, emptyArgs);
return null;
}
代码示例来源:origin: org.opengis.cite.saxon/saxon9
/**
* Process the template call encapsulated by this package.
* @return another TailCall. This will never be the original call, but it may be the next
* recursive call. For example, if A calls B which calls C which calls D, then B may return
* a TailCall to A representing the call from B to C; when this is processed, the result may be
* a TailCall representing the call from C to D.
* @throws XPathException if a dynamic error occurs
*/
public TailCall processLeavingTail() throws XPathException {
// TODO: the idea of tail call optimization is to reuse the caller's stack frame rather than
// creating a new one. We're doing this for the Java stack, but not for the context stack where
// local variables are held. It should be possible to avoid creating a new context, and instead
// to update the existing one in situ.
XPathContextMajor c2 = evaluationContext.newContext();
c2.setOrigin(CallTemplate.this);
c2.setLocalParameters(params);
c2.setTunnelParameters(tunnelParams);
c2.openStackFrame(target.getStackFrameMap());
// System.err.println("Tail call on template");
return target.expand(c2);
}
}
代码示例来源:origin: net.sourceforge.saxon/saxon
/**
* Process the template call encapsulated by this package.
* @return another TailCall. This will never be the original call, but it may be the next
* recursive call. For example, if A calls B which calls C which calls D, then B may return
* a TailCall to A representing the call from B to C; when this is processed, the result may be
* a TailCall representing the call from C to D.
* @throws XPathException if a dynamic error occurs
*/
public TailCall processLeavingTail() throws XPathException {
// TODO: the idea of tail call optimization is to reuse the caller's stack frame rather than
// creating a new one. We're doing this for the Java stack, but not for the context stack where
// local variables are held. It should be possible to avoid creating a new context, and instead
// to update the existing one in situ.
XPathContextMajor c2 = evaluationContext.newContext();
c2.setOrigin(instruction);
c2.setLocalParameters(params);
c2.setTunnelParameters(tunnelParams);
c2.openStackFrame(target.getStackFrameMap());
// System.err.println("Tail call on template");
return target.expand(c2);
}
}
代码示例来源:origin: net.sourceforge.saxon/saxon
/**
* Process the template call encapsulated by this package.
* @return another TailCall. This will never be the original call, but it may be the next
* recursive call. For example, if A calls B which calls C which calls D, then B may return
* a TailCall to A representing the call from B to C; when this is processed, the result may be
* a TailCall representing the call from C to D.
* @throws XPathException if a dynamic error occurs
*/
public TailCall processLeavingTail() throws XPathException {
Template nh = (Template)rule.getAction();
XPathContextMajor c2 = evaluationContext.newContext();
c2.setOrigin(NextMatch.this);
c2.setLocalParameters(params);
c2.setTunnelParameters(tunnelParams);
c2.openStackFrame(nh.getStackFrameMap());
// System.err.println("Tail call on template");
return nh.applyLeavingTail(c2, rule);
}
}
代码示例来源:origin: net.sf.saxon/Saxon-HE
/**
* Process the template call encapsulated by this package.
*
* @return another TailCall. This will never be the original call, but it may be the next
* recursive call. For example, if A calls B which calls C which calls D, then B may return
* a TailCall to A representing the call from B to C; when this is processed, the result may be
* a TailCall representing the call from C to D.
* @throws XPathException if a dynamic error occurs
*/
public TailCall processLeavingTail() throws XPathException {
// TODO: the idea of tail call optimization is to reuse the caller's stack frame rather than
// creating a new one. We're doing this for the Java stack, but not for the context stack where
// local variables are held. It should be possible to avoid creating a new context, and instead
// to update the existing one in situ.
NamedTemplate template = (NamedTemplate)targetComponent.getActor();
XPathContextMajor c2 = evaluationContext.newContext();
c2.setCurrentComponent(targetComponent);
c2.setOrigin(instruction);
c2.setLocalParameters(params);
c2.setTunnelParameters(tunnelParams);
c2.openStackFrame(template.getStackFrameMap());
// System.err.println("Tail call on template");
return template.expand(c2);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
/**
* Process the template call encapsulated by this package.
*
* @return another TailCall. This will never be the original call, but it may be the next
* recursive call. For example, if A calls B which calls C which calls D, then B may return
* a TailCall to A representing the call from B to C; when this is processed, the result may be
* a TailCall representing the call from C to D.
* @throws XPathException if a dynamic error occurs
*/
public TailCall processLeavingTail() throws XPathException {
// TODO: the idea of tail call optimization is to reuse the caller's stack frame rather than
// creating a new one. We're doing this for the Java stack, but not for the context stack where
// local variables are held. It should be possible to avoid creating a new context, and instead
// to update the existing one in situ.
NamedTemplate template = (NamedTemplate)targetComponent.getActor();
XPathContextMajor c2 = evaluationContext.newContext();
c2.setCurrentComponent(targetComponent);
c2.setOrigin(instruction);
c2.setLocalParameters(params);
c2.setTunnelParameters(tunnelParams);
c2.openStackFrame(template.getStackFrameMap());
// System.err.println("Tail call on template");
return template.expand(c2);
}
}
代码示例来源:origin: net.sf.saxon/Saxon-HE
/**
* Process the template call encapsulated by this package.
*
* @return another TailCall. This will never be the original call, but it may be the next
* recursive call. For example, if A calls B which calls C which calls D, then B may return
* a TailCall to A representing the call from B to C; when this is processed, the result may be
* a TailCall representing the call from C to D.
* @throws XPathException if a dynamic error occurs
*/
public TailCall processLeavingTail() throws XPathException {
TemplateRule nh = (TemplateRule) rule.getAction();
nh.initialize();
XPathContextMajor c2 = evaluationContext.newContext();
c2.setOrigin(NextMatch.this);
//c2.setOriginatingConstructType(LocationKind.TEMPLATE);
c2.setLocalParameters(params);
c2.setTunnelParameters(tunnelParams);
c2.openStackFrame(nh.getStackFrameMap());
c2.setCurrentTemplateRule(rule);
c2.setCurrentComponent(evaluationContext.getCurrentComponent());
// System.err.println("Tail call on template");
return nh.applyLeavingTail(c2);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
/**
* Process the template call encapsulated by this package.
*
* @return another TailCall. This will never be the original call, but it may be the next
* recursive call. For example, if A calls B which calls C which calls D, then B may return
* a TailCall to A representing the call from B to C; when this is processed, the result may be
* a TailCall representing the call from C to D.
* @throws XPathException if a dynamic error occurs
*/
public TailCall processLeavingTail() throws XPathException {
TemplateRule nh = (TemplateRule) rule.getAction();
nh.initialize();
XPathContextMajor c2 = evaluationContext.newContext();
c2.setOrigin(NextMatch.this);
//c2.setOriginatingConstructType(LocationKind.TEMPLATE);
c2.setLocalParameters(params);
c2.setTunnelParameters(tunnelParams);
c2.openStackFrame(nh.getStackFrameMap());
c2.setCurrentTemplateRule(rule);
c2.setCurrentComponent(evaluationContext.getCurrentComponent());
// System.err.println("Tail call on template");
return nh.applyLeavingTail(c2);
}
}
代码示例来源:origin: net.sourceforge.saxon/saxon
/**
* Process this instruction, without leaving any tail calls.
* @param context the dynamic context for this transformation
* @throws XPathException if a dynamic error occurs
*/
public void process(XPathContext context) throws XPathException {
Template t = getTargetTemplate(context);
XPathContextMajor c2 = context.newContext();
c2.setOrigin(this);
c2.openStackFrame(t.getStackFrameMap());
c2.setLocalParameters(assembleParams(context, actualParams));
c2.setTunnelParameters(assembleTunnelParams(context, tunnelParams));
try {
TailCall tc = t.expand(c2);
while (tc != null) {
tc = tc.processLeavingTail();
}
} catch (StackOverflowError e) {
XPathException err = new XPathException("Too many nested template or function calls. The stylesheet may be looping.");
err.setLocator(this);
err.setXPathContext(context);
throw err;
}
}
代码示例来源:origin: org.opengis.cite.saxon/saxon9
/**
* Process this instruction, without leaving any tail calls.
* @param context the dynamic context for this transformation
* @throws XPathException if a dynamic error occurs
*/
public void process(XPathContext context) throws XPathException {
Template t = getTargetTemplate(context);
XPathContextMajor c2 = context.newContext();
c2.setOrigin(this);
c2.openStackFrame(t.getStackFrameMap());
c2.setLocalParameters(assembleParams(context, actualParams));
c2.setTunnelParameters(assembleTunnelParams(context, tunnelParams));
try {
TailCall tc = t.expand(c2);
while (tc != null) {
tc = tc.processLeavingTail();
}
} catch (StackOverflowError e) {
XPathException err = new XPathException("Too many nested template or function calls. The stylesheet may be looping.");
err.setLocator(this);
err.setXPathContext(context);
throw err;
}
}
代码示例来源:origin: net.sf.saxon/Saxon-HE
c2.setLocalParameters(params);
c2.setTunnelParameters(tunnels);
c2.setCurrentTemplateRule(rule);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
c2.setLocalParameters(params);
c2.setTunnelParameters(tunnels);
c2.setCurrentTemplateRule(rule);
代码示例来源:origin: net.sf.saxon/Saxon-HE
c2.setOrigin(this);
c2.setLocalParameters(params);
c2.setTunnelParameters(tunnels);
c2.openStackFrame(nh.getStackFrameMap());
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
c2.setOrigin(this);
c2.setLocalParameters(params);
c2.setTunnelParameters(tunnels);
c2.openStackFrame(nh.getStackFrameMap());
代码示例来源:origin: net.sf.saxon/Saxon-HE
c2.setOrigin(this);
c2.openStackFrame(t.getStackFrameMap());
c2.setLocalParameters(assembleParams(context, actualParams));
c2.setTunnelParameters(assembleTunnelParams(context, tunnelParams));
if (isWithinDeclaredStreamableConstruct) {
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
c2.setOrigin(this);
c2.openStackFrame(t.getStackFrameMap());
c2.setLocalParameters(assembleParams(context, actualParams));
c2.setTunnelParameters(assembleTunnelParams(context, tunnelParams));
if (isWithinDeclaredStreamableConstruct) {
代码示例来源:origin: net.sourceforge.saxon/saxon
c2.setOrigin(this);
c2.openStackFrame(nh.getStackFrameMap());
c2.setLocalParameters(params);
c2.setTunnelParameters(tunnels);
nh.apply(c2, rule);
代码示例来源:origin: org.opengis.cite.saxon/saxon9
c2.setOrigin(this);
c2.openStackFrame(nh.getStackFrameMap());
c2.setLocalParameters(params);
c2.setTunnelParameters(tunnels);
nh.apply(c2, rule);
代码示例来源:origin: net.sf.saxon/Saxon-HE
c2.setCurrentComponent(initialComponent);
c2.openStackFrame(t.getStackFrameMap());
c2.setLocalParameters(ordinaryParams);
c2.setTunnelParameters(tunnelParams);
代码示例来源:origin: net.sourceforge.saxon/saxon
Template nh = (Template)rule.getAction();
c2.setOrigin(this);
c2.setLocalParameters(params);
c2.setTunnelParameters(tunnels);
c2.openStackFrame(nh.getStackFrameMap());
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.setLocalParameters()方法的一些代码示例,展示了XPathContextMajor.set
我是一名优秀的程序员,十分优秀!