install::xml::action::call-tcl-proc (private)
install::xml::action::call-tcl-proc node
Defined in packages/acs-tcl/tcl/install-procs.tcl
Call an arbitrary Tcl library procedure. Parameters which have a name are called using the "-param" syntax. If there's no name given, the value is passed directly as a positional parameter. It is the user's responsibility to list all named parameters before any positional parameter (as is necessary if the proc is declared using ad_proc). If a named parameter has an XML attribute declaring its type to be boolean, and the value is blank, the switch is passed without a value. Otherwise, the boolparam=value syntax is used. You can cheat and use this to execute arbitrary Tcl code if you dare, since Tcl commands are just procs ...
- Parameters:
- node (required)
- Author:
- Don Baccus donb@pacifier.com
- Created:
- 2008-12-04
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set cmd [list [apm_required_attribute_value $node name]] set params [xml_node_get_children [lindex $node 0]] foreach param $params { if {[xml_node_get_name $param] ne "param"} { error "Unknown xml element \"[xml_node_get_name $param]\"" } set name [apm_attribute_value -default {} $param name] set id [apm_attribute_value -default {} $param id] set value [apm_attribute_value -default {} $param value] set type [apm_attribute_value -default {} $param type] if {$id ne ""} { set value [install::xml::util::get_id $id] } if { $name ne "" && $type eq "boolean" } { if { $value ne "" } { lappend cmd -${name}=$value } else { lappend cmd -$name } } else { if { $name ne "" } { lappend cmd -$name } lappend cmd $value } } set result [{*}$cmd] set id [apm_attribute_value -default "" $node id] if {$id ne ""} { set ::install::xml::ids($id) $result } returnXQL Not present: Generic, PostgreSQL, Oracle