Class Unicode

All Implemented Interfaces:
Serializable, SourceLocator, Container, Expression, InstructionInfoProvider

public class Unicode extends SystemFunction
This class supports the two functions string-to-codepoints() and codepoints-to-string()
See Also:
  • Field Details

  • Constructor Details

    • Unicode

      public Unicode()
  • Method Details

    • preEvaluate

      public Expression preEvaluate(StaticContext env) throws XPathException
      Pre-evaluate a function at compile time. Functions that do not allow pre-evaluation, or that need access to context information, can override this method.
      Overrides:
      preEvaluate in class FunctionCall
      Throws:
      XPathException
    • evaluateItem

      public Item evaluateItem(XPathContext c) throws XPathException
      Evaluate
      Specified by:
      evaluateItem in interface Expression
      Overrides:
      evaluateItem in class ComputedExpression
      Parameters:
      c - The context in which the expression is to be evaluated
      Returns:
      the node or atomic value that results from evaluating the expression; or null to indicate that the result is an empty sequence
      Throws:
      XPathException - if any dynamic error occurs evaluating the expression
    • iterate

      public SequenceIterator iterate(XPathContext c) throws XPathException
      Description copied from class: ComputedExpression
      Return an Iterator to iterate over the values of a sequence. The value of every expression can be regarded as a sequence, so this method is supported for all expressions. This default implementation handles iteration for expressions that return singleton values: for non-singleton expressions, the subclass must provide its own implementation.
      Specified by:
      iterate in interface Expression
      Overrides:
      iterate in class ComputedExpression
      Parameters:
      c - supplies the context for evaluation
      Returns:
      a SequenceIterator that can be used to iterate over the result of the expression
      Throws:
      XPathException - if any dynamic error occurs evaluating the expression