Package logilab :: Package common :: Module html
[frames] | no frames]

Module html

source code

render a tree in HTML.

Functions
 
render_HTML_tree(tree, selected_node=None, render_node=None, caption=None)
Generate a pure HTML representation of a tree given as an instance of a logilab.common.tree.Node
source code
Function Details

render_HTML_tree(tree, selected_node=None, render_node=None, caption=None)

source code 

Generate a pure HTML representation of a tree given as an instance
of a logilab.common.tree.Node

selected_node is the currently selected node (if any) which will
have its surrounding <div> have id="selected" (which default
to a bold border libe with the default CSS).

render_node is a function that should take a Node content (Node.id)
as parameter and should return a string (what will be displayed
in the cell).

Warning: proper rendering of the generated html code depends on html_tree.css