net.sf.saxon.expr

Class PromoteToDouble

public class PromoteToDouble extends NumericPromoter

Expression that performs numeric promotion to xs:double
Constructor Summary
PromoteToDouble(Expression exp)
Method Summary
Expressioncopy()
Copy an expression.
ItemTypegetItemType(TypeHierarchy th)
Determine the data type of the items returned by the expression, if possible
protected AtomicValuepromote(AtomicValue value, XPathContext context)
Perform the promotion

Constructor Detail

PromoteToDouble

public PromoteToDouble(Expression exp)

Method Detail

copy

public Expression copy()
Copy an expression. This makes a deep copy.

Returns: the copy of the original expression

getItemType

public ItemType getItemType(TypeHierarchy th)
Determine the data type of the items returned by the expression, if possible

Parameters: th the type hierarchy cache

Returns: a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER, Type.NODE, or Type.ITEM (meaning not known in advance)

promote

protected AtomicValue promote(AtomicValue value, XPathContext context)
Perform the promotion

Parameters: value the numeric or untyped atomic value to be promoted context the XPath dynamic evaluation context

Returns: the value that results from the promotion