apidoc::format_see (public)

 apidoc::format_see see

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

Takes the value in the argument "see" and possibly formats it into a link that will give the user more info about that resource

Parameters:
see - a string expected to contain the resource to format
Returns:
the html string representing the resource

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_apidoc_format_see acs_api_browser_apidoc_format_see (test acs-api-browser) apidoc::format_see apidoc::format_see test_acs_api_browser_apidoc_format_see->apidoc::format_see export_vars export_vars (public) apidoc::format_see->export_vars util_url_valid_p util_url_valid_p (public) apidoc::format_see->util_url_valid_p apidoc::format_see_list apidoc::format_see_list (private) apidoc::format_see_list->apidoc::format_see packages/xotcl-core/www/show-object.tcl packages/xotcl-core/ www/show-object.tcl packages/xotcl-core/www/show-object.tcl->apidoc::format_see

Testcases:
acs_api_browser_apidoc_format_see
Source code:
        #regsub -all -- {proc *} $see {} see
        set see [string trim $see]
        if {[nsv_exists api_proc_doc $see]} {
            set href [export_vars -base /api-doc/proc-view {{proc $see}}]
            return [subst {<a href="[ns_quotehtml $href]">$see</a>}]
        }
        set see [string trimleft $see :]
        if {[nsv_exists api_proc_doc $see]} {
            set href [export_vars -base /api-doc/proc-view {{proc $see}}]
            return [subst {<a href="[ns_quotehtml $href]">$see</a>}]
        }
        if {[string match "/doc/*" $see]
            || [util_url_valid_p $see]} {
            return [subst {<a href="[ns_quotehtml $see]">$see</a>}]
        }
        if {[file exists "$::acs::rootdir${see}"]} {
            set href [export_vars -base content-page-view {{source_p 1} {path $see}}]
            return [subst {<a href="[ns_quotehtml $href]">$see</a>}]
        }
        return $see
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: