public class CombinedChoice extends Object
The choice tests themselves are cast in a WhichOf expression, which returns the number of the first case that yields true. This is then used to index into the appropriate rule for action.
Under next-match operation we have recorded a hash value for each of the rules associated with this choice set. A simple lookup finds the index of the last rule executed, which is used as the starting point for the WhichOf test.
Constructor and Description |
---|
CombinedChoice(ModeExperimentalChoice mode,
Rule chain,
int type) |
CombinedChoice(ModeExperimentalChoice mode,
Rule chain,
Rule unnamed,
int type) |
CombinedChoice(ModeExperimentalChoice mode,
Rule chain,
Rule unnamed,
int type,
int fingerprint) |
CombinedChoice(ModeExperimentalChoice mode,
Rule chain,
Rule unnamed,
Rule generic,
int type,
int fingerprint) |
Modifier and Type | Method and Description |
---|---|
void |
explain(ExpressionPresenter out) |
void |
findPreconditions(PatternOptimizationEE patternOptimization) |
Rule |
getChoice(Item item,
int min,
int max,
XPathContext context) |
Rule |
getChoice(Item item,
Rule currentRule,
XPathContext context) |
Rule |
getChoice(Item item,
XPathContext context) |
int |
getType() |
XPathContextMajor |
makeEvalContext(Item item,
XPathContext context) |
int |
size() |
public CombinedChoice(ModeExperimentalChoice mode, Rule chain, int type)
public CombinedChoice(ModeExperimentalChoice mode, Rule chain, Rule unnamed, int type)
public CombinedChoice(ModeExperimentalChoice mode, Rule chain, Rule unnamed, int type, int fingerprint)
public CombinedChoice(ModeExperimentalChoice mode, Rule chain, Rule unnamed, Rule generic, int type, int fingerprint)
public int getType()
public int size()
public XPathContextMajor makeEvalContext(Item item, XPathContext context) throws XPathException
XPathException
public Rule getChoice(Item item, XPathContext context) throws XPathException
XPathException
public Rule getChoice(Item item, Rule currentRule, XPathContext context) throws XPathException
XPathException
public Rule getChoice(Item item, int min, int max, XPathContext context) throws XPathException
XPathException
public void findPreconditions(PatternOptimizationEE patternOptimization)
public void explain(ExpressionPresenter out)
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.