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 (required)
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:
        #set see [string trim $see]

        #
        # The leading space is of a scope-less object or class is
        # trimmed already via package contract. Reconstruct it again.
        #
        if {[regexp {^(Class|Object) (.*)$} $see . what obj]} {
            set see $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: