private static String definitionListToHtml(DefinitionList dl){
  if (dl == null) {
    return "null";
  }
  StringBuilder result=new StringBuilder();
  result.append("<table class=\"DefinitionList\">\n" + "<tr><th class=\"DefinitionList\">DefinitionList</th></tr>\n" + "<tr><td class=\"DefinitionList\">");
  if (dl.getDefinedTerm() != null) {
    result.append(contentElementToHtml(dl.getDefinedTerm()) + "\n");
  }
  result.append("<ul>");
  for (  ContentElement ce : dl.getDefinitions()) {
    result.append("<li>" + contentElementToHtml(ce) + "</li>");
  }
  result.append("</ul>\n");
  result.append("</td></tr>\n");
  result.append("</table>\n");
  return result.toString();
}

private static String definitionListToHtml ( DefinitionList dl ) { if ( dl == null ) { return "null" ; } StringBuilder result = new StringBuilder ( ) ; result . append ( "<table class=\"DefinitionList\">\n" + "<tr><th class=\"DefinitionList\">DefinitionList</th></tr>\n" + "<tr><td class=\"DefinitionList\">" ) ; if ( dl . getDefinedTerm ( ) != null ) { result . append ( contentElementToHtml ( dl . getDefinedTerm ( ) ) + "\n" ) ; } result . append ( "<ul>" ) ; for ( ContentElement ce : dl . getDefinitions ( ) ) { result . append ( "<li>" + contentElementToHtml ( ce ) + "</li>" ) ; } result . append ( "</ul>\n" ) ; result . append ( "</td></tr>\n" ) ; result . append ( "</table>\n" ) ; return result . toString ( ) ; }
generates html output for a definitionlist .
