From: Steve B. <Ste...@zv...> - 2003-02-03 22:52:08
|
Steve Tattersall wrote: > I am running a tcl script which is coming up with the following error. > > lib/tclxml-2.0/log/log.tcl": no such file or directory > > I have installed both tclxml-2.0 and tclxml-2.5 and neither of these > libraries contain a "log.tcl" file should this be included? I noticed > the libtcl libs do contain this. No version of TclXML has ever included a "log" directory or "log.tcl" file. > In addition I have installed tclsoap1.6.5 but there is no ".so" binary > file installed? I believe TclSOAP is implemented purely as a Tcl script package. Thus it has no compiled code and no shared library. > I hope with my rather vague information, you could shed some light on > this. I'm afraid I can't help very much. Perhaps you could provide a complete error trace to see what is causing the fault. I have cc'd this to the tclxml-users list in case anyone else has encountered the problem. BTW, looking at your script below I see that the only reason you're using SOAP is for the SOAP::selectNode and SOAP::getElementValue functions. These are superceded by the dom commands dom::selectnode and 'dom::node stringValue'. HTHs, Steve Ball > ---------------------------------------------------------------- > My tcl script > > > #!/home/zzarchub/cheshire/bin/webcheshire > > package require SOAP > > proc parse_xml {xml} { > > set doc [dom::DOMImplementation parse $xml] > > # set topNode [SOAP::selectNode $doc "/explain"] > set topNode [SOAP::selectNode $doc "/zeerex"] > set EMMID [dom::element getAttribute $topNode "id"] > set hostNode [SOAP::selectNode $doc "/explain/serverInfo/host"] > set HOST [SOAP::getElementValue $hostNode] > set portNode [SOAP::selectNode $doc "/explain/serverInfo/port"] > set PORT [SOAP::getElementValue $portNode] > set dbNode [SOAP::selectNode $doc "/explain/serverInfo/database"] > set DATABASE [SOAP::getElementValue $dbNode] > set titleNode [SOAP::selectNode $doc "/explain/databaseInfo/title"] > set TITLE [SOAP::getElementValue $titleNode] > > > set attrlists [list] > set idxtitles [list] > set types [list] > set idlist [list] > > set idxInfo [SOAP::selectNode $doc "/explain/indexInfo"] > set childNodes [dom::node children $idxInfo] > foreach child $childNodes { > if {[dom::node cget $child -nodeName] == "index" } { > set mapDone 0 > # Find name > set id [dom::element getAttribute $child "id"] > set nameNode [SOAP::selectNode $child "map/name"] > if {[llength $nameNode] > 1} { > set nameNode [lindex $nameNode 0] > } > if {$nameNode != ""} { > set mytype [SOAP::getElementValue $nameNode] > } else { > set mytype "UnknownType" > } > set attrlist [list] > set idxtitle "" > set c2Nodes [dom::node children $child] > foreach c2 $c2Nodes { > set c2name [dom::node cget $c2 -nodeName] > if {$c2name == "title"} { > set idxtitle [SOAP::getElementValue $c2] > } elseif {$c2name == "map" && $mapDone == 0} { > foreach c3 [dom::node children $c2] { > if {[dom::node cget $c3 -nodeName] == "attr"} { > set mapDone 1 > set aset [dom::element getAttribute $c3 > "attributeSet"] > if {$aset == ""} { > set aset "BIB1" > } > set type [dom::element getAttribute $c3 > "type"] > set val [SOAP::getElementValue $c3] > lappend attrlist [list $aset $type $val] > } > } > } > } > lappend idxtitles $idxtitle > lappend attrlists $attrlist > lappend types $mytype > lappend idlist $id > } > } > return [list $EMMID [list $HOST $PORT $DATABASE $TITLE] $idxtitles > $attrlists $types $idlist] > } > > set CHESHIRE_DATABASE DistAH > set CHESHIRE_CONFIGFILE > /home/zzarchub/distributed/zeerex/DBCONFIGFILE_ste_ead > set CHESHIRE_NUM_START 1 > set CHESHIRE_NUMREQUESTED 1 > set CHESHIRE_RECSYNTAX XML > set CHESHIRE_ELEMENTSET F > > set max_docid 30 > > array set connectionInfo [list] > array set indexAttributes [list] > array set indexTitles [list] > array set indexTypes [list] > array set indexList [list] > > set OUTH [open "emmcfg.tcl" w] > > for {set i 1} {$i <= $max_docid} {incr i} { > set err [catch {search docid $i} qresults] > set xml [lindex $qresults 1] > > set info [parse_xml $xml] > > set EMMID [lindex $info 0] > puts "Processing $EMMID" > puts $OUTH "set connectionInfo($EMMID) \[list [lindex $info 1]\]" > > set idxtitles [lindex $info 2] > set attrlists [lindex $info 3] > set types [lindex $info 4] > set idlist [lindex $info 5] > > puts $OUTH "set indexList($EMMID) \[list $idlist\]" > > set len [llength $idlist] > for {set idx 0} {$idx < $len} {incr idx} { > set id [lindex $idlist $idx] > set title [lindex $idxtitles $idx] > set type [lindex $types $idx] > > set attrs "\\\\\\\[" > foreach a [lindex $attrlists $idx] { > append attrs "[lindex $a 0] [lindex $a 1]=[lindex $a 2], " > } > set attrs [string range $attrs 0 end-2] > append attrs "\\\\\\\]" > > if {$attrs == "\\\\\\\]"} { > #ignore > } else { > puts $OUTH "set indexAttributes($id) \"$attrs\"" > puts $OUTH "set indexTitles($id) \"$title\"" > puts $OUTH "set indexTypes($id) \"$type\"" > } > } > } > > close $OUTH > > > > Steve Tattersall > Archives Hub Programmer > MIMAS > Manchester Computing > The University of Manchester > M13 9PL > Telephone 0161 275 6054 > Fax 0161 275 6040 > http://www.archiveshub.ac.uk -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |