|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.expr.XPathContextMinor
net.sf.saxon.expr.XPathContextMajor
public class XPathContextMajor
This class represents a "major context" in which an XPath expression is evaluated: a "major context" object allows all aspects of the dynamic context to change, whereas a "minor context" only allows changes to the focus and the destination for push output.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.sf.saxon.expr.XPathContextMinor |
|---|
XPathContextMinor.LastValue |
| Field Summary |
|---|
| Fields inherited from class net.sf.saxon.expr.XPathContextMinor |
|---|
stackFrame |
| Constructor Summary | |
|---|---|
XPathContextMajor(Controller controller)
Constructor should only be called by the Controller, which acts as a XPathContext factory. |
|
XPathContextMajor(Item item,
Configuration config)
Deprecated. since 9.0 - use XPathContextMajor(Item, Executable) |
|
XPathContextMajor(Item item,
Executable exec)
Constructor for use in free-standing Java applications. |
|
| Method Summary | |
|---|---|
ValueRepresentation[] |
getAllVariableValues()
Get a all the variables in the stack frame |
GroupIterator |
getCurrentGroupIterator()
Get the current group iterator. |
Mode |
getCurrentMode()
Get the current mode. |
RegexIterator |
getCurrentRegexIterator()
Get the current regex iterator. |
Rule |
getCurrentTemplateRule()
Get the current template. |
ParameterSet |
getLocalParameters()
Get the local parameters for the current template call. |
InstructionInfo |
getOrigin()
Get information about the creating expression or other construct. |
int |
getOriginatingConstructType()
Get the type of location from which this context was created. |
UserFunction |
getTailCallFunction()
Determine whether the body of a function is to be repeated, due to tail-recursive function calls |
ParameterSet |
getTunnelParameters()
Get the tunnel parameters for the current template call. |
boolean |
isTemporaryOutputState()
Ask whether the XSLT output state is "temporary" or "final" |
XPathContextMajor |
newContext()
Construct a new context as a copy of another. |
static XPathContextMajor |
newContext(XPathContextMinor prev)
Create a new "major" context (one that is capable of holding a stack frame with local variables |
static XPathContextMajor |
newThreadContext(XPathContextMinor prev)
|
void |
openStackFrame(int numberOfVariables)
Create a new stack frame large enough to hold a given number of local variables, for which no stack frame map is available. |
void |
openStackFrame(SlotManager map)
Create a new stack frame for local variables, using the supplied SlotManager to define the allocation of slots to individual variables |
void |
requestTailCall(UserFunction fn,
ValueRepresentation[] variables)
Reset the local stack frame. |
void |
resetAllVariableValues(ValueRepresentation[] values)
Overwrite all the variables in the stack frame |
void |
resetParameterValues(ValueRepresentation[] values)
Overwrite all the parameters in the stack frame. |
void |
resetStackFrameMap(SlotManager map,
int numberOfParams)
Reset the stack frame variable map, while reusing the StackFrame object itself. |
void |
setCurrentGroupIterator(GroupIterator iterator)
Set the current grouping iterator. |
void |
setCurrentMode(Mode mode)
Set the current mode. |
void |
setCurrentRegexIterator(RegexIterator currentRegexIterator)
Set the current regex iterator. |
void |
setCurrentTemplateRule(Rule rule)
Set the current template. |
void |
setLocalParameters(ParameterSet localParameters)
Set the local parameters for the current template call. |
void |
setOrigin(InstructionInfo expr)
Set the creating expression (for use in diagnostics). |
void |
setOriginatingConstructType(int loc)
Set the type of creating expression (for use in diagnostics). |
void |
setStackFrame(SlotManager map,
ValueRepresentation[] variables)
Set the local stack frame. |
void |
setTemporaryOutputState(boolean temporary)
Set the XSLT output state to "temporary" or "final" |
void |
setTunnelParameters(ParameterSet tunnelParameters)
Set the tunnel parameters for the current template call. |
int |
useLocalParameter(int parameterId,
int slotNumber,
boolean isTunnel)
Use local parameter. |
| Methods inherited from class net.sf.saxon.expr.XPathContextMinor |
|---|
changeOutputDestination, evaluateLocalVariable, getCaller, getCollation, getConfiguration, getContextItem, getController, getCurrentDateTime, getCurrentException, getCurrentIterator, getImplicitTimezone, getLast, getNameChecker, getNamePool, getReceiver, getStackFrame, isAtLast, iterateStackFrames, newCleanContext, newMinorContext, setCaller, setCurrentException, setCurrentIterator, setLocalVariable, setReceiver |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XPathContextMajor(Controller controller)
controller - the Controller
public XPathContextMajor(Item item,
Executable exec)
item - the item to use as the initial context item. If this is null,
the comtext item is initially undefined (which will cause a dynamic error
if it is referenced).exec - the Executable
public XPathContextMajor(Item item,
Configuration config)
XPathContextMajor(Item, Executable)
item - the item to use as the initial context item. If this is null,
the comtext item is initially undefined (which will cause a dynamic error
if it is referenced).config - the Saxon Configuration| Method Detail |
|---|
public XPathContextMajor newContext()
newContext in interface XPathContextnewContext in class XPathContextMinorpublic static XPathContextMajor newContext(XPathContextMinor prev)
prev - the previous context (the one causing the new context to be created)
public static XPathContextMajor newThreadContext(XPathContextMinor prev)
public ParameterSet getLocalParameters()
getLocalParameters in interface XPathContextgetLocalParameters in class XPathContextMinorpublic void setLocalParameters(ParameterSet localParameters)
localParameters - the supplied parameterspublic ParameterSet getTunnelParameters()
getTunnelParameters in interface XPathContextgetTunnelParameters in class XPathContextMinorpublic void setTunnelParameters(ParameterSet tunnelParameters)
tunnelParameters - the supplied tunnel parameterspublic void setOrigin(InstructionInfo expr)
Expression, allowing information
about the calling instruction to be obtained, or null.
public void setOriginatingConstructType(int loc)
setOrigin(net.sf.saxon.trace.InstructionInfo) should be called.
loc - The originating location: the argument must be one of the integer constants in class
Locationpublic int getOriginatingConstructType()
public InstructionInfo getOrigin()
public void setStackFrame(SlotManager map,
ValueRepresentation[] variables)
map - the SlotManager, which holds static details of the allocation of variables to slotsvariables - the array of "slots" to hold the actual variable values. This array will be
copied if it is too small to hold all the variables defined in the SlotManager
public void resetStackFrameMap(SlotManager map,
int numberOfParams)
map - the SlotManager representing the stack frame contentsnumberOfParams - the number of parameters required on the new stack framepublic ValueRepresentation[] getAllVariableValues()
public void resetAllVariableValues(ValueRepresentation[] values)
values - an array holding all the variables, each referenceable by its slot number;
the caller must ensure this is the correct length (and valid in other ways)public void resetParameterValues(ValueRepresentation[] values)
values - an array holding all the parameters, each referenceable by its slot number;
the caller must ensure this is the correct length (and valid in other ways)
public void requestTailCall(UserFunction fn,
ValueRepresentation[] variables)
fn - the user function being called using tail recursionvariables - the parameter to be supplied to the user functionpublic UserFunction getTailCallFunction()
public void openStackFrame(SlotManager map)
map - the SlotManager for the new stack framepublic void openStackFrame(int numberOfVariables)
numberOfVariables - The number of local variables to be accommodated.public void setCurrentMode(Mode mode)
mode - the new current modepublic Mode getCurrentMode()
getCurrentMode in interface XPathContextgetCurrentMode in class XPathContextMinorpublic void setCurrentTemplateRule(Rule rule)
rule - the current template rule, or null to indicate that there is no current template rulepublic Rule getCurrentTemplateRule()
getCurrentTemplateRule in interface XPathContextgetCurrentTemplateRule in class XPathContextMinorpublic void setCurrentGroupIterator(GroupIterator iterator)
iterator - the new current GroupIteratorpublic GroupIterator getCurrentGroupIterator()
getCurrentGroupIterator in interface XPathContextgetCurrentGroupIterator in class XPathContextMinorpublic void setCurrentRegexIterator(RegexIterator currentRegexIterator)
currentRegexIterator - the current regex iteratorpublic RegexIterator getCurrentRegexIterator()
getCurrentRegexIterator in interface XPathContextgetCurrentRegexIterator in class XPathContextMinor
public int useLocalParameter(int parameterId,
int slotNumber,
boolean isTunnel)
throws XPathException
useLocalParameter in interface XPathContextuseLocalParameter in class XPathContextMinorparameterId - slotNumber - isTunnel - True if a tunnel parameter is required, else false @return ParameterSet.NOT_SUPPLIED, ParameterSet.SUPPLIED, or ParameterSet.SUPPLIED_AND_CHECKED
XPathExceptionpublic void setTemporaryOutputState(boolean temporary)
temporary - set to true to set temporary output state; false to set final output statepublic boolean isTemporaryOutputState()
isTemporaryOutputState in interface XPathContextisTemporaryOutputState in class XPathContextMinor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||