Package com.xmlcalabash.util

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


        for (Cookie cookie : runtime.getCookieStore(cookieKey).getCookies()) {
            tree.addStartElement(c_cookie);
            tree.addAttribute(_name, cookie.getName());
            tree.addAttribute(_value, cookie.getValue());
            tree.addAttribute(_domain, cookie.getDomain());
            tree.addAttribute(_path, cookie.getPath());
            //tree.addAttribute(_secure, cookie.getSecure() ? "true" : "false");
            //tree.addAttribute(_version, ""+cookie.getVersion());
            Date date = cookie.getExpiryDate();
            if (date != null) {
                String iso = iso8601.format(date);
View Full Code Here


            Date date = cookie.getExpiryDate();
            if (date != null) {
                String iso = iso8601.format(date);
                // Insert the damn colon in the timezone
                iso = iso.substring(0,22) + ":" + iso.substring(22);
                tree.addAttribute(_expires, iso);

                Date today = new Date();
               
            }
            tree.startContent();
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

            treeWriter.addStartElement(XProcConstants.c_error);

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

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

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

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

            treeWriter.startContent();
View Full Code Here

        tree.addStartElement(s_head);
        tree.startContent();

        for (String var : results.getResultVars()) {
            tree.addStartElement(s_variable);
            tree.addAttribute(_name, var);
            tree.startContent();
            tree.addEndElement();
        }

        tree.addEndElement();
View Full Code Here

            Iterator<String> iter = soln.varNames();
            while (iter.hasNext()) {
                String var = iter.next();

                tree.addStartElement(s_binding);
                tree.addAttribute(_name, var);
                tree.startContent();

                RDFNode node = soln.get(var);

                if (node.isLiteral()) {
View Full Code Here

                    if (lit.getLanguage() == null || "".equals(lit.getLanguage())) {
                        String dt = lit.getDatatypeURI();
                        if (dt == null || "".equals(dt)) {
                            // nop
                        } else {
                            tree.addAttribute(_datatype, dt);
                        }
                    } else {
                        tree.addAttribute(XProcConstants.xml_lang, node.asLiteral().getLanguage());
                    }
View Full Code Here

                            // nop
                        } else {
                            tree.addAttribute(_datatype, dt);
                        }
                    } else {
                        tree.addAttribute(XProcConstants.xml_lang, node.asLiteral().getLanguage());
                    }

                    tree.addText(node.asLiteral().toString());
                    tree.addEndElement();
                } else if (node.isResource()) {
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.