_handler.startElement(ELEM_APPINFO, _atts);
Enumeration anyNodes = app.getObjects();
while (anyNodes.hasMoreElements()) {
Object obj = anyNodes.nextElement();
if (obj instanceof AnyNode) {
AnyNode2SAX anyNode2SAX = new AnyNode2SAX((AnyNode)obj);
anyNode2SAX.setDocumentHandler(_handler);
anyNode2SAX.start();
}
else {
char[] chars = obj.toString().toCharArray();
_handler.characters(chars, 0, chars.length);
}
}
_handler.endElement(ELEM_APPINFO);
}
//-- process documentation elements
enumeration = annotation.getDocumentation();
String ELEM_DOCUMENTATION = schemaPrefix + DOCUMENTATION;
while (enumeration.hasMoreElements()) {
_atts.clear();
Documentation doc = (Documentation) enumeration.nextElement();
String source = doc.getSource();
String sourceName = _atts.getName(0);
boolean isSourceIsNull = (sourceName == null);
boolean isSourceExists = false;
if (!isSourceIsNull)
{
isSourceExists = sourceName.equals(SchemaNames.SOURCE_ATTR);
}
if (source != null && !isSourceExists)
{
_atts.addAttribute(SchemaNames.SOURCE_ATTR, CDATA,source);
}
_handler.startElement(ELEM_DOCUMENTATION, _atts);
Enumeration anyNodes = doc.getObjects();
while (anyNodes.hasMoreElements()) {
Object obj = anyNodes.nextElement();
if (obj instanceof AnyNode) {
AnyNode2SAX anyNode2SAX = new AnyNode2SAX((AnyNode)obj);
anyNode2SAX.setDocumentHandler(_handler);
anyNode2SAX.start();
}
else {
char[] chars = obj.toString().toCharArray();
_handler.characters(chars, 0, chars.length);