Examples of SaxonXQDataSource


Examples of net.sf.saxon.xqj.SaxonXQDataSource

    private static class TestI implements Test {
        public String name() {
            return "TestI";
        }
        public void run() throws XQException {
            XQDataSource ds = new SaxonXQDataSource();
            XQConnection conn = ds.getConnection();
            XQPreparedExpression exp = conn.prepareExpression(
                    "document { <a xmlns='http://a/uri' z:in='out' xmlns:z='http://z/uri'>" +
                    "<b xmlns='http://b/uri'>{2+2}</b>" +
                    "</a> }");
            XQResultSequence result = exp.executeQuery();
View Full Code Here

Examples of net.sf.saxon.xqj.SaxonXQDataSource

    private static class TestJ implements Test {
        public String name() {
            return "TestJ";
        }
        public void run() throws XQException {
            XQDataSource ds = new SaxonXQDataSource();
            XQConnection conn = ds.getConnection();
            if (!conn.getMetaData().isSchemaValidationFeatureSupported()) {
                System.out.println("*** This test requires Saxon-EE");
                return;
            }
            File inputFile = new File("data/books.xml");
View Full Code Here

Examples of net.sf.saxon.xqj.SaxonXQDataSource

    private static class TestK implements Test {
        public String name() {
            return "TestK";
        }
        public void run() throws XQException {
            XQDataSource ds = new SaxonXQDataSource();
            XQConnection conn = ds.getConnection();
            if (!conn.getMetaData().isSchemaValidationFeatureSupported()) {
                System.out.println("*** This test requires Saxon-EE");
                return;
            }
            File inputFile = new File("data/books.xml");
View Full Code Here

Examples of net.sf.saxon.xqj.SaxonXQDataSource

    private static class TestL implements Test {
        public String name() {
            return "TestL";
        }
        public void run() throws XQException {
            XQDataSource ds = new SaxonXQDataSource();
            XQConnection conn = ds.getConnection();

            XQPreparedExpression exp = conn.prepareExpression(
                    "declare namespace jt = 'http://saxon.sf.net/java-type';\n" +
                    "declare namespace Locale = 'java:java.util.Locale';\n" +
                    "declare variable $locale as jt:java.util.Locale external;\n" +
View Full Code Here

Examples of net.sf.saxon.xqj.SaxonXQDataSource

            return "TestZ";
        }

        public void run() throws XQException {
            try {
                XQConnection conn = new SaxonXQDataSource().getConnection();
                DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
                    System.err.println("Using DocumentBuilderFactory " + dfactory.getClass());

                dfactory.setNamespaceAware(true);
View Full Code Here

Examples of net.sf.saxon.xqj.SaxonXQDataSource

        if (xqueryStr.length() == 0) {
            throw new CompilationException(__msgs.warnXPath20Syntax(DOMUtils.domToString(node), "empty string"));
        }

        try {
          XQDataSource xqds = new SaxonXQDataSource();
            XQConnection xqconn = xqds.getConnection();
           
            __log.debug("Compiling expression " + xqueryStr);
            Configuration configuration = ((SaxonXQConnection) xqconn).getConfiguration();
            configuration.setAllNodesUntyped(true);
            configuration.setHostLanguage(Configuration.XQUERY);
View Full Code Here

Examples of net.sf.saxon.xqj.SaxonXQDataSource

    private Object evaluate(OExpression cexp, EvaluationContext ctx, QName type)
        throws FaultException, EvaluationException {
        try {
            OXQuery10ExpressionBPEL20 oxquery10 = ((OXQuery10ExpressionBPEL20) cexp);

            XQDataSource xqds = new SaxonXQDataSource();
            XQConnection xqconn = xqds.getConnection();

            Configuration configuration = ((SaxonXQConnection) xqconn).getConfiguration();
            configuration.setAllNodesUntyped(true);
            configuration.setHostLanguage(Configuration.XQUERY);
View Full Code Here

Examples of net.sf.saxon.xqj.SaxonXQDataSource

    private Object evaluate(OExpression cexp, EvaluationContext ctx, QName type)
        throws FaultException, EvaluationException {
        try {
            OXQuery10ExpressionBPEL20 oxquery10 = ((OXQuery10ExpressionBPEL20) cexp);

            XQDataSource xqds = new SaxonXQDataSource();
            XQConnection xqconn = xqds.getConnection();

            Configuration configuration = ((SaxonXQConnection) xqconn).getConfiguration();
            configuration.setAllNodesUntyped(true);
            configuration.setHostLanguage(Configuration.XQUERY);
View Full Code Here

Examples of net.sf.saxon.xqj.SaxonXQDataSource

            synchronized (resourceLock) {

                //creating data source
                if (cachedXQDataSource == null) {
                    // A factory for XQConnection  objects
                    cachedXQDataSource = new SaxonXQDataSource();
                    //setting up the properties to the XQDataSource
                    if (dataSourceProperties != null && !dataSourceProperties.isEmpty()) {
                        if (traceOrDebugOn) {
                            traceOrDebug(traceOn, "Setting up properties to the XQDataSource");
                        }
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.