apidoc::get_xql_snippet (private)

 apidoc::get_xql_snippet [ -proc_name proc_name ] \
    [ -xql_file xql_file ]

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

Switches:
-proc_name (optional)
-xql_file (optional)
Returns:
matching xql snippet for specified proc_name

Partial Call Graph (max 5 caller/called nodes):
%3 api_proc_documentation api_proc_documentation (public) apidoc::get_xql_snippet apidoc::get_xql_snippet api_proc_documentation->apidoc::get_xql_snippet db_qd_prepare_queryfile_content db_qd_prepare_queryfile_content (public) apidoc::get_xql_snippet->db_qd_prepare_queryfile_content dom dom apidoc::get_xql_snippet->dom template::util::read_file template::util::read_file (public) apidoc::get_xql_snippet->template::util::read_file

Testcases:
No testcase defined.
Source code:
        set content [template::util::read_file $::acs::rootdir/$xql_file]

        # make parsable XML, replace "partialquery" by "fullquery"
        set prepared_content [db_qd_prepare_queryfile_content $content]

        dom parse -simple -- $prepared_content doc
        $doc documentElement root
        set result ""
        foreach q [$root selectNodes //fullquery] {
            if {[string match "$proc_name.*" [$q getAttribute name]]} {
                append result [$q asXML -indent 4] \n
            }
        }
        set readable_xml [string map {&lt; < &gt; > &amp; &} [string trimright $result]]
        return [ns_quotehtml $readable_xml]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: