Package com.xmlcalabash.util

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


                tree.addStartElement(pr_value);
                if (pipeconfig.options.containsKey(name)) {
                    tree.startContent();
                    tree.addText(pipeconfig.options.get(name));
                } else if (pipeconfig.gvOptions.contains(name)) {
                    tree.addAttribute(_initialized, "true");
                    tree.startContent();
                } else {
                    tree.addAttribute(_default, "true");
                    tree.startContent();
                }
View Full Code Here


                    tree.addText(pipeconfig.options.get(name));
                } else if (pipeconfig.gvOptions.contains(name)) {
                    tree.addAttribute(_initialized, "true");
                    tree.startContent();
                } else {
                    tree.addAttribute(_default, "true");
                    tree.startContent();
                }
                tree.addEndElement();

                tree.addEndElement();
View Full Code Here

            Metadata metadata = JpegMetadataReader.readMetadata(stream);

            TreeWriter tree = new TreeWriter(runtime);
            tree.startDocument(step.getNode().getBaseURI());
            tree.addStartElement(c_metadata);
            tree.addAttribute(_href, href.toASCIIString());
            tree.startContent();

            // iterate through metadata directories
            Iterator<Directory> directories = metadata.getDirectories().iterator();
            while (directories.hasNext()) {
View Full Code Here

                tree.startContent();
                tree.addText(name.toString());
                tree.addEndElement();

                tree.addStartElement(pr_value);
                tree.addAttribute(_initialized, "true");
                tree.startContent();
                tree.addEndElement();

                tree.addEndElement();
            }
View Full Code Here

                Iterator<Tag> tags = directory.getTags().iterator();
                while (tags.hasNext()) {
                    Tag tag = tags.next();

                    tree.addStartElement(c_tag);
                    tree.addAttribute(_dir, dir);
                    tree.addAttribute(_type, tag.getTagTypeHex());
                    tree.addAttribute(_name, tag.getTagName());

                    String value = tag.getDescription();
View Full Code Here

                while (tags.hasNext()) {
                    Tag tag = tags.next();

                    tree.addStartElement(c_tag);
                    tree.addAttribute(_dir, dir);
                    tree.addAttribute(_type, tag.getTagTypeHex());
                    tree.addAttribute(_name, tag.getTagName());

                    String value = tag.getDescription();

                    // Laboriously escape all the control characters with \\uxxxx, but first replace
View Full Code Here

                    Tag tag = tags.next();

                    tree.addStartElement(c_tag);
                    tree.addAttribute(_dir, dir);
                    tree.addAttribute(_type, tag.getTagTypeHex());
                    tree.addAttribute(_name, tag.getTagName());

                    String value = tag.getDescription();

                    // Laboriously escape all the control characters with \\uxxxx, but first replace
                    // \\uxxxx with \\u005cuxxxx so we don't inadvertantly change the meaning of a string
View Full Code Here

            TreeWriter req = new TreeWriter(runtime);
            req.startDocument(step.getNode().getBaseURI());
            req.addStartElement(XProcConstants.c_request);
            req.addAttribute(_method, "HEAD");
            req.addAttribute(_href, uri.toASCIIString());
            req.addAttribute(_status_only, "true");
            req.addAttribute(_detailed, "true");

            for (QName name : new QName[] {_username, _password, _auth_method, _send_authorization } ) {
                RuntimeValue v = getOption(name);
                if (v != null) { req.addAttribute(name, v.getString()); }
View Full Code Here

            req.startDocument(step.getNode().getBaseURI());
            req.addStartElement(XProcConstants.c_request);
            req.addAttribute(_method, "HEAD");
            req.addAttribute(_href, uri.toASCIIString());
            req.addAttribute(_status_only, "true");
            req.addAttribute(_detailed, "true");

            for (QName name : new QName[] {_username, _password, _auth_method, _send_authorization } ) {
                RuntimeValue v = getOption(name);
                if (v != null) { req.addAttribute(name, v.getString()); }
            }
View Full Code Here

            req.addAttribute(_status_only, "true");
            req.addAttribute(_detailed, "true");

            for (QName name : new QName[] {_username, _password, _auth_method, _send_authorization } ) {
                RuntimeValue v = getOption(name);
                if (v != null) { req.addAttribute(name, v.getString()); }
            }

            req.startContent();
            req.addEndElement();
            req.endDocument();
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.