Class ITER_XPath

  • All Implemented Interfaces:

    public class ITER_XPath
    extends IteratorFunctionBase
    Iterator function iter:XPath extracts parts of a XML document, using XPath queries.

    See Live example

    • Param 1: (xml): the URI of the XML document (a URI), or the XML document itself (a String);
    • Param 2: (xPath) the XPath query;
    • Param 3 .. N : (auxXPath ... ) other XPath queries, which will be executed over the results of the execution of xPath, and provide one result each.
    The following variables may be bound:
    • Output 1: (literal) matched XML element, encoded as a boolean, float, double, integer, string, as it best fits;
    • Output 2 .. N-1: (string) result of the execution of the auxiliary XPath queries on Output 1, encoded as a boolean, float, double, integer, string, as it best fits;
    • Output N: (integer) the position of the result in the list;
    • Output N+1: (boolean) true if this result has a next result in the list.
    Output N and N+1 can be used to generate RDF lists from the input, but the use of keyword LIST( ?var ) as the object of a triple pattern covers most cases more elegantly.
    Maxime Lefrançois
    • Field Summary

      Modifier and Type Field Description
      static java.lang.String URI  
    • Constructor Summary

      Constructor Description
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void checkBuild​(ExprList args)
      Partially checks if the iterator function can be executed with the given arguments.
      java.util.List<java.util.List<NodeValue>> exec​(java.util.List<NodeValue> args)
      IteratorFunction call to a list of evaluated argument values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait