Examples of declareVariable()


Examples of org.exist.xmldb.XPathQueryServiceImpl.declareVariable()

                (XPathQueryService) testCollection.getService(
                "XPathQueryService",
                "1.0");

        final XPathQueryServiceImpl service2 = (XPathQueryServiceImpl) service;
        service2.declareVariable("name", "MONTAGUE");
        service2.declareVariable("name", "43");

        //ResourceSet result = service.query("//SPEECH[SPEAKER=$name]");
        ResourceSet result = service2.query( doc, "//item[stock=$name]");
View Full Code Here

Examples of org.exist.xmldb.XQueryService.declareVariable()

                service.setProperty( OutputKeys.ENCODING, "UTF-8" );

                for( final Variable var : variables ) {
                    System.out.println( "Name: " + var.name );
                    System.out.println( "Value: " + var.value );
                    service.declareVariable( var.name, var.value );
                }

                ResourceSet results = null;
                Source      source  = null;
View Full Code Here

Examples of org.exist.xquery.XQueryContext.declareVariable()

                   

                    for(final Entry param : params.entrySet()) {
                        final String key = (String)param.getKey();
                        final String value = (String)param.getValue();
                        context.declareVariable( bindingPrefix + ":" + key, new StringValue(value));
                    }
                }

                xquery.execute(compiled, null);
View Full Code Here

Examples of org.exist.xquery.functions.session.SessionModule.declareVariable()

     
      final JavaObjectValue reqValue = (JavaObjectValue)reqVar.getValue().itemAt( 0) ;
     
      if( reqValue.getObject() instanceof RequestWrapper ) {
        session = ((RequestWrapper)reqValue.getObject()).getSession( true );
        var = sessionModule.declareVariable( SessionModule.SESSION_VAR, session );
      }
    }
    return( var );
  }
}
View Full Code Here

Examples of org.pdf4j.saxon.sxpath.IndependentContext.declareVariable()

            env.setNamespaces(node);
        }
        pexpr.expStaticContext = env;
        pexpr.variables = new XPathVariable[10];
        for (int i=1; i<10; i++) {
            pexpr.variables[i-1] = env.declareVariable("", "p"+i);
        }

        Expression expr;
        try {
            expr = ExpressionTool.make(exprText, env, 0, Token.EOF, 1, false);
View Full Code Here

Examples of org.rascalmpl.interpreter.env.Environment.declareVariable()

 
                  if(!r.getType().isSubtypeOf(kwType)) {
                      throw new UnexpectedKeywordArgumentType(kwparam, kwType, r.getType(), ctx.getCurrentAST());
                  }
 
                  env.declareVariable(kwType, kwparam);
                  env.storeVariable(kwparam, ResultFactory.makeResult(kwType, r, ctx));
              }
              else {
                  env.declareVariable(kwType, kwparam);
                  Expression def = getKeywordParameterDefaults().get(kwparam);
View Full Code Here

Examples of org.rascalmpl.interpreter.env.Environment.declareVariable()

 
                  env.declareVariable(kwType, kwparam);
                  env.storeVariable(kwparam, ResultFactory.makeResult(kwType, r, ctx));
              }
              else {
                  env.declareVariable(kwType, kwparam);
                  Expression def = getKeywordParameterDefaults().get(kwparam);
                  Result<IValue> kwResult = def.interpret(eval);
                  env.storeVariable(kwparam, kwResult);
              }
          }
View Full Code Here

Examples of org.xmldb.api.modules.XQueryService.declareVariable()

    public File[] generate(org.xmldb.api.base.Collection collection, String xqueryContent) throws SAXException {
        String query = IMPORT + xqueryContent;
        System.out.println("query: " + query);
        try {
            XQueryService service = (XQueryService) collection.getService("XQueryService", "1.0");
            service.declareVariable("filename", "");
            service.declareVariable("count", "0");
            CompiledExpression compiled = service.compile(query);

            for (int i = 0; i < count; i++) {
                generatedFiles[i] = File.createTempFile(prefix, ".xml");
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.