old version of dom/xml included in 8.6.1 for windows (32-bit) - with 'unknown method'

Posted by b.f.lundin@gmail.com on 2014-04-20 10:18
Forums: TEA discussions | OS: Windows 8

Hi!
I posted this at the discussion forum, but I now see that support would be a better place.
I repost it fully .

I got some problems with using dom, installed via teapot
on win2012r2 and tcl 8.6.1

ActiveTcl8.6.1.0.297577-win32-ix86-threaded.exe

I get unknown method thrown by dom 2.6 on win2012R2
which i do not get with tcl 8.4 on the same machine

I also would like the dom package to be upgraded to 3.2. 2.6 is _really_ old

test with 8.4
d:\apps\sattmatewcs\sattmatewcs_dstr\bug_tcl>tclsh test_tcl.tcl
8.4
local/stingray/repository/idf

change path to use 8.6
d:\apps\sattmatewcs\sattmatewcs_dstr\bug_tcl>set path=D:\apps\tools\tcl_as_8.6.1\bin;%path%

d:\apps\sattmatewcs\sattmatewcs_dstr\bug_tcl>tclsh test_tcl.tcl
8.6
unknown method "::dom::tcl::document2(node1)"
while executing
"dom::tcl::DOMImplementation ::dom::tcl::document2(node1) /Process/paths/repositoryRoot/definitions/directory"

invoked from within
"::dom::DOMImplementation selectNode $Local_Doc $Pattern"
(procedure "Find_Target_Path" line 10)
invoked from within
"Find_Target_Path"
invoked from within
"puts [Find_Target_Path]"
(file "test_tcl.tcl" line 22)

d:\apps\sattmatewcs\sattmatewcs_dstr\bug_tcl>type test_tcl.tcl

package require dom

proc Find_Target_Path { } {
  set Path "test.xml"
  if {[catch {set Path_Ptr [open $Path {RDONLY}]}  Result]} {
    puts stderr "[info level 0] - $Result"
    exit 1
  }
  set Local_Doc [::dom::DOMImplementation parse [read $Path_Ptr]]
  catch {close $Path_Ptr}
  set Pattern "/Process/paths/repositoryRoot/definitions/directory"
  set Loc [::dom::DOMImplementation selectNode $Local_Doc $Pattern]
  set fc [::dom::node cget $Loc -firstChild]
  set Xml_Doc_Path [::dom::node cget $fc -nodeValue]
  ::dom::DOMImplementation destroy $Local_Doc
  return $Xml_Doc_Path
}

#Begin
puts [info tclversion]
puts [Find_Target_Path]

###########################

test.xml
d:\apps\sattmatewcs\sattmatewcs_dstr\bug_tcl>type test.xml

<!--
<?xml version='1.0'?>
-->
<Process>
  <paths>
    <tables>
      <definitions>
        <directory>local/stingray/repository/reg</directory>
        <pattern>table_*.xml</pattern>
        <prefix>table</prefix>
      </definitions>
    </tables>
    <repositoryRoot>
      <definitions>
        <directory>local/stingray/repository/idf</directory>
      </definitions>
    </repositoryRoot>
  </paths>
</Process>

regards
Björn Lundin