Class XNodeCoercionPlan

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

public final class XNodeCoercionPlan extends CoercionPlan
A coercion plan represents a process for implementing the coercion rules for converting a supplied value to a given required type. This class handles the case where the required type is xnode(). The only coercion available to XNode is from a JNode, in the case where the content property of the XNode is a JNode
  • Field Details

  • Constructor Details

    • XNodeCoercionPlan

      public XNodeCoercionPlan()
  • Method Details

    • getInstance

      public static XNodeCoercionPlan getInstance()
    • 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 value to be converted
      requiredType - the required array 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