| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
package net.sf.saxon.expr.accum; |
| 9 |
|
| 10 |
import net.sf.saxon.expr.Expression; |
| 11 |
import net.sf.saxon.expr.instruct.SlotManager; |
| 12 |
import net.sf.saxon.trace.ExpressionPresenter; |
| 13 |
import net.sf.saxon.trans.rules.Rule; |
| 14 |
import net.sf.saxon.trans.rules.RuleTarget; |
| 15 |
import net.sf.saxon.trans.XPathException; |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
public class AccumulatorRule implements RuleTarget { |
| 22 |
|
| 23 |
private Expression newValueExpression; |
| 24 |
private SlotManager stackFrameMap; |
| 25 |
private boolean postDescent; |
| 26 |
private boolean capturing; |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
public AccumulatorRule(Expression newValueExpression, SlotManager stackFrameMap, boolean postDescent) { |
| 36 |
this.newValueExpression = newValueExpression; |
| 37 |
this.stackFrameMap = stackFrameMap; |
| 38 |
this.postDescent = postDescent; |
| 39 |
} |
| 40 |
|
| 41 |
public Expression getNewValueExpression() { |
| 42 |
return newValueExpression; |
| 43 |
} |
| 44 |
|
| 45 |
public void export(ExpressionPresenter out) throws XPathException { |
| 46 |
newValueExpression.export(out); |
| 47 |
} |
| 48 |
|
| 49 |
public SlotManager getStackFrameMap() { |
| 50 |
return stackFrameMap; |
| 51 |
} |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
public void registerRule(Rule rule) { |
| 59 |
|
| 60 |
} |
| 61 |
|
| 62 |
public void setCapturing(boolean capturing) { |
| 63 |
this.capturing = capturing; |
| 64 |
} |
| 65 |
|
| 66 |
public boolean isCapturing() { |
| 67 |
return capturing; |
| 68 |
} |
| 69 |
|
| 70 |
public boolean isPostDescent() { |
| 71 |
return postDescent; |
| 72 |
} |
| 73 |
} |