Package com.xmlcalabash.util

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


        if (!file.isDirectory()) {
            throw new XProcException(step.getNode(), "The href on tempfile must point to an existing directory.");
        }

        TreeWriter tree = new TreeWriter(runtime);
        tree.startDocument(step.getNode().getBaseURI());
        tree.addStartElement(XProcConstants.c_result);
        tree.startContent();

        File temp;
        try {
View Full Code Here


        }

        RuntimeValue href = getOption(_href);

        final TreeWriter tree = new TreeWriter(runtime);
        tree.startDocument(step.getNode().getBaseURI());
        tree.addStartElement(XProcConstants.c_result);
        tree.startContent();

        try {
            DataStore store = runtime.getDataStore();
View Full Code Here

            // I don't think this can ever actually happen
            throw new XProcException(ex);
        }

        TreeWriter tree = new TreeWriter(runtime);
        tree.startDocument(step.getNode().getBaseURI());
        tree.addStartElement(XProcConstants.c_result);
        tree.startContent();
        tree.addText("true");
        tree.addEndElement();
        tree.endDocument();
View Full Code Here

        final int negMaxCount = -maxCount;

        RuntimeValue href = getOption(_href);

        final TreeWriter tree = new TreeWriter(runtime);
        tree.startDocument(step.getNode().getBaseURI());
        tree.addStartElement(XProcConstants.c_result);
        tree.startContent();

        try {
            DataStore store = runtime.getDataStore();
View Full Code Here

            error(e);
        }

        public void error(SAXParseException e) throws SAXException {
            TreeWriter treeWriter = new TreeWriter(runtime);
            treeWriter.startDocument(docBaseURI);
            treeWriter.addStartElement(XProcConstants.c_error);

            if (e.getLineNumber()!=-1) {
                treeWriter.addAttribute(_line, ""+e.getLineNumber());
            }
View Full Code Here

                }
            }

            if (width >= 0) {
                TreeWriter tree = new TreeWriter(runtime);
                tree.startDocument(step.getNode().getBaseURI());
                tree.addStartElement(c_metadata);
                tree.addAttribute(_href, imageFn);
                tree.startContent();

                tree.addStartElement(c_tag);
View Full Code Here

                // I don't care
            }
        }

        TreeWriter tree = new TreeWriter(runtime);
        tree.startDocument(step.getNode().getBaseURI());
        tree.addStartElement(XProcConstants.c_result);
        tree.startContent();
        tree.addText(changed);
        tree.addEndElement();
        tree.endDocument();
View Full Code Here

*/
public class Status extends BaseResource {
    @Override
    protected Representation get(Variant variant) {
        TreeWriter tree = new TreeWriter(getGlobalRuntime());
        tree.startDocument(URI.create("http://example.com/"));

        tree.addStartElement(pr_status);
        tree.startContent();

        tree.addStartElement(pr_version);
View Full Code Here

        return doc.toString();
    }

    protected Representation badRequest(Status status, String msg, MediaType type) {
        TreeWriter tree = new TreeWriter(getGlobalRuntime());
        tree.startDocument(URI.create("http://example.com/"));
        tree.addStartElement(pr_error);
        tree.startContent();
        tree.addStartElement(pr_code);
        tree.startContent();
        tree.addText("" + status.getCode());
View Full Code Here

    void read(URI id, InputStream stream, final DatatypeFactory dfactory)
            throws IOException {
        TreeWriter tree = new TreeWriter(runtime);
   
        tree.startDocument(step.getNode().getBaseURI());
        tree.addStartElement(c_zipfile);
        tree.addAttribute(_href, id.toASCIIString());
        tree.startContent();
   
        ZipInputStream zipStream = new ZipInputStream(stream);
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.