Package net.sf.saxon.expr.instruct
Class WherePopulated
java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.UnaryExpression
net.sf.saxon.expr.instruct.WherePopulated
- All Implemented Interfaces:
- ExportAgent,- ItemMappingFunction,- Locatable,- IdentityComparable,- Traceable
A compiled xsl:where-populated instruction (formerly xsl:conditional-content).
- 
Field SummaryFields inherited from class net.sf.saxon.expr.ExpressionEFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_COST, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected intDetermine the static cardinality.copy(RebindingMap rebindings) Copy an expression.voidDiagnostic print of expression structure.Make an elaborator for this expressionGet a name identifying the kind of expression, in terms meaningful to a user.intAn implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().protected OperandRoleGet the usage (in terms of streamability analysis) of the single operandGet the (partial) name of a class that supports streaming of this kind of expressionstatic booleanisDeemedEmpty(Item item) Test whether an item is empty according to the definition in the spec for xsl:conditional-contentbooleanAsk whether this expression is an instruction.iterate(XPathContext context) Return an Iterator to iterate over the values of a sequence.Map one item to another item.voidprocess(Outputter output, XPathContext context) Process the instruction, without returning any tail callsMethods inherited from class net.sf.saxon.expr.UnaryExpressioncomputeHashCode, computeSpecialProperties, displayOperator, emitExtraAttributes, equals, getBaseExpression, getItemType, getOperand, operands, optimize, setBaseExpression, toShortString, toString, typeCheckMethods inherited from class net.sf.saxon.expr.ExpressionaddToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, dispatchTailCall, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getExtraProperty, getIntegerBounds, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStaticUType, getTracingTag, hasCompatibleStaticContext, hashCode, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isEqual, isIdentical, isLiftable, isMultiThreaded, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, makeElaborator, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, prepareForStreaming, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, supportsLazyEvaluation, suppressValidation, toPattern, typeCheckChildren, typeError, unordered, verifyParentPointers, withLocationMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.sf.saxon.trace.TraceablegatherProperties
- 
Constructor Details- 
WherePopulatedCreate the instruction- Parameters:
- base- the base expression
 
 
- 
- 
Method Details- 
isInstructionpublic boolean isInstruction()Ask whether this expression is an instruction. In XSLT streamability analysis this is used to distinguish constructs corresponding to XSLT instructions from other constructs.- Overrides:
- isInstructionin class- Expression
- Returns:
- true if this construct originates as an XSLT instruction
 
- 
getOperandRoleGet the usage (in terms of streamability analysis) of the single operand- Specified by:
- getOperandRolein class- UnaryExpression
- Returns:
- the operand usage
 
- 
copyDescription copied from class:ExpressionCopy an expression. This makes a deep copy.- Specified by:
- copyin class- Expression
- Parameters:
- rebindings- a mutable list of (old binding, new binding) pairs that is used to update the bindings held in any local variable references that are copied.
- Returns:
- the copy of the original expression
 
- 
getImplementationMethodpublic int getImplementationMethod()An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process(). This method indicates which of these methods is provided directly. The other methods will always be available indirectly, using an implementation that relies on one of the other methods.- Specified by:
- getImplementationMethodin class- Expression
- Returns:
- the implementation method, for example Expression.ITERATE_METHODorExpression.EVALUATE_METHODorExpression.PROCESS_METHOD
 
- 
computeCardinalityprotected int computeCardinality()Description copied from class:UnaryExpressionDetermine the static cardinality. Default implementation returns the cardinality of the operand- Overrides:
- computeCardinalityin class- UnaryExpression
- Returns:
- the computed cardinality, as one of the values StaticProperty.ALLOWS_ZERO_OR_ONE,StaticProperty.EXACTLY_ONE,StaticProperty.ALLOWS_ONE_OR_MORE,StaticProperty.ALLOWS_ZERO_OR_MORE. May also returnStaticProperty.ALLOWS_ZEROif the result is known to be an empty sequence, orStaticProperty.ALLOWS_MANYif if is known to return a sequence of length two or more.
 
- 
iterateReturn an Iterator to iterate over the values of a sequence. The value of every expression can be regarded as a sequence, so this method is supported for all expressions.- Overrides:
- iteratein class- Expression
- Parameters:
- context- supplies the context for evaluation
- Returns:
- a SequenceIterator that can be used to iterate over the result of the expression
- Throws:
- XPathException- if any dynamic error occurs evaluating the expression
 
- 
processProcess the instruction, without returning any tail calls- Overrides:
- processin class- Expression
- Parameters:
- output- the destination for the result
- context- The dynamic context, giving access to the current node, the current variables, etc.
- Throws:
- XPathException- if a dynamic error occurs
 
- 
mapItemMap one item to another item.- Specified by:
- mapItemin interface- ItemMappingFunction
- Parameters:
- item- The input item to be mapped.
- Returns:
- either the output item, or null.
- Throws:
- XPathException- if a dynamic error occurs
 
- 
isDeemedEmptyTest whether an item is empty according to the definition in the spec for xsl:conditional-content- Parameters:
- item- the item to be tested
- Returns:
- true if it is "empty", for example, an element without children
 
- 
getExpressionNameGet a name identifying the kind of expression, in terms meaningful to a user.- Overrides:
- getExpressionNamein class- Expression
- Returns:
- a name identifying the kind of expression, in terms meaningful to a user. The name will always be in the form of a lexical XML QName, and should usually match the name used in export() output displaying the expression, unless compatibility constraints intervene.
 
- 
exportDescription copied from class:UnaryExpressionDiagnostic print of expression structure. The abstract expression tree is written to the supplied output destination.- Specified by:
- exportin interface- ExportAgent
- Overrides:
- exportin class- UnaryExpression
- Parameters:
- out- the expression presenter used to display the structure
- Throws:
- XPathException- if the export fails, for example if an expression is found that won't work in the target environment.
 
- 
getStreamerNameGet the (partial) name of a class that supports streaming of this kind of expression- Overrides:
- getStreamerNamein class- Expression
- Returns:
- the partial name of a class that can be instantiated to provide streaming support in Saxon-EE, or null if there is no such class
 
- 
getElaboratorDescription copied from class:ExpressionMake an elaborator for this expression- Overrides:
- getElaboratorin class- Expression
- Returns:
- an appropriate Elaborator
 
 
-