Class NormalizeSpace_1

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

public class NormalizeSpace_1 extends ScalarSystemFunction
Implement the XPath normalize-space() function
  • Constructor Details

    • NormalizeSpace_1

      public NormalizeSpace_1()
  • Method Details

    • 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
    • normalizeSpace

      public static UnicodeString normalizeSpace(UnicodeString sv)
    • makeFunctionCall

      public Expression makeFunctionCall(Expression[] arguments)
      Description copied from class: SystemFunction
      Make an expression that either calls this function, or that is equivalent to a call on this function
      Overrides:
      makeFunctionCall in class ScalarSystemFunction
      Parameters:
      arguments - the supplied arguments to the function call
      Returns:
      either a function call on this function, or an expression that delivers the same result
    • getElaborator

      public Elaborator getElaborator()
      Make an elaborator for a system function call on this function
      Overrides:
      getElaborator in class SystemFunction
      Returns:
      a suitable elaborator; or null if no custom elaborator is available