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

TclApp with TclDom on Unix

1 view
Skip to first unread message

gjschlitz

unread,
Sep 26, 2003, 11:22:38 AM9/26/03
to
I'm trying to create a starkit that uses TclDom on unix (Solaris,
specifically) and having no luck. Is there anything special that needs to
be done to get tcldom wrapped? "can't find package dom" is the result
whenever I run the app. I am able to wrpte apps that use TclXml, but
something funky about dom isn't happy, and I am no expert. Any suggestions
welcome :)


Helmut Giese

unread,
Sep 26, 2003, 11:39:29 AM9/26/03
to
On Fri, 26 Sep 2003 15:22:38 GMT, "gjschlitz" <gjsc...@comcast.net>
wrote:

Maybe a dependent package is missing (and there are several) ?
At a shell prompt say
package require dom
and then run the 'lspackages' script (http://mini.net/tcl/689) like
lspackages dom*

All dom-related packages which have been loaded by now are marked with
a '+'. Be sure to wrap them, too, and repeat as needed. :)
HTH
Helmut Giese

gjschlitz

unread,
Sep 26, 2003, 1:27:24 PM9/26/03
to
> and then run the 'lspackages' script (http://mini.net/tcl/689) like
> lspackages dom*
Thank you Helmut- this excellent proc helped me learn that the "tcldomxml"
is also needed. Problem solved!


gjschlitz

unread,
Sep 26, 2003, 2:00:10 PM9/26/03
to

gjschlitz

unread,
Sep 26, 2003, 3:52:21 PM9/26/03
to
After further review, I realized that my problem actually isn't solved.
Apparently when I was successfuly, I wasn't running a fully-wrapped app, so
the interpreter being used was the one in my environment :( When I chose to
include the interpreter in the wrapping, it no longer worked...same problem
"can't find package dom while executing "package require dom""...I am at
a loss.

"gjschlitz" <gjsc...@comcast.net> wrote in message
news:0G_cb.434030$Oz4.239110@rwcrnsc54...

Helmut Giese

unread,
Sep 26, 2003, 4:10:27 PM9/26/03
to
On Fri, 26 Sep 2003 19:52:21 GMT, "gjschlitz" <gjsc...@comcast.net>
wrote:

>After further review, I realized that my problem actually isn't solved.
>Apparently when I was successfuly, I wasn't running a fully-wrapped app, so
>the interpreter being used was the one in my environment :( When I chose to
>include the interpreter in the wrapping, it no longer worked...same problem
>"can't find package dom while executing "package require dom""...I am at
>a loss.

Sorry to hear this. How about
- including (just about) everything in the starkit
- [package require] ing dom
- and (supposed it works) use [lspackages *] to see which packages got
eventually loaded.
- then remove everything superfluous.

But TclDom's pkgIndex.tcl _is_ tricky. I have my own problems with it
- but since everybody else seems happy with it, I'm on my own :(
Anyway, good luck
Helmut Giese

Pat Thoyts

unread,
Sep 27, 2003, 6:18:44 AM9/27/03
to
"gjschlitz" <gjsc...@comcast.net> writes:

Well you could grab the tclsoap starkit from
http://prdownloads.sourceforge.net/tclsoap/
This has a working tcldom in it that you could unwrap and rebuild into
your own starkit. This one happens to be using the tcldompro code base
(found under tcldom/src).

--
Pat Thoyts http://www.zsplat.freeserve.co.uk/resume.html
To reply, rot13 the return address or read the X-Address header.
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD

gjschlitz

unread,
Sep 27, 2003, 5:01:46 PM9/27/03
to
Thanks for the suggestions...I tried including all packages, and now the
command dom::parse is no longer recognized....I tried many combinations of
the various xml-related packages...not a bit of luck- either it can't find
dom or dom::parse mysteriously vanishes. I've searched around on the tclxml
pages online but can find no docs on this subject either...and no response
on the activestate mailing list...
I even went debugging through the whole thing with "debug auto-loaded
scripts" to see everything that is going on, and -still- can't figure out
what is happening in my environment that is not being wrapped. Has -anyone-
really succeeded in wrapping an app with the dom package and an interpreter
for solaris? I had originally coded my app to use just tclxml using
registered event callbacks for startelement and endelement- and I CAN wrap
this completely, etc, but being able to query via dom tree is MUCH more
flexible- unfortunately completel un-wrappable! Sorry for any time you have
spent....I'm done trying.

Thanks
George

"Helmut Giese" <hgi...@ratiosoft.com> wrote in message
news:3f749be9...@News.CIS.DFN.DE...

Joe English

unread,
Sep 27, 2003, 8:48:56 PM9/27/03
to
Helmut Giese wrote:

>But TclDom's pkgIndex.tcl _is_ tricky. I have my own problems with it
>- but since everybody else seems happy with it, I'm on my own :(

Actually, I don't think _anybody_ is happy with
TclDom's pkgIndex.tcl.

Regrettably I have no suggestions for how to fix it,
but you should know that you're not alone :-)


--Joe English

NO on #157!

Steve Ball

unread,
Sep 28, 2003, 1:12:55 AM9/28/03
to

Hey - I'm open to suggestions!

TclDOM v3.0 will change things entirely. Gone is the attempt
to have a generic layer - every implementation just does its
own thing so only a single package needs to be loaded.

OTOH, TclXML v3.0 retains the generic layer - I find it useful
to have multiple parsers loaded concurrently.

Cheers,
Steve Ball

--
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
Steve...@zveno.com +---------------------------+---------------------
Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099

Steve Ball

unread,
Sep 28, 2003, 1:16:09 AM9/28/03
to gjschlitz

For TclDOM v2.6, you need to include the base tcldom package
as well as the TclDOM/libxml2 package. From previous postings,
I note that you have already deduced that. You also need to
make sure that the libxml2 library is loaded.

I'm currently struggling with using tclapp to wrap some
applications for Windoze, so I, too, am feeling the pain :-(

Helmut Giese

unread,
Sep 29, 2003, 2:56:02 PM9/29/03
to
On 28 Sep 2003 00:48:56 GMT, Joe English
<not.posting.my.emai...@any.more.com> wrote:

Thanks Joe,
for your soothing remarks. :)
How about the following observations for a start:

1) The first 2 statements in TclDom's pkgIndex.tcl say (without line
breaks)
package ifneeded dom::generic 2.6 [list load [file join $dir
Tcldom26.dll]]
package ifneeded dom::c 2.6 [list load [file join $dir
Tcldom26.dll]]

The first is correct, the second looks plainly wrong to me: The Tcldom
DLL simply does not provide dom::c - however TclDomPro (from the 'src'
directory) does. So how about changing this line to load
TclDomPro26.xxx - or whatever the name of this lib should be.

2) This is more of a question: TclDomPro [package provide]s
- "tcldom",
- "dom::c" and
- "dom"
together with a comment explaining that all 3 are expected by various
users (can't locate the comment right now, but that's how I
understoood it).
Fine, but my question is: since TclDom also provides 'dom', what
happens:
- first wins ?
- last wins ?
- the commands they provide are merged somehow?

Hm, I think I'll start a new thread on the pkgIndex.tcl itself, but I
need to reproduce my findings. For the moment I would be grateful for
any comment on the two issues above.
Best regards
Helmut Giese

Jean-Claude Wippler

unread,
Sep 30, 2003, 8:11:32 AM9/30/03
to
Steve Ball <Steve...@zveno.com> wrote...

> TclDOM v3.0 will change things entirely. Gone is the attempt
> to have a generic layer - every implementation just does its
> own thing so only a single package needs to be loaded.
>
> OTOH, TclXML v3.0 retains the generic layer - I find it useful
> to have multiple parsers loaded concurrently.

I haven't looked into TclDOM, but perhaps this points to a need to
define "best practices" on how to set up packages such that one can
work with alternative versions. The prime example being to have
binaries for specific platforms plus a fallback to pure-Tcl code,
which either does the same in Tcl but perhaps slower, or which
gracefully reverts to less functionality - or even just a message
explaining the issue.

Starkits and Critcl make it relatively easy to have several
co-existing platform builds for individual packages, but I still
haven't found a good way to structure code so the "package require"
tries binaries first, and falls back to something else if the binary
is not available or fails to load (because perhaps a shared library it
depends on is missing). Let alone packages which consist of a mix of
scripts and binary code.

This came up briefly at the Tcl/Tk 2002 conference, but AFAIK no
"obvious and natural" (and simple, please) solution came to the
surface back then.

Is there a practical solution for this?

-jcw

PS. New page added to wiki - http://mini.net/tcl/10048

Andreas Kupries

unread,
Oct 1, 2003, 1:12:57 AM10/1/03
to

"gjschlitz" <gjsc...@comcast.net> writes:

http://www.activestate.com/Products/Tcl_Dev_Kit/webcasts/recordings.plex

May 22, 2003 TclApp: Advanced Wrapping Tutorial

This tutorial wraps tcldom, tcldomxml and ensures that the dependency
on the external library 'libxml2' [*] is handled correctly too. You
will have to set up an account at raindance, the webcast provider to
see the recording.

[*] This library is not a tcl package, and thus has to be handled
specially. That is also the reason for the presence of 'advanced'
in the title of the tutorial.

--
Sincerely,
Andreas Kupries <akup...@shaw.ca>
Developer @ <http://www.activestate.com/>
Private <http://www.purl.org/NET/akupries/>
-------------------------------------------------------------------------------
}

0 new messages