Package javax.xml.transform.sax

Examples of javax.xml.transform.sax.TransformerHandler.startElement()


        try {
            // report header
            handler.startDocument();
            AttributesImpl atts = new AttributesImpl();
            atts.addAttribute("", "", ReportXMLConst.ATTR_NAME, ReportXMLConst.XSD_STRING, report.getName());
            handler.startElement("", "", ReportXMLConst.ELEMENT_REPORT, atts);

            // iterate over reportlet instances defined for this report
            for (ReportletConf reportletConf : report.getReportletConfs()) {
                Class<Reportlet> reportletClass =
                        dataBinder.findReportletClassHavingConfClass(reportletConf.getClass());
View Full Code Here


            th.setResult(new SAXResult(ser));
            org.xml.sax.helpers.AttributesImpl atl = new org.xml.sax.helpers.AttributesImpl();
            atl.addAttribute("","name","name", "CDATA", channelName);
            // add other attributes: hasHelp, hasAbout, hasEdit
            th.startDocument();
            th.startElement("","channel","channel", atl);
            ChannelSAXStreamFilter custodian = new ChannelSAXStreamFilter(th);
            int out=cr.outputRendering(custodian);
            if(out==IChannelRenderer.RENDERING_TIMED_OUT) {
                throw new InternalTimeoutException("The channel has timed out");
            }
View Full Code Here

                  try {
                      org.xml.sax.helpers.AttributesImpl atl = new org.xml.sax.helpers.AttributesImpl();
                      atl.addAttribute("","name","name", "CDATA", channelName);
                      // add other attributes: hasHelp, hasAbout, hasEdit
                      th.startDocument();
                      th.startElement("","channel","channel", atl);
                      ChannelSAXStreamFilter custodian = new ChannelSAXStreamFilter(th);
                      custodian.setParent(buffer);
                      buffer.stopBuffering(); buffer.outputBuffer();
                      th.endElement("","channel","channel");
                      th.endDocument();
View Full Code Here

        try {
            // report header
            handler.startDocument();
            AttributesImpl atts = new AttributesImpl();
            atts.addAttribute("", "", ATTR_NAME, XSD_STRING, report.getName());
            handler.startElement("", "", ELEMENT_REPORT, atts);

            // iterate over reportlet instances defined for this report
            for (ReportletConf reportletConf : report.getReportletConfs()) {
                Class<Reportlet> reportletClass =
                        dataBinder.findReportletClassHavingConfClass(reportletConf.getClass());
View Full Code Here

            StringWriter writer = new StringWriter();
            TransformerHandler probe = FACTORY.newTransformerHandler();
            probe.setResult(new StreamResult(writer));
            probe.startDocument();
            probe.startPrefixMapping("p", "uri");
            probe.startElement("uri", "e", "p:e", new AttributesImpl());
            probe.endElement("uri", "e", "p:e");
            probe.endPrefixMapping("p");
            probe.endDocument();
            return writer.toString().indexOf("xmlns") == -1;
        } catch (Exception e) {
View Full Code Here

                th.setResult(streamResult);

                th.startDocument();

                th.startElement(ATOMNS, FEED, FEED, NOATTRS);

                writeAtomElement(th, TITLE, "EventJournal for " + getLocator().getWorkspaceName());

                th.startElement(ATOMNS, AUTHOR, AUTHOR, NOATTRS);
                writeAtomElement(th, NAME, "Jackrabbit Event Journal Feed Generator");
View Full Code Here

                th.startElement(ATOMNS, FEED, FEED, NOATTRS);

                writeAtomElement(th, TITLE, "EventJournal for " + getLocator().getWorkspaceName());

                th.startElement(ATOMNS, AUTHOR, AUTHOR, NOATTRS);
                writeAtomElement(th, NAME, "Jackrabbit Event Journal Feed Generator");
                th.endElement(ATOMNS, AUTHOR, AUTHOR);

                String id = getFullUri(request);
                writeAtomElement(th, ID, id);
View Full Code Here

                        index = 0;
                    } else {
                        index += 1;
                    }

                    th.startElement(ATOMNS, ENTRY, ENTRY, NOATTRS);

                    String entrytitle = op + (path != null ? (": " + path) : "");
                    writeAtomElement(th, TITLE, entrytitle);

                    String entryid = id + "?type=journal&ts=" + Long.toHexString(firstEvent.getDate()) + "-" + index;
View Full Code Here

                    writeAtomElement(th, ID, entryid);

                    String author = firstEvent.getUserID() == null || firstEvent.getUserID().length() == 0 ? null
                            : firstEvent.getUserID();
                    if (author != null) {
                        th.startElement(ATOMNS, AUTHOR, AUTHOR, NOATTRS);
                        writeAtomElement(th, NAME, author);
                        th.endElement(ATOMNS, AUTHOR, AUTHOR);
                    }

                    writeAtomElement(th, UPDATED, entryupd);
View Full Code Here

                        th.endElement(ATOMNS, AUTHOR, AUTHOR);
                    }

                    writeAtomElement(th, UPDATED, entryupd);

                    th.startElement(ATOMNS, CONTENT, CONTENT, contentatt);

                    for (Event e : bundle) {

                        // serialize the event
                        th.startElement(EVNS, E_EVENT, E_EVENT, NOATTRS);
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.