java.io.Serializable, javax.xml.transform.SourceLocator, LocationProvider, SaxonLocator, EvaluableItem, SequenceIterable, InstructionInfo, org.xml.sax.Locatorpublic class ConditionalSorter extends Expression
EVALUATE_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, staticProperties| Constructor | Description |
|---|---|
ConditionalSorter(Expression condition,
DocumentSorter sorter) |
Create a conditional document sorter
|
| Modifier and Type | Method | Description |
|---|---|---|
protected int |
computeCardinality() |
Compute the static cardinality of this expression
|
protected int |
computeSpecialProperties() |
Compute the special properties of this expression.
|
Expression |
copy() |
Copy an expression.
|
void |
explain(ExpressionPresenter out) |
Diagnostic print of expression structure.
|
int |
getCardinality() |
Determine the static cardinality of the expression.
|
Expression |
getCondition() |
Get the condition under which the nodes need to be sorted
|
DocumentSorter |
getDocumentSorter() |
Get the document sorter, which sorts the nodes if the condition is true
|
int |
getImplementationMethod() |
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
ItemType |
getItemType(TypeHierarchy th) |
Determine the data type of the expression, if possible.
|
SequenceIterator |
iterate(XPathContext context) |
Return an Iterator to iterate over the values of a sequence.
|
java.util.Iterator |
iterateSubExpressions() |
Get the immediate sub-expressions of this expression.
|
Expression |
promote(PromotionOffer offer) |
Offer promotion for this subexpression.
|
boolean |
replaceSubExpression(Expression original,
Expression replacement) |
Replace one subexpression by a replacement subexpression
|
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, display, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, findParentOf, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getExecutable, getHostLanguage, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, isUpdatingExpression, iterateEvents, markTailFunctionCalls, optimize, process, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, simplify, staticTypeCheck, suppressValidation, toString, typeCheck, typeErrorpublic ConditionalSorter(Expression condition, DocumentSorter sorter)
condition - the conditional expressionsorter - the sorting expressionpublic Expression getCondition()
public DocumentSorter getDocumentSorter()
public int getCardinality()
getCardinality in class Expressionprotected int computeSpecialProperties()
StaticProperty. The "special" properties are properties
other than cardinality and dependencies, and most of them relate to properties of node sequences, for
example whether the nodes are in document order.computeSpecialProperties in class Expressionpublic int getImplementationMethod()
getImplementationMethod in class ExpressionExpression.ITERATE_METHOD or Expression.EVALUATE_METHOD or
Expression.PROCESS_METHODpublic java.util.Iterator iterateSubExpressions()
iterateSubExpressions in class Expressionpublic boolean replaceSubExpression(Expression original, Expression replacement)
replaceSubExpression in class Expressionoriginal - the original subexpressionreplacement - the replacement subexpressionprotected int computeCardinality()
computeCardinality in class ExpressionStaticProperty.ALLOWS_ZERO_OR_ONE,
StaticProperty.EXACTLY_ONE, StaticProperty.ALLOWS_ONE_OR_MORE,
StaticProperty.ALLOWS_ZERO_OR_MOREpublic Expression copy()
copy in class Expressionpublic void explain(ExpressionPresenter out)
explain in class Expressionout - the expression presenter used to display the structurepublic ItemType getItemType(TypeHierarchy th)
This method should always return a result, though it may be the best approximation that is available at the time.
getItemType in class Expressionth - the type hierarchy cachepublic Expression promote(PromotionOffer offer) throws XPathException
promote 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 detectedpublic SequenceIterator iterate(XPathContext context) throws XPathException
iterate in interface SequenceIterableiterate in class Expressioncontext - supplies the context for evaluationXPathException - if any dynamic error occurs evaluating the
expression