Examples of compileQuery()


Examples of org.pdf4j.saxon.query.StaticQueryContext.compileQuery()

            XPathExpression xpexp = xpath.createExpression(args[1]);
            exp = xpexp.getInternalExpression();
        } else if (args[0].equals("xquery")) {
            StaticQueryContext sqc = new StaticQueryContext(config);
            sqc.setBaseURI(new File(args[1]).toURI().toString());
            XQueryExpression xqe = sqc.compileQuery(new FileReader(args[1]));
            exp = xqe.getExpression();
        } else {
            throw new IllegalArgumentException("first argument must be xpath or xquery");
        }
        exp.explain(System.err);
View Full Code Here

Examples of org.zorbaxquery.api.Zorba.compileQuery()

   * @param args
   */
  public static void main(String[] args) {
    Store store = InMemoryStore.getInstance();
    Zorba zorba = Zorba.getInstance(store);
    XQuery xquery = zorba.compileQuery("declare variable $input external; for $x in $input//b return $x");
    xquery.setVariableAsDocument("input", "test.xml", "<a><b>Hallo</b><b>Lukas</b><b>1</b></a>");
    Iterator iter = xquery.iterator();
    iter.open();
    Item item = new Item();
    while(iter.next(item)){
View Full Code Here

Examples of org.zorbaxquery.api.Zorba.compileQuery()

  private void callZorbaCalls(String filename, String value) throws Exception {
    InMemoryStore store = InMemoryStore.getInstance();
    Zorba zorba = Zorba.getInstance(store);
    String query = "declare variable $test external;" + "$test//b";
    XQuery xquery = zorba.compileQuery(query);
    xquery.setVariableAsDocument("test", filename, value);
    Iterator iter = xquery.iterator();
    iter.open();
    Item item = new Item();
    while (iter.next(item)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.