Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XML Support for Tcl 8.0.5

6 views
Skip to first unread message

Sumit Pokhariyal

unread,
Nov 14, 2002, 12:21:54 AM11/14/02
to
Hi,
I am using a tool (SLATE) which is shipped with Tcl 8.0.5.
I want to write Tcl scripts in Slate's environment to import/export
xml documents to/from Slate.
As I know, TclDOM is available only with Tcl 8.3.3 or higher versions.
So I cann't use it for this purpose.
Another thing which I am exploring is the possibility of
creating msxml or other xml parsers/dom object in this environment
(Slates Tcl 8.0.5).
Any helps...

Thanks in advance for ur help.

Regards,
-Sumit

Jochen Loewer

unread,
Nov 14, 2002, 8:54:13 AM11/14/02
to
Hi Sumit,

any version of tDOM works also fine with Tcl8.0.5. I use it in
production together with 8.0.5 since years now.
See http://loewerj.freeshell.org/tdom.cgi and
http://mini.net/tcl/1948.

Regards,
Jochen.


sumit_po...@yahoo.co.in (Sumit Pokhariyal) wrote in message news:<c89affca.02111...@posting.google.com>...

Steve Ball

unread,
Nov 14, 2002, 6:01:16 PM11/14/02
to
sumit_po...@yahoo.co.in (Sumit Pokhariyal) wrote in message news:<c89affca.02111...@posting.google.com>...
> Hi,
> I am using a tool (SLATE) which is shipped with Tcl 8.0.5.
> I want to write Tcl scripts in Slate's environment to import/export
> xml documents to/from Slate.
> As I know, TclDOM is available only with Tcl 8.3.3 or higher versions.
> So I cann't use it for this purpose.

The basic problem here is that Unicode support got added to
Tcl in v8.1, so there is a fundamental problem supporting
*arbitary* XML documents. If your documents only use 7-bit ASCII
then it will be OK.

There is *some* support in TclXML for Tcl 8.0, but it no longer
gets maintained or tested. If you would like to try it out
and send patches, then I'm happy to incorporate them.

As far as TclDOM is concerned, there is no reason in principle
why it should not work with Tcl 8.0. The only issue is that
it may make use of some feature of later versions of Tcl
(like 'string isempty' or advanced REs). If that is the case
then we may be able to factor those out.

> Another thing which I am exploring is the possibility of
> creating msxml or other xml parsers/dom object in this environment
> (Slates Tcl 8.0.5).
> Any helps...

Actually, I've been thinking about this lately. My current
client is an MS shop and I find myself writing MSXML programs
in C++. Hence, I now have a fair amount of experience with
the SAX and DOM interfaces of MSXML. It wouldn't be too
hard to write TclXML and TclDOM modules to wrap MSXML...
are you volunteering?

Cheers,
Steve Ball

Sumit Pokhariyal

unread,
Nov 21, 2002, 5:24:14 AM11/21/02
to
> Hi Sumit,
>
> any version of tDOM works also fine with Tcl8.0.5. I use it in
> production together with 8.0.5 since years now.
> See http://loewerj.freeshell.org/tdom.cgi and
> http://mini.net/tcl/1948.
>
> Regards,
> Jochen.

Thanks Jochen and Steve for your valuable information.
I am a novice for Tcl, so no chance for volunteering for anything, at
least for now :-)
Back again with the problem, I am facing while using tDOM.I have
copied the tDOM 0.7.4 version in the lib directory of Tcl
installation. When I use command package require tdom, it returns the
correct version information (0.7). But after it, when I try to use dom
command of tDOM package, it prompts "invalid command name 'dom'".
Do I need to install tdom package in some other way or something
else is required to load the commands of tdom package?
What about the tnc package with it, does tdom has any dependency on
it. I am unable to use it too; because of my interpreter (Tcl 8.0.5)
does not supports stub-enabled extensions. Is this a problem in using
tdom? If so what can I do for it?
Your advice will be of great help for me.

Regards,
-Sumit

Helmut Giese

unread,
Nov 21, 2002, 7:38:19 AM11/21/02
to
On 21 Nov 2002 02:24:14 -0800, sumit_po...@yahoo.co.in (Sumit
Pokhariyal) wrote:

>> Hi Sumit,
>>
>> any version of tDOM works also fine with Tcl8.0.5. I use it in
>> production together with 8.0.5 since years now.
>> See http://loewerj.freeshell.org/tdom.cgi and
>> http://mini.net/tcl/1948.
>>
>> Regards,
>> Jochen.
>
>Thanks Jochen and Steve for your valuable information.
>I am a novice for Tcl, so no chance for volunteering for anything, at
>least for now :-)
> Back again with the problem, I am facing while using tDOM.I have
>copied the tDOM 0.7.4 version in the lib directory of Tcl
>installation. When I use command package require tdom, it returns the
>correct version information (0.7). But after it, when I try to use dom
>command of tDOM package, it prompts "invalid command name 'dom'".

Did you [import] the commands from the package (see help on namespaces
for the correct syntax)? Or you can use the syntax
<package>::<command>
to access any command from the imparted namespace (so probably
dom::dom
in your case.

HTH
Helmut Giese

Jochen Loewer

unread,
Nov 21, 2002, 1:28:57 PM11/21/02
to
Hi Summit,

if you compiled tDOM 0.7.x against Tcl8.0.5, it definitely should work --
that's what I use as well.
(Just configure; make or configure --prefix=/opt/tcl; make should build
it).
If you are using the precompiled DLL, you'll have trouble, since this
one is compiled for an stub-enabled Tcl.
So on which platform do you tDOM running?

Regards,
Jochen.


sumit_po...@yahoo.co.in (Sumit Pokhariyal) wrote in message news:<c89affca.02112...@posting.google.com>...

Sumit Pokhariyal

unread,
Nov 22, 2002, 7:22:36 AM11/22/02
to
Thanks Jochen and Helmult,

1) My Environment: -
Windows 2000 Professional, Tcl8.05 (without any support of
stub-enabled extensions), tDOM 0.7.4 (I have also tried the same
things with Windows NT workstation)

2) Tried the following: -
i) Tried the different namespace and command combination, but
nothing seems working.
ii) As well as I have tried the following commands only after
which I could able to see the right tdom package information by using
the "package require tdom" command. Earlier this command (package
require) was resulting into a crash of tclsh80.exe

pkg_mkIndex tdom07 *.tcl-> it changed the contents of the pkgIndex.tcl
to
package ifneeded tdom 0.7 [list source [file join $dir tdom.tcl]]

I have also tried the following commands to load the dll, not just the
tdom.tcl file (all the commands except auto_mkindex crashed the
tclsh80.exe window)
a)pkg_mkIndex tdom07 *.dll
b)load tdom07/tdom07.dll (As per the Rolf's suggestion)
c)pkg_mkIndex –direct tdom07
d)auto_mkindex -> generated tclIndex file


3) Concerns regarding the compilation of tDOM 0.7.x against Tcl8.0.5
for Windows: -

i) Do I need to compile Tcl8.0.5 as well with tDOM 0.7.x or just
tDOM 0.7.x compilation is fine?
ii) Where from I can download the tDOM 0.7.x code?
I have downloaded tDOM-0.7.4.tar.tar (file size is 505 KB. While it
is mentioned 516 KB in the site) from
http://loewerj.freeshell.org/tdom.cgi assuming that, it contains the
code, but WinZip gives error (Error reading error after processing 0
entries) while decompressing this file. (I tried to decompress the
same in Unix as well using tar but it gives directory checksum error)
iii) Any documentation for this compilation process?

Any other suggesion in the light of the above things...

Looking Forward,
-Sumit

0 new messages