apm_load_install_xml (private)
apm_load_install_xml filename binds
Defined in packages/acs-tcl/tcl/apm-install-procs.tcl
Loads an install file and returns the root node. errors out if the file is not there. substitutes variables before parsing so you can provide interpolated values.
- Parameters:
- filename (required)
- relative to serverroot, leading slash needed.
- binds (required)
- list of {variable value variable value ...}
- Returns:
- root_node of the parsed XML file.
- Author:
- Jeff Davis davis@xarg.net
- Created:
- 2003-10-30
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: # Abort if there is no install.xml file set filename $::acs::rootdir$filename if { ![ad_file exists $filename] } { error "File $filename not found" } # Read the whole file set file [open $filename] set __the_body__ [read $file] close $file # Interpolate the vars. if {$binds ne ""} { foreach {var val} $binds { set $var [ns_quotehtml $val] } if {![info exists Id]} { set Id {$Id} } if {[catch {set __the_body__ [subst -nobackslashes -nocommands ${__the_body__}]} err]} { error $err } } set root_node [xml_doc_get_first_node [xml_parse -persist ${__the_body__}]] return $root_nodeGeneric XQL file: packages/acs-tcl/tcl/apm-install-procs.xql
PostgreSQL XQL file: packages/acs-tcl/tcl/apm-install-procs-postgresql.xql
Oracle XQL file: packages/acs-tcl/tcl/apm-install-procs-oracle.xql