Package net.sf.saxon.type.coercion
Class ItemCheckingPlan
java.lang.Object
net.sf.saxon.type.coercion.CoercionPlan
net.sf.saxon.type.coercion.ItemCheckingPlan
A coercion plan represents a process for implementing the coercion rules for converting
a supplied value to a given required type. The
ItemCheckingPlan is used for types
such as item(), node(), or map(*) where no item-level coercion take place, but where the
only required action is to check that the items have the correct type and raise an
error if not.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncoerceItem(Item item, ItemType requiredType, CoercionRequest request) Apply the coercion rules (function conversion rules) to a value, given a required type.Methods inherited from class net.sf.saxon.type.coercion.CoercionPlan
check, coerceSequence, coercionError
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ItemCheckingPlan
public ItemCheckingPlan()
-
-
Method Details
-
coerceItem
public GroundedValue coerceItem(Item item, ItemType requiredType, CoercionRequest request) throws XPathException Apply the coercion rules (function conversion rules) to a value, given a required type.- Specified by:
coerceItemin classCoercionPlan- Parameters:
item- the item to be (not) coercedrequiredType- the required typerequest- the input to the coercion- Returns:
- the converted value (possibly as a lazily-evaluated sequence)
- Throws:
XPathException- if the value cannot be converted to the required type
-