Class ItemCheckingPlan

java.lang.Object
net.sf.saxon.type.coercion.CoercionPlan
net.sf.saxon.type.coercion.ItemCheckingPlan

public final class ItemCheckingPlan extends CoercionPlan
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 Details

  • 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:
      coerceItem in class CoercionPlan
      Parameters:
      item - the item to be (not) coerced
      requiredType - the required type
      request - 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