public class StreamInstr extends Instruction
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD| Constructor and Description |
|---|
StreamInstr(Expression hrefExp,
Expression body,
int validation,
SchemaType type,
List<Accumulator> accumulators) |
| Modifier and Type | Method and Description |
|---|---|
int |
computeDependencies()
Compute the dependencies of an expression, as the union of the
dependencies of its subexpressions.
|
int |
computeSpecialProperties()
Get the static properties of this expression (other than its type).
|
Expression |
copy()
Copy an expression.
|
boolean |
createsNewNodes()
Determine whether this instruction creates new nodes.
|
void |
export(ExpressionPresenter out)
Diagnostic print of expression structure.
|
Inversion |
getAction() |
Expression |
getBody() |
ExpressionCompiler |
getExpressionCompiler()
Return the compiler of the Stream expression
|
String |
getExpressionName()
Get a name identifying the kind of expression, in terms meaningful to a user.
|
Expression |
getHref() |
protected StreamingAdjunct |
getStreamingAdjunct()
Get a class that supports streamed evaluation of this expression
|
SequenceIterator |
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence.
|
Iterable<Operand> |
operands()
Get the immediate sub-expressions of this expression, with information about the relationship
of each expression to its parent expression.
|
Expression |
optimize(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Perform optimisation of an expression and its subexpressions.
|
Expression |
prepareForStreaming(PackageData pack) |
TailCall |
processLeavingTail(XPathContext context)
ProcessLeavingTail: called to do the real work of this instruction.
|
Expression |
promote(PromotionOffer offer)
Offer promotion for this subexpression.
|
protected void |
promoteChildren(PromotionOffer offer)
Handle promotion offers, that is, non-local tree rewrites.
|
void |
setBody(Expression body) |
void |
setHref(Expression href) |
void |
setUsedAccumulators(List<Accumulator> used) |
Expression |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
Perform type checking of an expression and its subexpressions.
|
assembleParams, assembleTunnelParams, computeCardinality, dynamicError, evaluateAsString, evaluateItem, getConstructType, getImplementationMethod, getInstructionName, getInstructionNameCode, getItemType, getNetCost, getSourceLocator, isXSLT, main, process, toStreamingPatternaddToPathMap, adoptChildExpression, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, clearStreamabilityData, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getHostLanguage, getIntegerBounds, getIntrinsicDependencies, getLocation, getObjectName, getPackageData, getParentExpression, getPosture, getPostureAndSweepIfKnown, getProperties, getProperty, getRetainedStaticContext, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStreamability, getSweep, getSystemId, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, makeStreamingAdjunct, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, optimizeForType, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setFiltered, setFlattened, setLocation, setParentExpression, setPostureAndSweep, setRetainedStaticContext, setRetainedStaticContextLocally, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toShortString, toString, typeCheckChildren, typeError, unorderedpublic StreamInstr(Expression hrefExp, Expression body, int validation, SchemaType type, List<Accumulator> accumulators)
public String getExpressionName()
getExpressionName in class Instructionpublic Expression getHref()
public void setHref(Expression href)
public Expression getBody()
public void setBody(Expression body)
public void setUsedAccumulators(List<Accumulator> used)
public Iterable<Operand> operands()
ExpressionIf the expression is a Callable, then it is required that the order of the operands returned by this function is the same as the order of arguments supplied to the corresponding call() method.
operands in class Instructionpublic Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
typeCheck in class Expressionvisitor - an expression visitorcontextInfo - Information available statically about the context item: whether it is (possibly)
absent; its static type; its streaming posture.XPathException - if an error is discovered during this phase
(typically a type error)public Expression optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
This method is called after all references to functions and variables have been resolved to the declaration of the function or variable, and after all type checking has been done.
optimize in class Expressionvisitor - an expression visitorcontextItemType - the static type of "." at the point where this expression is invoked.
The parameter is set to null if it is known statically that the context item will be undefined.
If the type of the context item is not known statically, the argument is set to
Type.ITEM_TYPEXPathException - if an error is discovered during this phase
(typically a type error)public Expression prepareForStreaming(PackageData pack) throws XPathException
XPathExceptionpublic boolean createsNewNodes()
createsNewNodes in class Instructionpublic int computeDependencies()
computeDependencies in class Expressionpublic int computeSpecialProperties()
computeSpecialProperties in class Instructionpublic Inversion getAction()
public void export(ExpressionPresenter out)
export in class Expressionout - the expression presenter used to display the structurepublic Expression copy()
copy in class Expressionpublic Expression promote(PromotionOffer offer) throws XPathException
Expressionpromote in class Expressionoffer - details of the offer, for example the offer to move
expressions that don't depend on the context to an outer level in
the containing expressionXPathException - if any error is detectedprotected void promoteChildren(PromotionOffer offer) throws XPathException
InstructionpromoteChildren in class Instructionoffer - The type of rewrite being offeredXPathException - if an error occurspublic TailCall processLeavingTail(XPathContext context) throws XPathException
processLeavingTail in interface TailCallReturnerprocessLeavingTail in class Instructioncontext - The dynamic context of the transformation, giving access to the current node,
the current variables, etc.XPathException - if a dynamic error occurs during the evaluation
of the instructionpublic SequenceIterator iterate(XPathContext context) throws XPathException
iterate in class Instructioncontext - supplies the context for evaluationXPathException - if any dynamic error occurs evaluating the
expressionpublic ExpressionCompiler getExpressionCompiler()
getExpressionCompiler in class Expressionprotected StreamingAdjunct getStreamingAdjunct()
getStreamingAdjunct in class ExpressionCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.