public final class FirstItemExpression extends SingleItemFilter
operandEFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, INHERITED_CONTEXT, INSPECTION_CONTEXT, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, NAVIGATION_CONTEXT, NODE_VALUE_CONTEXT, PROCESS_METHOD, PUSH_SELECTION, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, W3C_CONSUMING, W3C_FREE_RANGING, W3C_GROUP_CONSUMING, W3C_MOTIONLESS, WATCH_METHOD| Modifier and Type | Method and Description |
|---|---|
Expression |
copy()
Copy an expression.
|
Item |
evaluateItem(XPathContext context)
Evaluate the expression
|
ExpressionCompiler |
getExpressionCompiler()
Return the compiler of the FirstItem expression
|
String |
getExpressionName()
Get a name identifying the kind of expression, in terms meaningful to a user.
|
int |
getStreamability(int syntacticContext,
boolean allowExtensions,
List<String> reasons)
Get the "sweep" of this expression as defined in the W3C streamability specifications.
|
FirstItemExpressionAdjunct |
getStreamingAdjunct()
Get a class that supports streamed evaluation of this expression
|
static Expression |
makeFirstItemExpression(Expression base)
Static factory method
|
Pattern |
toPattern(Configuration config,
boolean is30)
Convert this expression to an equivalent XSLT pattern
|
Pattern |
toStreamingPattern(Configuration config,
List<String> reasonForFailure)
Convert this expression to a streaming pattern (a pattern used internally to match nodes during
push processing of an event stream)
|
computeCardinality, optimize, promotecomputeSpecialProperties, displayOperator, equals, explain, getBaseExpression, getItemType, hashCode, iterateSubExpressions, replaceSubExpression, simplify, toString, typeCheckaddToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getEvaluationMethod, getExecutable, getHostLanguage, getImplementationMethod, getIntegerBounds, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasVariableBinding, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterate, iterateEvents, iterateSubExpressionInfo, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, typeErrorpublic static Expression makeFirstItemExpression(Expression base)
base - A sequence expression denoting sequence whose first item is to be returnedpublic Expression copy()
copy in class Expressionpublic Pattern toPattern(Configuration config, boolean is30) throws XPathException
toPattern in class Expressionconfig - the Saxon configurationis30 - true if this is XSLT 3.0XPathException - if conversion is not possiblepublic Item evaluateItem(XPathContext context) throws XPathException
evaluateItem in class Expressioncontext - The context in which the expression is to be evaluatedXPathException - if any dynamic error occurs evaluating the
expressionpublic String getExpressionName()
ExpressiongetExpressionName in class Expressionpublic ExpressionCompiler getExpressionCompiler()
getExpressionCompiler in class Expressionpublic int getStreamability(int syntacticContext,
boolean allowExtensions,
List<String> reasons)
ExpressiongetStreamability in class ExpressionsyntacticContext - one of the values Expression.NAVIGATION_CONTEXT,
Expression.NODE_VALUE_CONTEXT, Expression.INHERITED_CONTEXT, Expression.INSPECTION_CONTEXTallowExtensions - if false, the definition of "guaranteed streamability" in the
W3C specification is used. If true, Saxon extensions are permitted, which make somereasons - the caller may supply a list, in which case the implementation may add to this
list a message explaining why the construct is not streamable, suitable for inclusion in an
error message.Expression.W3C_MOTIONLESS, Expression.W3C_CONSUMING,
Expression.W3C_GROUP_CONSUMING, Expression.W3C_FREE_RANGINGpublic FirstItemExpressionAdjunct getStreamingAdjunct()
ExpressiongetStreamingAdjunct in class Expressionpublic Pattern toStreamingPattern(Configuration config, List<String> reasonForFailure)
toStreamingPattern in class Expressionconfig - the Saxon configurationreasonForFailure - a list which will be populated with messages giving reasons why the
expression cannot be convertedCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.