Package net.sf.saxon

Examples of net.sf.saxon.Configuration.makePipelineConfiguration()


                    compileWarning("No schema for this namespace is known, " +
                            "and no schema-location was supplied, so no schema has been imported",
                            SaxonErrorCode.SXWN9006);
                    return;
                }
                PipelineConfiguration pipe = config.makePipelineConfiguration();
                namespace = config.readSchema(pipe, getBaseURI(), schemaLoc, namespace);
            }
            getPrincipalStylesheet().addImportedSchema(namespace);
        } catch (SchemaException err) {
            compileError(err.getMessage(), "XTSE0220");
View Full Code Here


        Configuration config = env.getConfiguration();
        if (!config.isSchemaAvailable(sImport.namespaceURI)) {
            if (!sImport.locationURIs.isEmpty()) {
                try {
                    PipelineConfiguration pipe = config.makePipelineConfiguration();
                    config.readMultipleSchemas(pipe, env.getBaseURI(), sImport.locationURIs, sImport.namespaceURI);
                    namespacesToBeSealed.add(sImport.namespaceURI);
                } catch (TransformerConfigurationException err) {
                    grumble("Error in schema. " + err.getMessage(), "XQST0059");
                }
View Full Code Here

        try {
            SequenceIterator iter = iterator(dynamicEnv);
            PullProvider pull = new PullFromIterator(iter);
            pull = new PullNamespaceReducer(pull);
            final Configuration config = executable.getConfiguration();
            pull.setPipelineConfiguration(config.makePipelineConfiguration());

            SerializerFactory sf = config.getSerializerFactory();
            Receiver receiver = sf.getReceiver(destination,
                            pull.getPipelineConfiguration(),
                            outputProperties);
View Full Code Here

            EventIterator iter = iterateEvents(controller, dynamicEnv);
            //iter = new Decomposer(iter, config);

            Properties actualProperties = validateOutputProperties(controller, outputProperties);
            SerializerFactory sf = config.getSerializerFactory();
            PipelineConfiguration pipe = config.makePipelineConfiguration();
            pipe.setSerializing(true);
            Receiver receiver = sf.getReceiver(destination, pipe, actualProperties);

            receiver = new NamespaceReducer(receiver);
            if ("yes".equals(actualProperties.getProperty(SaxonOutputKeys.WRAP))) {
View Full Code Here

    public static void writeXdmValue(XProcRuntime runtime, XdmItem node, Destination destination, URI baseURI) throws SaxonApiException {
        try {
            Processor proc = runtime.getProcessor();
            Configuration config = proc.getUnderlyingConfiguration();
            PipelineConfiguration pipeConfig = config.makePipelineConfiguration();

            Receiver out = destination.getReceiver(config);
            out = new NamespaceReducer(out);
            TreeReceiver tree = new TreeReceiver(out);
            tree.setPipelineConfiguration(pipeConfig);
View Full Code Here

    }

    public static void writeXdmValue(Processor proc, Vector<XdmValue> values, Destination destination, URI baseURI) throws SaxonApiException {
        try {
            Configuration config = proc.getUnderlyingConfiguration();
            PipelineConfiguration pipeConfig = config.makePipelineConfiguration();

            Receiver out = destination.getReceiver(config);
            out = new NamespaceReducer(out);
            TreeReceiver tree = new TreeReceiver(out);
            tree.setPipelineConfiguration(pipeConfig);
View Full Code Here

        Transformer transformer = templates.newTransformer();
        doc = config.buildDocument(new StreamSource(new File(sourceID)));
        System.err.println("Source document built OK");

        Builder builder = TreeModel.TINY_TREE.makeBuilder(config.makePipelineConfiguration());
        transformer.transform(doc, builder);
        System.err.println("Transformation done OK");

        // Serialize the output so we can see the transformation actually worked
        Transformer serializer = tfactory.newTransformer();
View Full Code Here

        XPathExpression xpe = xpath.createExpression("/*/*[1]");
        NodeInfo start = (NodeInfo)xpe.evaluateSingle(doc);

        Transformer transformer = templates.newTransformer();

        Builder builder = TreeModel.TINY_TREE.makeBuilder(config.makePipelineConfiguration());
        transformer.transform(start, builder);
        System.err.println("Transformation done OK");

        // Serialize the output so we can see the transformation actually worked
        Transformer serializer = tfactory.newTransformer();
View Full Code Here

                    long min = Integer.MAX_VALUE;
                    long max = 0;
                    for (int t=0; t<1000; t++) {
                        final DynamicQueryContext context = new DynamicQueryContext(config);
                        context.setContextItem(doc);
                        Result result = new Sink(config.makePipelineConfiguration());
                        long start, end;
                        if (pull) {
                            start = System.currentTimeMillis();
                            exp.pull(context, result, props);
                            end = System.currentTimeMillis();
View Full Code Here

                int runs = 0;
                long totalTime = 0;
                long min = Integer.MAX_VALUE;
                long max = 0;
                for (int t=0; t<10; t++) {
                    Result result = new Sink(config.makePipelineConfiguration());
                    long start, end;

                    start = System.currentTimeMillis();
                    templates.newTransformer().transform(doc, result);
                    end = System.currentTimeMillis();
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.