// Renderer Attributes Next...
//
AttributeBean[] attributes = renderer.getAttributes();
AttributeBean attribute;
for (int i = 0, len = attributes.length; i < len; i++) {
if (null == (attribute = attributes[i])) {
continue;
}
if (!attribute.isTagAttribute()) {
continue;
}
if (attributeShouldBeExcluded(renderer,
attribute.getAttributeName())) {
continue;
}
writer.startElement("attribute");
description = attribute.getDescription("");
if (description != null) {
String descriptionText =
description.getDescription().trim();
if (descriptionText != null) {
writer.startElement("description");
StringBuffer sb = new StringBuffer();
sb.append("<![CDATA[");
sb.append(descriptionText);
sb.append("]]>\n");
writer.writeText(sb.toString());
writer.closeElement();
}
}
String attributeName = attribute.getAttributeName();
writer.startElement("name");
writer.writeText(attributeName);
writer.closeElement();
writer.startElement("required");
writer.writeText(attribute.isRequired() ?
Boolean.TRUE.toString() :
Boolean.FALSE.toString());
writer.closeElement();
if (!"id".equals(attributeName)) {
// PENDING FIX ME
String type = attribute.getAttributeClass();
//String wrapperType = (String)
// GeneratorUtil.convertToPrimitive(type);
//if (wrapperType != null) {
// type = wrapperType;
//}