- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中net.sf.saxon.expr.XPathContextMajor.setCurrentTemplateRule()
方法的一些代码示例,展示了XPathContextMajor.setCurrentTemplateRule()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XPathContextMajor.setCurrentTemplateRule()
方法的具体详情如下:
包路径:net.sf.saxon.expr.XPathContextMajor
类名称:XPathContextMajor
方法名:setCurrentTemplateRule
[英]Set the current template. This is used to support xsl:apply-imports. The caller is responsible for remembering the previous current template and resetting it after use.
[中]设置当前模板。这用于支持xsl:apply导入。调用方负责记住以前的当前模板,并在使用后重置它。
代码示例来源:origin: org.opengis.cite.saxon/saxon9
/**
* 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.setOrigin(this);
c2.setCurrentTemplateRule(rule);
if (bodyIsTailCallReturner) {
return ((TailCallReturner)body).processLeavingTail(c2);
} else {
body.process(c2);
return null;
}
}
代码示例来源:origin: net.sf.saxon/Saxon-B
/**
* 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.setOrigin(this);
c2.setCurrentTemplateRule(rule);
if (bodyIsTailCallReturner) {
return ((TailCallReturner)body).processLeavingTail(c2);
} else {
body.process(c2);
return null;
}
}
代码示例来源: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: org.opengis.cite.saxon/saxon9
/**
* Return an Iterator to iterate over the values of the sequence.
*
* @exception XPathException if any dynamic error occurs evaluating the
* expression
* @param context supplies the context for evaluation
* @return a SequenceIterator that can be used to iterate over the result
* of the expression
*/
public SequenceIterator iterate(XPathContext context) throws XPathException {
SequenceIterator master = select.iterate(context);
XPathContextMajor c2 = context.newContext();
c2.setOrigin(this);
c2.setCurrentTemplateRule(null);
c2.setCurrentIterator(master);
master = new ContextMappingIterator(this, c2);
return master;
}
代码示例来源:origin: net.sourceforge.saxon/saxon
/**
* Return an Iterator to iterate over the values of the sequence.
*
* @exception XPathException if any dynamic error occurs evaluating the
* expression
* @param context supplies the context for evaluation
* @return a SequenceIterator that can be used to iterate over the result
* of the expression
*/
public SequenceIterator iterate(XPathContext context) throws XPathException {
SequenceIterator master = select.iterate(context);
XPathContextMajor c2 = context.newContext();
c2.setOrigin(this);
c2.setCurrentTemplateRule(null);
c2.setCurrentIterator(master);
master = new ContextMappingIterator(this, c2);
return master;
}
代码示例来源: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: net.sourceforge.saxon/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.
*
* @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);
}
代码示例来源:origin: org.opengis.cite.saxon/saxon9
/**
* 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);
}
代码示例来源: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
/**
* 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
c2.setOrigin(this);
c2.setCurrentIterator(iter);
c2.setCurrentTemplateRule(null);
代码示例来源:origin: org.opengis.cite.saxon/saxon9
public TailCall processLeavingTail(XPathContext context) throws XPathException {
Controller controller = context.getController();
SequenceIterator iter = select.iterate(context);
XPathContextMajor c2 = context.newContext();
c2.setOrigin(this);
c2.setCurrentIterator(iter);
c2.setCurrentTemplateRule(null);
if (controller.isTracing()) {
TraceListener listener = controller.getTraceListener();
while(true) {
Item item = iter.next();
if (item == null) {
break;
}
listener.startCurrentItem(item);
action.process(c2);
listener.endCurrentItem(item);
}
} else {
while(true) {
Item item = iter.next();
if (item == null) {
break;
}
action.process(c2);
}
}
return null;
}
代码示例来源:origin: net.sourceforge.saxon/saxon
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;
}
代码示例来源:origin: org.opengis.cite.saxon/saxon9
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;
}
代码示例来源: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: 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: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
c2.setTunnelParameters(tunnels);
c2.openStackFrame(nh.getStackFrameMap());
c2.setCurrentTemplateRule(rule);
c2.setCurrentComponent(modeComponent);
nh.apply(c2);
代码示例来源:origin: net.sf.saxon/Saxon-HE
c2.setTunnelParameters(tunnels);
c2.openStackFrame(nh.getStackFrameMap());
c2.setCurrentTemplateRule(rule);
c2.setCurrentComponent(modeComponent);
nh.apply(c2);
代码示例来源:origin: net.sf.saxon/Saxon-HE
c2.setOrigin(this);
FocusIterator<?> iter = c2.trackFocus(getSelect().iterate(context));
c2.setCurrentTemplateRule(null);
这个问题在这里已经有了答案: Difference between JSP EL, JSF EL and Unified EL [closed] (2 个回答) 5年前关闭。 前段时间我读过关于“Co
在阅读德州仪器为其 SensorTag 提供的示例代码时我发现了以下代码段。 void SensorTagIO_processCharChangeEvt(uint8_t paramID) {
我正在尝试编写支持简单语法的宏,例如: boo: 3 and foo: go or bar: 4+2 这是我试过的: macro_rules! solr { ($TOPIC:ident : $
有人知道 C 中 if(Expr,Expr) 结构的逻辑含义是什么吗?喜欢: if(lcn = (ULONG)GetLCN(index),lcn) 最佳答案 当您有“,”时,表达式的计算结果为列表中的
我花了几个小时试图让下面的代码工作 PATH="C:\Ben\MyPictures" echo $PATH MY=`expr 2 + 2` 但这不会起作用,因为“expr: c
我尝试将两个数字(实际上这些是某些远程执行命令的输出)分配给 2 个不同的变量,比如说 A 和 B。 当我回显 A 和 B 时,它们显示值: echo $A 809189640755 echo $B
我该怎么做才能使以下工作正常进行? 我需要创建一个接受 Expr 列表并返回 Expr 的函数(Expr 列表 -> Epxr)。 type DataObject() = let data =
这个问题在这里已经有了答案: 关闭 11 年前。 Possible Duplicate: bash: $[] vs. $(()) $(( expr )) 构造可用于整数 math在 bash 中,例
我很难理解这里的声明: for( int i=0; i< out_length; i++){ int num=i < length_a ? array_a[i] : 0; ... ... 我
我只是好奇。我想知道表达式是否有特定原因 var &= expr 行为方式与不同 var = var && expr. 看起来第一个表达式中的表达式正在执行,而不管 var 上的 false 值。 我
在 bash 中,我不明白为什么第三个命令不正确: [[ 1 -eq 1 ]] # $? is 0 [[ ! 1 -eq 1 ]] # $? is 1 [[ ! ! 1 -
这个问题在这里已经有了答案: Lifetime of temporaries (2 个答案) 关闭 8 年前。 我有一个统计管理器,它通过测量方法执行所需的时间来检查我的应用程序性能。它的用法是这样
我不确定这里是否有人问过这个问题,但我在这里很困惑。我正在读这本很棒的书,名为《Advanced R》,作者为 Hadley Wickham,来自 here . 这里已经描述了一个名为cement的函
我正在通过解析类似 Excel 的公式来生成 sql 请求。 因此,对于给定的公式,我收到以下请求: SELECT IF(COL1='Y', SUM(EXPR),NULL) FROM Table 我没
我看到了一些非常奇怪的东西,我无法解释。我在猜测一些我不熟悉的 C# 边缘情况,或者运行时/发射器中的错误? 我有以下方法: public static bool HistoryMessageExis
我在玩Prefix和 Postfix运算符(分别为 @ 和 //),我遇到了以下问题。 给定以下代码,它们以相同的方式进行评估: Hold[MatrixPlot@Sort@data] // FullF
有没有人在使用 Pandas 时解决了这个 pylint 问题? C:525,59: Comparison to True should be just 'expr' or 'expr is True
我正在尝试制作一个可以按以下方式调用的宏: mactest!(some::Path[1, 2, AnotherName[3, 4]]) 这相当于以下内容: make_result( "some
这两种方法有区别吗? public String toString() { return this.from.toString() + this.to.toString(); } public
我有一个小问题。如果你想测试这里的两个 bash 脚本。这是工作 #!/bin/bash N=40 while [ "$N" -gt 0 ] do echo $N N=`expr $N - 1` do
我是一名优秀的程序员,十分优秀!