Examples of newXQueryCompiler()


Examples of net.sf.saxon.s9api.Processor.newXQueryCompiler()

    public void write(XdmNode doc) {
        try {
            Processor qtproc = runtime.getProcessor();
            DocumentBuilder builder = qtproc.newDocumentBuilder();
            builder.setBaseURI(new URI("http://example.com/"));
            XQueryCompiler xqcomp = qtproc.newXQueryCompiler();
            XQueryExecutable xqexec = xqcomp.compile(".");
            XQueryEvaluator xqeval = xqexec.load();
            xqeval.setContextItem(doc);

            serializer = new Serializer();
View Full Code Here

Examples of net.sf.saxon.s9api.Processor.newXQueryCompiler()

        serialize(xproc, nodes, serializer);
    }

    public static void serialize(XProcRuntime xproc, Vector<XdmNode> nodes, Serializer serializer) throws SaxonApiException {
        Processor qtproc = xproc.getProcessor();
        XQueryCompiler xqcomp = qtproc.newXQueryCompiler();
        xqcomp.setModuleURIResolver(xproc.getResolver());

        // Patch suggested by oXygen to avoid errors that result from attempting to serialize
        // a schema-valid document with a schema-naive query
        xqcomp.getUnderlyingStaticContext().setSchemaAware(
View Full Code Here

Examples of net.sf.saxon.s9api.Processor.newXQueryCompiler()

                XsltCompiler compiler = processor.newXsltCompiler();
                XsltExecutable exec = compiler.compile(stylesheet);
                PreparedStylesheet ps = exec.getUnderlyingCompiledStylesheet();
                fl = ps.getFunctionLibrary();
            } else {
                XQueryCompiler xqcomp = processor.newXQueryCompiler();
                StaticQueryContext sqc = xqcomp.getUnderlyingStaticContext();
                sqc.compileLibrary(connection.getInputStream(), "utf-8");
                XQueryExpression xqe = sqc.compileQuery("import module namespace f='" + ns + "'; .");
                QueryModule qm = xqe.getStaticContext();
                fl = qm.getGlobalFunctionLibrary();
View Full Code Here

Examples of net.sf.saxon.s9api.Processor.newXQueryCompiler()

                        serializer.setOutputProperty(Serializer.Property.METHOD, "text");
                        serializer.setOutputProperty(Serializer.Property.OMIT_XML_DECLARATION, "yes");
                    }

                    Processor qtproc = runtime.getProcessor();
                    XQueryCompiler xqcomp = qtproc.newXQueryCompiler();
                    xqcomp.setModuleURIResolver(runtime.getResolver());
                    XQueryExecutable xqexec = xqcomp.compile(queryexpr);
                    XQueryEvaluator xqeval = xqexec.load();
                    xqeval.setContextItem(srcDoc);
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.