Index: openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl 14 Aug 2002 18:57:56 -0000 1.10 +++ openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl 14 Sep 2002 13:23:05 -0000 1.11 @@ -74,10 +74,16 @@ if { ![empty_string_p $node] } { # return [dom::node cget [dom::node cget $node -firstChild] -nodeValue] - return [ns_xml node getcontent [lindex [ns_xml node children $node] 0]] - } else { - return $default + set child [lindex [ns_xml node children $node] 0] + + # JCD 20020914 ns_xml when given something like (i.e. empty content) + # will have the node but the node will not have a child node and the + # getcontent will then fail. + if { ![empty_string_p $child] } { + return [ns_xml node getcontent $child] + } } + return $default } ad_proc -private apm_generate_package_spec { version_id } {