#NEWLINE# def visit_entry( self , node ) : #NEWLINE# #INDENT# atts = { #NEWLINE# #INDENT# 'class' : [ ] , #NEWLINE# #UNINDENT# } #NEWLINE# if isinstance ( node . parent . parent , nodes . thead ) : #NEWLINE# #INDENT# atts [ 'class' ] . append ( 'head' ) #NEWLINE# #UNINDENT# if node . parent . parent . parent . stubs [ node . parent . column ] : #NEWLINE# #INDENT# atts [ 'class' ] . append ( 'stub' ) #NEWLINE# #UNINDENT# if atts [ 'class' ] : #NEWLINE# #INDENT# tagname = 'th' #NEWLINE# atts [ 'class' ] = ' ' . join ( node [ 'class' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# tagname = 'td' #NEWLINE# del atts [ 'class' ] #NEWLINE# #UNINDENT# node . parent . column += 1 #NEWLINE# if ( 'morerows' in node ) : #NEWLINE# #INDENT# atts [ 'rowspan' ] = ( node [ 'morerows' ] + 1 ) #NEWLINE# #UNINDENT# if ( 'morecols' in node ) : #NEWLINE# #INDENT# atts [ 'colspan' ] = ( node [ 'morecols' ] + 1 ) #NEWLINE# node . parent . column += node [ 'morecols' ] #NEWLINE# #UNINDENT# self . body . append ( self . starttag ( node , tagname , '' , ** atts ) ) #NEWLINE# self . context . append ( ( '</%s>\n' % tagname . lower ( ) ) ) #NEWLINE# if ( len ( node ) == 0 ) : #NEWLINE# #INDENT# self . body . append ( '&nbsp;' ) #NEWLINE# #UNINDENT# self . set_first_last ( node )