Package net.sf.saxon.expr
Class AttributeGetter.AttributeGetterElaborator
- java.lang.Object
-
- net.sf.saxon.expr.elab.Elaborator
-
- net.sf.saxon.expr.elab.ItemElaborator
-
- net.sf.saxon.expr.AttributeGetter.AttributeGetterElaborator
-
- Enclosing class:
- AttributeGetter
public static class AttributeGetter.AttributeGetterElaborator extends ItemElaborator
Elaborator for an AttributeGetter expression (which gets a named attribute of the context item and returns its value as an untyped atomic value)
-
-
Constructor Summary
Constructors Constructor Description AttributeGetterElaborator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemEvaluator
elaborateForItem()
Get a function that evaluates the underlying expression in the form of aItem
.StringEvaluator
elaborateForString(boolean zeroLengthWhenAbsent)
Get a function that evaluates the underlying expression in the form of a Java string, this being the result of applying fn:string() to the result of the expression; except that if the result of the expression is an empty sequence, the result is "" ifzeroLengthWhenAbsent
is set, or null otherwise.-
Methods inherited from class net.sf.saxon.expr.elab.ItemElaborator
eagerly, elaborateForBoolean, elaborateForPull, elaborateForPush, elaborateForUnicodeString
-
Methods inherited from class net.sf.saxon.expr.elab.Elaborator
elaborateForUpdate, getConfiguration, getExpression, handleNullString, handleNullUnicodeString, handlePossiblyNullString, handlePossiblyNullUnicodeString, lazily, setExpression
-
-
-
-
Method Detail
-
elaborateForItem
public ItemEvaluator elaborateForItem()
Description copied from class:Elaborator
Get a function that evaluates the underlying expression in the form of aItem
. This must only be called for expressions whose result has cardinality zero or one.- Specified by:
elaborateForItem
in classItemElaborator
- Returns:
- an evaluator for the expression that returns an
Item
, or null to represent an empty sequence.
-
elaborateForString
public StringEvaluator elaborateForString(boolean zeroLengthWhenAbsent)
Get a function that evaluates the underlying expression in the form of a Java string, this being the result of applying fn:string() to the result of the expression; except that if the result of the expression is an empty sequence, the result is "" ifzeroLengthWhenAbsent
is set, or null otherwise.- Overrides:
elaborateForString
in classElaborator
- Parameters:
zeroLengthWhenAbsent
- if true, then when the result of the expression is an empty sequence, the result of the StringEvaluator should be a zero-length string. If false, the return value should be null.- Returns:
- an evaluator for the expression that returns a string.
-
-