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

Module html

source code

render a tree in HTML.

:copyright: 2000-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: General Public License version 2 - http://www.gnu.org/licenses

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
Variables
  __package__ = None
hash(x)
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