Package com.xmlcalabash.util

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


                tree.addStartElement(c_file);
            } else {
                tree.addStartElement(c_other);
            }

            tree.addAttribute(_href, uri.toASCIIString());

            if (file.canRead())  { tree.addAttribute(_readable, "true"); }
            if (file.canWrite()) { tree.addAttribute(_writable, "true"); }
            if (file.isHidden()) { tree.addAttribute(_hidden, "true"); }
            tree.addAttribute(_size, "" + file.length());
View Full Code Here


                tree.addStartElement(c_other);
            }

            tree.addAttribute(_href, uri.toASCIIString());

            if (file.canRead())  { tree.addAttribute(_readable, "true"); }
            if (file.canWrite()) { tree.addAttribute(_writable, "true"); }
            if (file.isHidden()) { tree.addAttribute(_hidden, "true"); }
            tree.addAttribute(_size, "" + file.length());

            GregorianCalendar cal = new GregorianCalendar();
View Full Code Here

            }

            tree.addAttribute(_href, uri.toASCIIString());

            if (file.canRead())  { tree.addAttribute(_readable, "true"); }
            if (file.canWrite()) { tree.addAttribute(_writable, "true"); }
            if (file.isHidden()) { tree.addAttribute(_hidden, "true"); }
            tree.addAttribute(_size, "" + file.length());

            GregorianCalendar cal = new GregorianCalendar();
            cal.setTimeInMillis(file.lastModified());
View Full Code Here

            tree.addAttribute(_href, uri.toASCIIString());

            if (file.canRead())  { tree.addAttribute(_readable, "true"); }
            if (file.canWrite()) { tree.addAttribute(_writable, "true"); }
            if (file.isHidden()) { tree.addAttribute(_hidden, "true"); }
            tree.addAttribute(_size, "" + file.length());

            GregorianCalendar cal = new GregorianCalendar();
            cal.setTimeInMillis(file.lastModified());
View Full Code Here

            tree.addAttribute(_href, uri.toASCIIString());

            if (file.canRead())  { tree.addAttribute(_readable, "true"); }
            if (file.canWrite()) { tree.addAttribute(_writable, "true"); }
            if (file.isHidden()) { tree.addAttribute(_hidden, "true"); }
            tree.addAttribute(_size, "" + file.length());

            GregorianCalendar cal = new GregorianCalendar();
            cal.setTimeInMillis(file.lastModified());

            TimeZone tz = TimeZone.getDefault();
View Full Code Here

            long gmt = file.lastModified() - tz.getRawOffset();
            if (tz.useDaylightTime() && tz.inDaylightTime(cal.getTime())) {
                gmt -= tz.getDSTSavings();
            }
            cal.setTimeInMillis(gmt);
            tree.addAttribute(_last_modified, String.format("%1$04d-%2$02d-%3$02dT%4$02d:%5$02d:%6$02dZ",
                    cal.get(Calendar.YEAR), cal.get(Calendar.MONTH)+1, cal.get(Calendar.DAY_OF_MONTH),
                    cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND)));

            tree.startContent();
            tree.addEndElement();
View Full Code Here

            httpReq.setOutput("result", outputPipe);

            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 } ) {
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);
View Full Code Here

        tree.addStartElement(c_cookies);
        tree.startContent();

        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());
View Full Code Here

        tree.startContent();

        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();
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.