Examples of prepareExpression()


Examples of javax.xml.xquery.XQConnection.prepareExpression()

            // Prepare expression, for starters
            String xquery = oxquery10.xquery.replaceFirst(
                    Constants.XQUERY_FUNCTION_HANDLER_COMPILER,
                    Constants.XQUERY_FUNCTION_HANDLER_RUNTIME);
            XQPreparedExpression exp = xqconn.prepareExpression(xquery);

            JaxpFunctionResolver funcResolver = new JaxpFunctionResolver(ctx,
                    oxquery10);
            JaxpVariableResolver variableResolver = new JaxpVariableResolver(ctx,
                    oxquery10, configuration);
View Full Code Here

Examples of javax.xml.xquery.XQConnection.prepareExpression()

                XQConnection xqconn = xqds.getConnection();

                net.sf.saxon.Configuration configuration = ((SaxonXQConnection) xqconn).getConfiguration();
                configuration.setHostLanguage(net.sf.saxon.Configuration.XQUERY);
//                XQStaticContext staticEnv = xqconn.getStaticContext();
                XQPreparedExpression exp = xqconn.prepareExpression(xquery);
                Node requestNode = DOMUtils.parse(request.newXMLStreamReader());
                if (__log.isDebugEnabled()) {
                    __log.debug("request " + request.toString());
                }
                exp.bindItem(XQConstants.CONTEXT_ITEM, xqconn.createItemFromNode(requestNode, xqconn.createNodeType()));
View Full Code Here

Examples of javax.xml.xquery.XQConnection.prepareExpression()

      for (String query : queryStrings) {
        RelationshipDelta result;
        String complete = localStr + query;
        StringReader reader = new StringReader(complete);
       
        XQPreparedExpression exp = conn.prepareExpression(reader);
        String filename = file.getAbsolutePath().replace('\\', '/');
        exp.bindString(new QName(DOC), filename, null);
       
        XQResultSequence queryResult = exp.executeQuery();
        result = processRelationshipResults(queryResult, types);
View Full Code Here

Examples of javax.xml.xquery.XQConnection.prepareExpression()

      config.registerExtensionFunction(new TypeComparisonDefinition(types));

      String complete = localStr + topStr;
      StringReader reader = new StringReader(complete);
       
      XQPreparedExpression exp = conn.prepareExpression(reader);
      exp.bindString(new QName(DOC), file.getAbsolutePath().replace('\\', '/'), null);
       
      XQResultSequence queryResult = exp.executeQuery();
      return processBindingResults(queryResult);
    } catch (XQException e) {
View Full Code Here

Examples of javax.xml.xquery.XQConnection.prepareExpression()

      xQuery = XQueryUtils.readXQueryFromResource(xQueryFileResource);
    }

    try {
      XQConnection conn = getConnection();
      XQPreparedExpression expression = conn.prepareExpression(xQuery);
      QName[] extParameters = expression.getAllExternalVariables();
      if(extParameters != null && extParameters.length > 0) {
        xQueryParameters = new ArrayList<String>();
        for(QName qName:extParameters) {
          xQueryParameters.add(qName.getLocalPart());
View Full Code Here

Examples of javax.xml.xquery.XQConnection.prepareExpression()

    XQConnection connection = null;
    XQPreparedExpression expression = null;
    try {
      connection = getConnection();
      expression = connection.prepareExpression(xQuery);
      expression.bindNode(XQConstants.CONTEXT_ITEM, node, null);

      //bind the parameter values
      if(xQueryParameters != null && xQueryParameters.size() > 0) {
        //bind them one by one
View Full Code Here

Examples of javax.xml.xquery.XQConnection.prepareExpression()

            // Add implicit declarations as prolog to the user-defined XQuery
            out.xquery = declarations.toString() + xqueryStr;

            // Check the XQuery for compilation errors
            xqconn.setStaticContext(staticContext);           
            XQPreparedExpression exp = xqconn.prepareExpression(out.xquery);
           
            // Pre-evaluate variables and functions by executing query 
            node.setUserData(XQuery10BpelFunctions.USER_DATA_KEY_FUNCTION_RESOLVER,
                funcResolver, null);
            exp.bindItem(XQConstants.CONTEXT_ITEM,
View Full Code Here

Examples of javax.xml.xquery.XQConnection.prepareExpression()

            // Prepare expression, for starters
            String xquery = oxquery10.xquery.replaceFirst(
                    Constants.XQUERY_FUNCTION_HANDLER_COMPILER,
                    Constants.XQUERY_FUNCTION_HANDLER_RUNTIME);
            XQPreparedExpression exp = xqconn.prepareExpression(xquery);

            JaxpFunctionResolver funcResolver = new JaxpFunctionResolver(ctx,
                    oxquery10);
            JaxpVariableResolver variableResolver = new JaxpVariableResolver(ctx,
                    oxquery10, configuration);
View Full Code Here

Examples of javax.xml.xquery.XQConnection.prepareExpression()

            // Prepare expression, for starters
            String xquery = oxquery10.xquery.replaceFirst(
                    Constants.XQUERY_FUNCTION_HANDLER_COMPILER,
                    Constants.XQUERY_FUNCTION_HANDLER_RUNTIME);
            XQPreparedExpression exp = xqconn.prepareExpression(xquery);

            JaxpFunctionResolver funcResolver = new JaxpFunctionResolver(ctx,
                    oxquery10);
            JaxpVariableResolver variableResolver = new JaxpVariableResolver(ctx,
                    oxquery10, configuration);
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.