Package com.xmlcalabash.runtime

Examples of com.xmlcalabash.runtime.XPipeline.readFrom()


    //Serialization serial
   
    //wd = new GenericWritableDocument(runtime, null, serial);
      GenericWritableDocument wd = new GenericWritableDocument(runtime, null, null, output);
    //--where serial is pipeline.getSerialization(port)
      ReadablePipe rpipe = pipeline.readFrom("result");
    //while...
    //try {
      wd.write(rpipe.read());
    //} catch (SaxonApiException e) {
      // TODO Auto-generated catch block
View Full Code Here


        pipeline.run();

        portiter = outputports.iterator();
        while (portiter.hasNext()) {
            String port = portiter.next();
            ReadablePipe rpipe = pipeline.readFrom(port);
            rpipe.canReadSequence(true);

            while (rpipe.moreDocuments()) {
                XdmNode doc = rpipe.read();
View Full Code Here

                        throw new UnsupportedOperationException(format("Unsupported output kind '%s'", output.getKind()));
                }
            }

            try {
                ReadablePipe rpipe = pipeline.readFrom(port);
                while (rpipe.moreDocuments()) {
                    wd.write(rpipe.read());
                }
            } finally {
                if (output != null) {
View Full Code Here

                        if (t.ignoreWS) {
                            XPipeline pppipe = runtime.use(prettyPrint);
                            pppipe.writeTo("source", tdoc);
                            pppipe.run();
                            ReadablePipe rpipe = pppipe.readFrom("result");
                            tdoc = rpipe.read();

                            pppipe.reset();
                            pppipe.writeTo("source", pdoc);
                            pppipe.run();
View Full Code Here

                            tdoc = rpipe.read();

                            pppipe.reset();
                            pppipe.writeTo("source", pdoc);
                            pppipe.run();
                            rpipe = pppipe.readFrom("result");
                            pdoc = rpipe.read();
                        }

                        pres.add(pdoc);
                        pexp.add(tdoc);
View Full Code Here

        Hashtable<String, ReadablePipe> pipeoutputs = new Hashtable<String, ReadablePipe> ();

        Set<String> pipeouts = xpipeline.getOutputs();
        for (String port : pipeouts) {
            if (!port.startsWith("!")) {
                ReadablePipe rpipe = xpipeline.readFrom(port);
                rpipe.canReadSequence(true);
                pipeoutputs.put(port, rpipe);
            }
        }
View Full Code Here

            pipeline.run();
            pipeconfig.ran = true;

            for (String port : pipeline.getOutputs()) {
                Vector<XdmNode> nodes = new Vector<XdmNode> ();
                ReadablePipe rpipe = pipeline.readFrom(port);
                while (rpipe.moreDocuments()) {
                    nodes.add(rpipe.read());
                }
                pipeconfig.outputs.put(port, nodes);
            }
View Full Code Here

        }

        loader.clearInputs("source");
        loader.writeTo("source", pipeDoc);
        loader.run();
        ReadablePipe xformed = loader.readFrom("result");
        pipeDoc = xformed.read();

        reset();
        return pipeDoc;
    }
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.