Class Idref

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

public class Idref extends SystemFunction implements IContextAccessorFunction
  • Constructor Details

    • Idref

      public Idref()
  • Method Details

    • dependsOnContext

      public boolean dependsOnContext()
      Description copied from interface: IContextAccessorFunction
      Ask whether this function is actually dependent on the dynamic context
      Specified by:
      dependsOnContext in interface IContextAccessorFunction
      Returns:
      true if the function cannot be used unless the dynamic context is first bound
    • getSpecialProperties

      public int getSpecialProperties(Expression[] arguments)
      Get the static properties of this expression (other than its type). The result is bit-significant. These properties are used for optimizations. In general, if property bit is set, it is true, but if it is unset, the value is unknown.
      Overrides:
      getSpecialProperties in class SystemFunction
      Parameters:
      arguments - the actual arguments to the function call
      Returns:
      the properties
    • getIdrefMultiple

      public static SequenceIterator getIdrefMultiple(TreeInfo doc, SequenceIterator keys, XPathContext context) throws XPathException
      Get the result when multiple idref values are supplied. Note this is also called from compiled XQuery code.
      Parameters:
      doc - the document to be searched
      keys - the idref values supplied
      context - the dynamic execution context
      Returns:
      iterator over the result of the function
      Throws:
      XPathException - if a dynamic error occurs
    • call

      public Sequence call(XPathContext context, Sequence[] arguments) throws XPathException
      Evaluate the expression
      Specified by:
      call in interface Callable
      Parameters:
      context - the dynamic evaluation context
      arguments - the values of the arguments, supplied as SequenceIterators
      Returns:
      the result of the evaluation, in the form of a SequenceIterator
      Throws:
      XPathException - if a dynamic error occurs during the evaluation of the expression
    • bindContext

      public FunctionItem bindContext(XPathContext context) throws XPathException
      Bind context information to appear as part of the function's closure. If this method has been called, the supplied context will be used in preference to the context at the point where the function is actually called.
      Specified by:
      bindContext in interface IContextAccessorFunction
      Parameters:
      context - the context to which the function applies. Must not be null.
      Throws:
      XPathException