Package com.xmlcalabash.util

Examples of com.xmlcalabash.util.TreeWriter.addStartElement()


        TreeWriter tree = new TreeWriter(getGlobalRuntime());
        tree.startDocument(URI.create("http://example.com/"));

        PipelineConfiguration pipeconfig = getPipelines().get(id);

        tree.addStartElement(pr_pipeline);
        tree.startContent();

        tree.addStartElement(pr_uri);
        tree.startContent();
        tree.addText(pipelineUri(id));
View Full Code Here


        PipelineConfiguration pipeconfig = getPipelines().get(id);

        tree.addStartElement(pr_pipeline);
        tree.startContent();

        tree.addStartElement(pr_uri);
        tree.startContent();
        tree.addText(pipelineUri(id));
        tree.addEndElement();

        formatExpires(tree, pipeconfig.expires);
View Full Code Here

        tree.addText(pipelineUri(id));
        tree.addEndElement();

        formatExpires(tree, pipeconfig.expires);

        tree.addStartElement(pr_has_run);
        tree.startContent();
        tree.addText("" + pipeconfig.ran);
        tree.addEndElement();

        if (pipeconfig.ran) {
View Full Code Here

                    // There's no point giving the file the URI of the pipeline document.
                    // This formulation is parallel to the jar scheme.
                    URI zipURI = URI.create("zip:" + zipFn + "!" + entry.getName());

                    tree.startDocument(zipURI);
                    tree.addStartElement(XProcConstants.c_data);
                    tree.addAttribute(_name,name);
                    tree.addAttribute(_content_type, contentType);
                    if (!storeText) {
                        tree.addAttribute(_encoding, "base64");
                    }
View Full Code Here

        tree.addText("" + pipeconfig.ran);
        tree.addEndElement();

        if (pipeconfig.ran) {
            for (String port : pipeconfig.outputPorts) {
                tree.addStartElement(pr_output);
                if (port.equals(pipeconfig.defoutput)) {
                    tree.addAttribute(_primary, "true");
                }
                tree.addAttribute(_documents, "" + pipeconfig.outputs.get(port).size());
                tree.startContent();
View Full Code Here

        try {
            xgroup.run();
        } catch (Exception xe) {
            TreeWriter treeWriter = new TreeWriter(runtime);
            treeWriter.startDocument(step.getNode().getBaseURI());
            treeWriter.addStartElement(c_errors);
            treeWriter.startContent();

            boolean reported = false;
            for (XdmNode doc : runtime.getXProcData().errors()) {
                treeWriter.addSubtree(doc);
View Full Code Here

        } else {
            XPipeline xpipeline = pipeconfig.pipeline;
            DeclareStep pipeline = xpipeline.getDeclareStep();

            for (String port : pipeconfig.inputPorts) {
                tree.addStartElement(pr_input);
                if (port.equals(pipeconfig.definput)) {
                    tree.addAttribute(_primary, "true");
                }
                tree.addAttribute(_documents, "" + pipeconfig.documentCount(port));
                tree.startContent();
View Full Code Here

                reported = true;
            }

            if (!reported) {
                // Hey, no one reported this exception. We better do it.
                treeWriter.addStartElement(c_error);

                String message = xe.getMessage();
                StructuredQName qCode = null;

                if (xe instanceof XPathException) {
View Full Code Here

                tree.addText(port);
                tree.addEndElement();
            }

            for (QName name : pipeline.getOptions()) {
                tree.addStartElement(pr_option);
                tree.startContent();

                tree.addStartElement(pr_name);

                if (!"".equals(name.getPrefix())) {
View Full Code Here

            for (QName name : pipeline.getOptions()) {
                tree.addStartElement(pr_option);
                tree.startContent();

                tree.addStartElement(pr_name);

                if (!"".equals(name.getPrefix())) {
                    tree.addNamespace(name.getPrefix(), name.getNamespaceURI());
                }
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.