Class ElementToMapPlan

All Implemented Interfaces:
Callable, IFunctionWithRetainedParameterNames, FunctionItem, GroundedValue, Item, Sequence

public class ElementToMapPlan extends SystemFunction
Implementation of the fn:element-to-map-plan function proposed for 4.0
  • Field Details

    • ELEMENT_LAYOUT

      public static ItemType ELEMENT_LAYOUT
    • ATTRIBUTE_LAYOUT

      public static ItemType ATTRIBUTE_LAYOUT
    • RETURN_TYPE

      public static ItemType RETURN_TYPE
  • Constructor Details

    • ElementToMapPlan

      public ElementToMapPlan()
  • Method Details

    • call

      public MapItem call(XPathContext context, Sequence[] arguments) throws XPathException
      Evaluate the function call
      Parameters:
      context - the dynamic evaluation context
      arguments - the values of the arguments, supplied as Sequences
      Returns:
      the result of the evaluation, in the form of a Sequence
      Throws:
      XPathException - if a dynamic error occurs during the evaluation of the expression
    • getElementProperties

      public static int getElementProperties(NodeInfo element, int properties)
      Get the properties of an element node.
      Parameters:
      element - The element node.
      properties - Zero if evaluating for this element on its own. Otherwise, when looking for common properties of all elements sharing the same name, the properties already gathered for other elements having the same name.
      Returns:
      the properties of this element, or, the properties shared by this element and others having the same element name. The returned value consists of a set of flags in the top 10 bits indicating for example whether the element has attributes, child element nodes, whitespace and/or non-whitespace text nodes; and in the bottom 20 bits, where all the children of an element have the same name, the fingerprint of the child element name.
    • getInferredLayout

      public static String getInferredLayout(int properties)