protected void addAttributes(ChangeText txt, Attributes attributes) { if (attributes.getLength() < 1) return; txt.addText( " " + getWith().toLowerCase() + " " + translateArgument(attributes.getQName(0)) + " " + attributes.getValue(0)); for (int i = 1; i < attributes.getLength() - 1; i++) { txt.addText(", " + translateArgument(attributes.getQName(i)) + " " + attributes.getValue(i)); } if (attributes.getLength() > 1) { txt.addText( " " + getAnd().toLowerCase() + " " + translateArgument(attributes.getQName(attributes.getLength() - 1)) + " " + attributes.getValue(attributes.getLength() - 1)); } }
public void getAddedDescription(ChangeText txt) { htmlLayoutChange = new HtmlLayoutChange(); htmlLayoutChange.setEndingTag(node.getEndTag()); htmlLayoutChange.setOpeningTag(node.getOpeningTag()); htmlLayoutChange.setType(Type.TAG_ADDED); if (sem == TagChangeSematic.MOVED) { txt.addText(getMovedTo() + " " + getArticle().toLowerCase() + " "); txt.addHtml("<b>"); txt.addText(getDescription().toLowerCase()); txt.addHtml("</b>"); } else if (sem == TagChangeSematic.STYLE) { txt.addHtml("<b>"); txt.addText(getDescription()); txt.addHtml("</b>"); txt.addText(" " + getStyleAdded().toLowerCase()); } else { txt.addHtml("<b>"); txt.addText(getDescription()); txt.addHtml("</b>"); txt.addText(" " + getAdded().toLowerCase()); } addAttributes(txt, node.getAttributes()); txt.addText("."); }