Examples of PipelineConfiguration


Examples of net.sf.saxon.event.PipelineConfiguration

    */

    public static void sendDoc(String href, String baseURL, XPathContext c,
                               SourceLocator locator, Receiver out) throws XPathException {

        PipelineConfiguration pipe = out.getPipelineConfiguration();
        if (pipe == null) {
            pipe = c.getController().makePipelineConfiguration();
            out.setPipelineConfiguration(pipe);
        }

View Full Code Here

Examples of net.sf.saxon.event.PipelineConfiguration

        } else {
            Controller controller = context.getController();
            XPathContext c2 = context.newMinorContext();
            c2.setOrigin(this);
            SequenceOutputter seq = controller.allocateSequenceOutputter(1);
            PipelineConfiguration pipe = controller.makePipelineConfiguration();
            pipe.setHostLanguage(getHostLanguage());
            seq.setPipelineConfiguration(pipe);
            c2.setTemporaryReceiver(seq);
            process(c2);
            seq.close();
            Item result = seq.getFirstItem();
View Full Code Here

Examples of net.sf.saxon.event.PipelineConfiguration

        } else {
            Controller controller = context.getController();
            XPathContext c2 = context.newMinorContext();
            c2.setOrigin(this);
            SequenceOutputter seq = controller.allocateSequenceOutputter(20);
            PipelineConfiguration pipe = controller.makePipelineConfiguration();
            pipe.setHostLanguage(getHostLanguage());
            seq.setPipelineConfiguration(pipe);
            c2.setTemporaryReceiver(seq);
            process(c2);
            seq.close();
            return seq.iterate();
View Full Code Here

Examples of net.sf.saxon.event.PipelineConfiguration

     * @throws SaxonApiException if the source document is found to be invalid
     */

    public void validate(Source source) throws SaxonApiException {
        Receiver receiver = getReceiver(config, source.getSystemId());
        PipelineConfiguration pipe = receiver.getPipelineConfiguration();
        try {
            new Sender(pipe).send(source, receiver, true);
        } catch (XPathException e) {
            throw new SaxonApiException(e);
        }
View Full Code Here

Examples of net.sf.saxon.event.PipelineConfiguration

    public Receiver getReceiver(Configuration config) throws SaxonApiException {
        return getReceiver(config, null);
    }

    private Receiver getReceiver(Configuration config, String systemId) throws SaxonApiException {
        PipelineConfiguration pipe = config.makePipelineConfiguration();
        pipe.setExpandAttributeDefaults(expandAttributeDefaults);

        Receiver output = (destination == null ? new Sink() : destination.getReceiver(config));
        output.setPipelineConfiguration(pipe);

        int topLevelElement = -1;
        if (documentElementName != null) {
            topLevelElement = config.getNamePool().allocate(
                    "", documentElementName.getNamespaceURI(), documentElementName.getLocalName());
        }
        Receiver receiver = config.getDocumentValidator(
                output,
                systemId,
                (lax ? Validation.LAX : Validation.STRICT) | Validation.VALIDATE_OUTPUT,
                Whitespace.NONE,
                documentElementType,
                topLevelElement);
        if (errorListener != null) {
            pipe.setErrorListener(errorListener);
        }
        return receiver;
    }
View Full Code Here

Examples of net.sf.saxon.event.PipelineConfiguration

        } else {
            Controller controller = context.getController();
            XPathContext c2 = context.newMinorContext();
            c2.setOrigin(this);
            SequenceOutputter seq = controller.allocateSequenceOutputter(1);
            PipelineConfiguration pipe = controller.makePipelineConfiguration();
            pipe.setHostLanguage(getContainer().getHostLanguage());
            seq.setPipelineConfiguration(pipe);
            c2.setTemporaryReceiver(seq);
            process(c2);
            Item item = seq.getFirstItem();
            seq.reset();
View Full Code Here

Examples of net.sf.saxon.event.PipelineConfiguration

        } else {
            Controller controller = context.getController();
            XPathContext c2 = context.newMinorContext();
            c2.setOrigin(this);
            SequenceOutputter seq = controller.allocateSequenceOutputter(10);
            PipelineConfiguration pipe = controller.makePipelineConfiguration();
            pipe.setHostLanguage(getContainer().getHostLanguage());
            seq.setPipelineConfiguration(pipe);
            c2.setTemporaryReceiver(seq);

            process(c2);
View Full Code Here

Examples of net.sf.saxon.event.PipelineConfiguration

                    builder.setLineNumbering(controller.getConfiguration().isLineNumbering());

                    //receiver.setSystemId(getBaseURI());
                    builder.setBaseURI(getBaseURI());

                    PipelineConfiguration pipe = controller.makePipelineConfiguration();
                    pipe.setHostLanguage(getHostLanguage());
                    //pipe.setBaseURI(baseURI);
                    builder.setPipelineConfiguration(pipe);

                    c2.changeOutputDestination(null,
                            builder,
View Full Code Here

Examples of net.sf.saxon.event.PipelineConfiguration

        XPathContext c2 = context.newMinorContext();
        c2.setOrigin(this);
        SequenceReceiver out = c2.getReceiver();
        TinyBuilder builder = new TinyBuilder();
        Receiver receiver = builder;
        PipelineConfiguration pipe = controller.makePipelineConfiguration();
        pipe.setHostLanguage(getContainer().getHostLanguage());
        receiver.setPipelineConfiguration(pipe);
        receiver.open();
        receiver.startDocument(0);
        c2.changeOutputDestination(null, receiver, false, getHostLanguage(), Validation.PRESERVE, null);
        content.process(c2);
View Full Code Here

Examples of net.sf.saxon.event.PipelineConfiguration

                    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
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.