Package com.xmlcalabash.util

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


        final URI uri = URI.create("file:///").resolve(path);
        final TreeWriter tree = new TreeWriter(runtime);
        tree.startDocument(step.getNode().getBaseURI());
        tree.addStartElement(c_directory);
        tree.addAttribute(_name, getName(uri));
        tree.addAttribute(XProcConstants.xml_base, uri.toASCIIString());
        tree.startContent();

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


        final URI uri = URI.create("file:///").resolve(path);
        final TreeWriter tree = new TreeWriter(runtime);
        tree.startDocument(step.getNode().getBaseURI());
        tree.addStartElement(c_directory);
        tree.addAttribute(_name, getName(uri));
        tree.addAttribute(XProcConstants.xml_base, uri.toASCIIString());
        tree.startContent();

        final DataStore store = runtime.getDataStore();
        try {
            store.listEachEntry(path, "file:///", "*/*", new DataInfo() {
View Full Code Here

                    }

                    if (use) {
                        if (!isFile(id)) {
                            tree.addStartElement(c_directory);
                            tree.addAttribute(_name, filename);
                            tree.addEndElement();
                            logger.trace(MessageFormatter.nodeMessage(step.getNode(), "Including directory: " + filename));
                        } else {
                            tree.addStartElement(c_file);
                            tree.addAttribute(_name, filename);
View Full Code Here

    public void returnData(ByteArrayOutputStream baos) {
        TreeWriter tree = new TreeWriter(runtime);
        tree.startDocument(step.getNode().getBaseURI());
        tree.addStartElement(XProcConstants.c_data);
        tree.addAttribute(_content_type, contentType);
        tree.startContent();
        tree.addText(baos.toString());
        tree.addEndElement();
        tree.endDocument();
        result.write(tree.getResult());
View Full Code Here

                            tree.addAttribute(_name, filename);
                            tree.addEndElement();
                            logger.trace(MessageFormatter.nodeMessage(step.getNode(), "Including directory: " + filename));
                        } else {
                            tree.addStartElement(c_file);
                            tree.addAttribute(_name, filename);
                            tree.addEndElement();
                            logger.trace(MessageFormatter.nodeMessage(step.getNode(), "Including file: " + filename));
                        }
                    } else if (showExcluded) {
                        tree.addComment(" excluded: " + filename + " ");
View Full Code Here

            TreeWriter treeWriter = new TreeWriter(runtime);
            treeWriter.startDocument(docBaseURI);
            treeWriter.addStartElement(XProcConstants.c_error);

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

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

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

            if (e.getColumnNumber()!=-1) {
                treeWriter.addAttribute(_column, ""+e.getColumnNumber());
            }

            treeWriter.startContent();

            treeWriter.addText(e.toString());
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);
                tree.addAttribute(_dir, "Exif");
                tree.addAttribute(_type, "0x9000");
View Full Code Here

                tree.addStartElement(c_metadata);
                tree.addAttribute(_href, imageFn);
                tree.startContent();

                tree.addStartElement(c_tag);
                tree.addAttribute(_dir, "Exif");
                tree.addAttribute(_type, "0x9000");
                tree.addAttribute(_name, "Exif Version");
                tree.startContent();
                tree.addText("0");
                tree.addEndElement();
View Full Code Here

                tree.addAttribute(_href, imageFn);
                tree.startContent();

                tree.addStartElement(c_tag);
                tree.addAttribute(_dir, "Exif");
                tree.addAttribute(_type, "0x9000");
                tree.addAttribute(_name, "Exif Version");
                tree.startContent();
                tree.addText("0");
                tree.addEndElement();
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.