StringBuilder (XmlTag tag, String localName, String kind) { if (tag.getNamespace().equals(RelaxNgMetaDataContributor.RNG_NAMESPACE)) { final StringBuilder sb = new StringBuilder(); sb.append(kind).append(": <b>").append(localName).append("</b><br>"); final XmlTag[] docTags = tag.findSubTags("documentation", COMPATIBILITY_ANNOTATIONS_1_0); for (XmlTag docTag : docTags) { sb.append(docTag.getValue().getTrimmedText()); sb.append("\n"); } final XmlTag nextTag = PsiTreeUtil.getNextSiblingOfType(tag, XmlTag.class); if (nextTag != null) { if ("documentation".equals(nextTag.getLocalName()) && COMPATIBILITY_ANNOTATIONS_1_0.equals(nextTag.getNamespace())) { sb.append(nextTag.getValue().getTrimmedText()); } } return sb; } return null; }