Class GenerateId_1

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

public class GenerateId_1 extends ScalarSystemFunction
This class supports the generate-id() function with one argument
  • Constructor Details

    • GenerateId_1

      public GenerateId_1()
  • Method Details

    • getSpecialProperties

      public int getSpecialProperties(Expression[] arguments)
      Determine the special properties of this expression. The generate-id() function is a special case: it is considered creative if its operand is creative, so that generate-id(f()) is not taken out of a loop
      Overrides:
      getSpecialProperties in class SystemFunction
      Parameters:
      arguments - the expressions supplied as arguments in the function call
      Returns:
      the properties
    • resultWhenEmpty

      public Sequence resultWhenEmpty()
      Description copied from class: ScalarSystemFunction
      Method that may be supplied in subclasses, to indicate the result that is returned when an empty sequence is supplied as the argument value. The default is to return the empty sequence
      Overrides:
      resultWhenEmpty in class ScalarSystemFunction
      Returns:
      the result of evaluation when the supplied argument is an empty sequence
    • evaluate

      public AtomicValue evaluate(Item arg, XPathContext context) throws XPathException
      Description copied from class: ScalarSystemFunction
      Abstract method that must be supplied in subclasses to perform the evaluation
      Specified by:
      evaluate in class ScalarSystemFunction
      Parameters:
      arg - the supplied argument
      context - the dynamic context
      Returns:
      the result of the evaluation
      Throws:
      XPathException - if a dynamic error occurs
    • generateId

      public static StringValue generateId(NodeInfo node)
    • getElaborator

      public Elaborator getElaborator()
      Make an elaborator for this expression
      Overrides:
      getElaborator in class SystemFunction
      Returns:
      a suitable elaborator