Class FuncId

All Implemented Interfaces:
SourceLocator, ExpressionNode, XPathVisitable

public class FuncId extends FunctionOneArg
Execute the Id() function.
  • Constructor Details

    • FuncId

      public FuncId()
  • Method Details

    • getNodesByID

      private List<String> getNodesByID(XPathContext xctxt, int docContext, String refval, List<String> usedrefs, NodeSetDTM nodeSet, boolean mayBeMore)
      Fill in a list with nodes that match a space delimited list if ID ID references.
      Parameters:
      xctxt - The runtime XPath context.
      docContext - The document where the nodes are being looked for.
      refval - A space delimited list of ID references.
      usedrefs - List of references for which nodes were found.
      nodeSet - Node set where the nodes will be added to.
      mayBeMore - true if there is another set of nodes to be looked for.
      Returns:
      The usedrefs value.
    • execute

      public XObject execute(XPathContext xctxt) throws TransformerException
      Execute an expression in the XPath runtime context, and return the result of the expression.
      Overrides:
      execute in class Function
      Parameters:
      xctxt - The XPath runtime context.
      Returns:
      The result of the expression in the form of a XObject.
      Throws:
      TransformerException - if a runtime exception occurs.