apidoc::tcl_to_html (public)

 apidoc::tcl_to_html proc_name

Defined in packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl

Given a proc name, formats it as HTML, including highlighting syntax in various colors and creating hyperlinks to other proc definitions. The inspiration for this proc was the tcl2html script created by Jeff Hobbs.

Known Issues:

  1. This proc will mistakenly highlight switch strings that look like commands as commands, etc.
  2. There are many undocumented AOLserver commands including all of the commands added by modules.
  3. When a proc inside a string has explicitly quoted arguments, they are not formatted.
  4. regexp and regsub are hard to parse properly. E.g. If we use the start option, and we quote its argument, and we have an ugly regexp, then this code might highlight it incorrectly.

proc_name - procedure to format in HTML
Jamie Rasmussen <jrasmuss@mle.ie>

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_apidoc_tclcode_to_html acs_api_browser_apidoc_tclcode_to_html (test acs-api-browser) apidoc::tcl_to_html apidoc::tcl_to_html test_acs_api_browser_apidoc_tclcode_to_html->apidoc::tcl_to_html api_get_body api_get_body (public) apidoc::tcl_to_html->api_get_body apidoc::tclcode_to_html apidoc::tclcode_to_html (public) apidoc::tcl_to_html->apidoc::tclcode_to_html api_called_proc_names api_called_proc_names (private) api_called_proc_names->apidoc::tcl_to_html api_proc_documentation api_proc_documentation (public) api_proc_documentation->apidoc::tcl_to_html packages/xotcl-core/www/show-object.tcl packages/xotcl-core/ www/show-object.tcl packages/xotcl-core/www/show-object.tcl->apidoc::tcl_to_html

Source code:

        if {[namespace which ::xo::api] ne ""} {
            set scope [::xo::api scope_from_proc_index $proc_name]
        } else {
            set scope ""

        set proc_namespace ""
        regexp {^(::)?(.*)::[^:]+$} $proc_name match colons proc_namespace
        return [tclcode_to_html -scope $scope -proc_namespace $proc_namespace [api_get_body $proc_name]]
        #package req nx::pp
        #append result  #    [tclcode_to_html -scope $scope -proc_namespace $proc_namespace [api_get_body $proc_name]]  #    <br>  #    [nx::pp render [api_get_body $proc_name]]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: