Package com.dotcms.repackage.org.xml.sax.helpers

Examples of com.dotcms.repackage.org.xml.sax.helpers.AttributesImpl.addAttribute()


                // no else because a removed part can just be closed and a new
                // part can start
                if (!newStarted && mod.getType() == ModificationType.ADDED) {
                    AttributesImpl attrs = new AttributesImpl();
                    attrs.addAttribute("", "class", "class", "CDATA",
                            "diff-html-added");
                    if (mod.isFirstOfID()) {
                        attrs.addAttribute("", "id", "id", "CDATA", mod
                                .getType()
                                + "-" + prefix + "-" + mod.getID());
View Full Code Here


                if (!newStarted && mod.getType() == ModificationType.ADDED) {
                    AttributesImpl attrs = new AttributesImpl();
                    attrs.addAttribute("", "class", "class", "CDATA",
                            "diff-html-added");
                    if (mod.isFirstOfID()) {
                        attrs.addAttribute("", "id", "id", "CDATA", mod
                                .getType()
                                + "-" + prefix + "-" + mod.getID());
                    }

                    addAttributes(mod, attrs);
View Full Code Here

                    handler.startElement("", "span", "span", attrs);
                    newStarted = true;
                } else if (!changeStarted
                        && mod.getType() == ModificationType.CHANGED) {
                    AttributesImpl attrs = new AttributesImpl();
                    attrs.addAttribute("", "class", "class", "CDATA",
                            "diff-html-changed");
                    if (mod.isFirstOfID()) {
                        attrs.addAttribute("", "id", "id", "CDATA", mod
                                .getType()
                                + "-" + prefix + "-" + mod.getID());
View Full Code Here

                        && mod.getType() == ModificationType.CHANGED) {
                    AttributesImpl attrs = new AttributesImpl();
                    attrs.addAttribute("", "class", "class", "CDATA",
                            "diff-html-changed");
                    if (mod.isFirstOfID()) {
                        attrs.addAttribute("", "id", "id", "CDATA", mod
                                .getType()
                                + "-" + prefix + "-" + mod.getID());
                    }

                    addAttributes(mod, attrs);
View Full Code Here

                    changeStarted = true;
                    changeTXT = mod.getChanges();
                } else if (!remStarted
                        && mod.getType() == ModificationType.REMOVED) {
                    AttributesImpl attrs = new AttributesImpl();
                    attrs.addAttribute("", "class", "class", "CDATA",
                            "diff-html-removed");
                    if (mod.isFirstOfID()) {
                        attrs.addAttribute("", "id", "id", "CDATA", mod
                                .getType()
                                + "-" + prefix + "-" + mod.getID());
View Full Code Here

                        && mod.getType() == ModificationType.REMOVED) {
                    AttributesImpl attrs = new AttributesImpl();
                    attrs.addAttribute("", "class", "class", "CDATA",
                            "diff-html-removed");
                    if (mod.isFirstOfID()) {
                        attrs.addAttribute("", "id", "id", "CDATA", mod
                                .getType()
                                + "-" + prefix + "-" + mod.getID());
                    }
                    addAttributes(mod, attrs);
View Full Code Here

    }

    private void writeImage(ImageNode imgNode) throws SAXException {
        AttributesImpl attrs = imgNode.getAttributes();
        if (imgNode.getModification().getType() == ModificationType.REMOVED)
            attrs.addAttribute("", "changeType", "changeType", "CDATA",
                    "diff-removed-image");
        else if (imgNode.getModification().getType() == ModificationType.ADDED)
            attrs.addAttribute("", "changeType", "changeType", "CDATA",
                    "diff-added-image");
        handler.startElement("", "img", "img", attrs);
View Full Code Here

        AttributesImpl attrs = imgNode.getAttributes();
        if (imgNode.getModification().getType() == ModificationType.REMOVED)
            attrs.addAttribute("", "changeType", "changeType", "CDATA",
                    "diff-removed-image");
        else if (imgNode.getModification().getType() == ModificationType.ADDED)
            attrs.addAttribute("", "changeType", "changeType", "CDATA",
                    "diff-added-image");
        handler.startElement("", "img", "img", attrs);
        handler.endElement("", "img", "img");
    }
View Full Code Here

                consumer.characters("\n".toCharArray(), 0, "\n".length());
                break;
            case '<':
                if (insideTag == false) {
                    AttributesImpl attrs = new AttributesImpl();
                    attrs.addAttribute("", "class", "class", "CDATA",
                            "diff-tag-html");
                    consumer.startElement("", "span", "span", attrs);
                    insideTag = true;
                } else {
                    consumer.endElement("", "span", "span");
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void addRemovedPart(String text) throws Exception {
        AttributesImpl attrs = new AttributesImpl();
        attrs.addAttribute("", "class", "class", "CDATA", "diff-tag-removed");
        attrs.addAttribute("", "id", "id", "CDATA", "removed" + removedID);
        attrs.addAttribute("", "title", "title", "CDATA", "#removed"
                + removedID);
        removedID++;
        consumer.startElement("", "span", "span", attrs);
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.