+def to_html(clases):
+ print '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">'
+ print '<html lang="es"><head><title>Especificación</title></head><body>'
+ # Recorro clases obtenidas
+ for c in dh.clases:
+ print '<table width="100%%" border="1" summary="Especificación de clase %s">' \
+ % c['name'].encode('iso-8859-1', 'replace')
+ print '<tr><th colspan="3">%s</th></tr>' % c['name'].encode('iso-8859-1', 'replace')
+ print '<tr><td colspan="3">%s</td></tr>' % c['comment'].encode('iso-8859-1', 'replace')
+ print '<tr><th>Atributo</th><th>Tipo</th><th>Descripción</th></tr>'
+ for a in c['attrs']:
+ print '<tr><td>%s</td><td>%s</td><td>%s</td></tr>' \
+ % (a['name'].encode('iso-8859-1', 'replace'),
+ a['type'].encode('iso-8859-1', 'replace'),
+ a['comment'].encode('iso-8859-1', 'replace'))
+ if metodos and c['ops']:
+ for o in c['ops']:
+ print '<tr><th colspan="3">Método</th></tr>'
+ print '<tr><td colspan="3">%s(%s): %s</td></tr>' \
+ % (o['name'].encode('iso-8859-1', 'replace'),
+ param2str(o['params']),
+ o['type'].encode('iso-8859-1', 'replace'))
+ print '<tr><td colspan="3">%s</td></tr>' % \
+ o['comment'].encode('iso-8859-1', 'replace')
+ if o['params']:
+ print '<tr><th>Parámetro</th><th>Tipo</th><th>Descripción</th></tr>'
+ for p in o['params']:
+ print '<tr><td>%s</td><td>%s</td><td>%s</td></tr>' \
+ % (p['name'].encode('iso-8859-1', 'replace'),
+ p['type'].encode('iso-8859-1', 'replace'),
+ p['comment'].encode('iso-8859-1', 'replace'))
+ print '</table>'
+ print '</body></html>'