public class StreamInstr extends Instruction
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, WATCH_METHOD
Constructor and Description |
---|
StreamInstr(Expression hrefExp,
Expression body,
int validation,
SchemaType type,
String baseURI) |
Modifier and Type | Method and Description |
---|---|
int |
computeDependencies()
Compute the dependencies of an expression, as the union of the
dependencies of its subexpressions.
|
Expression |
copy()
Copy an expression.
|
boolean |
createsNewNodes()
Determine whether this instruction creates new nodes.
|
void |
explain(ExpressionPresenter out)
Diagnostic print of expression structure.
|
Inversion |
getAction() |
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 |
getHrefExpression()
Get the expression in the href attribute value template
|
protected StreamingAdjunct |
getStreamingAdjunct()
Get a class that supports streamed evaluation of this expression
|
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.
|
TailCall |
processLeavingTail(XPathContext context)
ProcessLeavingTail: called to do the real work of this instruction.
|
protected void |
promoteInst(PromotionOffer offer)
Handle promotion offers, that is, non-local tree rewrites.
|
Expression |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
Perform type checking of an expression and its subexpressions.
|
assembleParams, assembleTunnelParams, computeCardinality, computeSpecialProperties, dynamicError, evaluateAsString, evaluateItem, getConstructType, getImplementationMethod, getInstructionName, getInstructionNameCode, getItemType, getIteratorFromProcessMethod, getSourceLocator, isXSLT, iterate, process, promote, toStreamingPattern
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, clearStreamabilityData, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getConfiguration, getContainer, getDependencies, getEvaluationMethod, getHostLanguage, getIntegerBounds, getIntrinsicDependencies, getLineNumber, getLocationId, getObjectName, getPosture, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getStreamability, getSweep, getSystemId, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isIdentical, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, makeStreamingAdjunct, markTailFunctionCalls, operandList, replaceOperand, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, setPostureAndSweep, simplify, staticTypeCheck, suppressValidation, toPattern, toShortString, toString, typeError, unordered
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getColumnNumber, getLineNumber, getPublicId, getSystemId
public StreamInstr(Expression hrefExp, Expression body, int validation, SchemaType type, String baseURI)
public String getExpressionName()
getExpressionName
in class Instruction
public Expression getHrefExpression()
public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
typeCheck
in class Expression
visitor
- 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 Expression
visitor
- 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_TYPE
XPathException
- if an error is discovered during this phase
(typically a type error)public boolean createsNewNodes()
createsNewNodes
in class Instruction
public Iterable<Operand> operands()
operands
in class Expression
public int computeDependencies()
computeDependencies
in class Expression
public Inversion getAction()
public void explain(ExpressionPresenter out)
explain
in class Expression
out
- the expression presenter used to display the structurepublic Expression copy()
copy
in class Expression
protected void promoteInst(PromotionOffer offer) throws XPathException
Instruction
promoteInst
in class Instruction
offer
- The type of rewrite being offeredXPathException
- if an error occurspublic TailCall processLeavingTail(XPathContext context) throws XPathException
processLeavingTail
in interface TailCallReturner
processLeavingTail
in class Instruction
context
- 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 ExpressionCompiler getExpressionCompiler()
getExpressionCompiler
in class Expression
protected StreamingAdjunct getStreamingAdjunct()
getStreamingAdjunct
in class Expression
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.