Class NamespaceForPrefix

All Implemented Interfaces:
Serializable, SourceLocator, LocationProvider, SaxonLocator, CallableExpression, InstructionInfo, Locator

public class NamespaceForPrefix extends SystemFunction implements CallableExpression
This class supports the function namespace-uri-for-prefix()
See Also:
  • Constructor Details

    • NamespaceForPrefix

      public NamespaceForPrefix()
  • Method Details

    • evaluateItem

      public Item evaluateItem(XPathContext context) throws XPathException
      Evaluate the function
      Overrides:
      evaluateItem in class Expression
      Parameters:
      context - the XPath dynamic context
      Returns:
      the URI corresponding to the prefix supplied in the first argument, or null if the prefix is not in scope
      Throws:
      XPathException - if a failure occurs evaluating the arguments
    • call

      public SequenceIterator call(SequenceIterator[] arguments, XPathContext context) throws XPathException
      Evaluate the expression
      Specified by:
      call in interface CallableExpression
      Parameters:
      arguments - the values of the arguments, supplied as SequenceIterators
      context - the dynamic evaluation context
      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