problem installing tclxslt / getting a string out of an xml file with tcldom 
Author Message
 problem installing tclxslt / getting a string out of an xml file with tcldom

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

first, i'm very new to TCL and XML, i got tclXML and tclDOM running,
but i can't get TCLxslt installed.
Since i have no root-Access to the Server i want to use tclxslt i
installed everything into my homedir.
Now i try to install tclxslt like this:

./configure --prefix=/home/chermann/WWW/tclxslt-2.5
- --exec_prefix=/home/chermann/WWW/tclxslt-2.5 --with-tcldomxml
../tcldom-2.5

this gives me the following error message:

checking for tcldomxml configuration... configure: error: yes
directory doesn't contain tcldomxmlConfig.sh

i checked if the file is there (it wasnt), then i copied
TcldomxmlConfig.sh (T instead of t) to tcldomxmlConfig.sh
but this doesn't solve the problem.
Can anybody help me ?

Another thing:

I have the following XML File
- ----cut----
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE adressen>

<adressen>
        <kunde>
                <name>Name</name>

        </kunde>
[...]
        <kunde>
                <name>Another Name</name>

        </kunde>
</adressen>
- ----cut----

and use it like this:

- ----some code snippets----
source ../tcllib-1.3/lib/tcllib1.3/uri/uri.tcl
set dir ../tclxml-2.5/library/
source ../tclxml-2.5/library/pkgIndex.tcl
package require xml

set dir ../tcldom-2.5/library/
source ../tcldom-2.5/library/pkgIndex.tcl
package require dom

set fp [open $filename r]
set data [read $fp]
close $fp

set doc [dom::DOMImplementation parse $data]
set top [dom::node selectNode $doc adressen]
set kundenliste [dom::DOMImplementation selectNode $doc
adressen/kunde/name]
set samename "false"
foreach kundenname $kundenliste {
    set thename "[dom::DOMImplementation serialize $kundenname]"
    if {$thename == "<name>$name</name>"} {
        set samename "true"
    }

Quote:
}

- ----end of some code snippets----

well my Problem is now, that instead of checking

$thename == "<name>$name</name>"
i'd like to have
$thename == $name

but i cannot get the value of the element name (- well i don't know
how to do it)
i tried [dom::node cget $kundenname -nodeValue] and some other stuff,
but nothing worked, can anyone point me in the right direction ?

Christoph

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use < http://www.*-*-*.com/ >

iQA/AwUBPfntPR/KoXbUeLFCEQL9zQCfRcy532fQntLlER89BXaiiM0VwO4An3Ic
FT07JO4LedE10Hve8IIOYB/q
=2YKy
-----END PGP SIGNATURE-----



Tue, 31 May 2005 23:22:54 GMT  
 problem installing tclxslt / getting a string out of an xml file with tcldom

Hello Christoph,

  I can  give you  only an incomplete  help since I'm  not a
user of TclXSLT...

Quote:
>./configure --prefix=/home/chermann/WWW/tclxslt-2.5
>--exec_prefix=/home/chermann/WWW/tclxslt-2.5 --with-tcldomxml
>../tcldom-2.5

>this gives me the following error message:

>checking for tcldomxml configuration... configure: error: yes

                                                           ^^^

Quote:
>directory doesn't contain tcldomxmlConfig.sh

  When no value is specified for a "--with-..."  argument to
the "configure"  script, "yes" is  the default (you  can see
this  around line  431  of the  script  for TclXSLT  version
2.5). I  think the error is  caused by a missing  "=" in the
command line:

  $ ./configure ...  --with-tcldomxml=../tcldom-2.5
                                     ^
  You  can see  around  line 2238  of  the same  "configure"
script   that   the   file    it   looks   for   is   really
"tcldomxmlConfig.sh".

  The key to face these errors is that, since "configure" is
a script, it's relatively easy to  do a text search in it to
find  particular strings  like  "yes" (unusual  in a  script
compared, for example, to "if") and "tcldomxml". I find that
doing this kind of research  can be really useful (and, yes,
also really hard  if one is not a  little familiar with BASH
and GNU Autoconf, but this is the occasion to learn a bit).

Quote:
>i checked if the file is there (it wasnt), then i copied
>TcldomxmlConfig.sh (T instead of t) to tcldomxmlConfig.sh
>but this doesn't solve the problem.

  I see in the README  that first we have to install TclDOM,
so, maybe, "../tcldom-2.5" is not the correct path. You have
to select  the installation directory of  TclDOM under which
"tcldomxmlConfig.sh"         is        located;        maybe
"/home/chermann/WWW/tcldom<something>" ?

Quote:
>source ../tcllib-1.3/lib/tcllib1.3/uri/uri.tcl
>set dir ../tclxml-2.5/library/
>source ../tclxml-2.5/library/pkgIndex.tcl
>package require xml

  Maybe   this  will   work,   but  I   see   it  as   Wrong
(capitalised).  You'll want  to read  the man  page  for the
[package]  command and  the  man page  of the  [pkg_mkIndex]
command, especially the point [3] of the usage description.

  In short the following is better:

    lappend auto_path ../tclxml-2.5
    package require xml 2

as a first  approximation; you have to be  careful that ".."
is  a relative  path: a  fully qualified  directory  name is
always better to locate package  files. Also, you do want to
give  at   least  the  major  version   number  to  [package
require].

  From now on I'm just guessing...

Quote:
>$thename == "<name>$name</name>"
>i'd like to have
>$thename == $name

>but i  cannot get the  value of the  element name (-  well i
>don't know how to do it) i tried [dom::node cget $kundenname
>-nodeValue] and  some other  stuff, but nothing  worked, can
>anyone point me in the right direction ?

  In the "tests/node.test" file of TclDOM, test "node-10.2",
it seems  correct to use [node cget  ... -nodeValue]; what's
the return value or the  error? I think that the "serialize"
is wrong here: from what I see in "tests/serialization.test",
it's used exactly to get the complete entity tags+data.

  Hope this helps.

Ciao,
Marco

--
"UNIX is not just an operating system, it's a way of doing things..."
David Korn, Early 2001



Wed, 01 Jun 2005 05:52:20 GMT  
 problem installing tclxslt / getting a string out of an xml file with tcldom
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi there,
and a big thanks :)

Quote:
>   I can  give you  only an incomplete  help since I'm  not a
> user of TclXSLT...
> >./configure --prefix=/home/chermann/WWW/tclxslt-2.5
> >--exec_prefix=/home/chermann/WWW/tclxslt-2.5 --with-tcldomxml
> >../tcldom-2.5
> >checking for tcldomxml configuration... configure: error: yes
> 2.5). I  think the error is  caused by a missing  "=" in the
> command line:
>   $ ./configure ...  --with-tcldomxml=../tcldom-2.5

you are absolutely right Man ! That was it :o)

Quote:
>   The key to face these errors is that, since "configure" is
> a script, it's relatively easy to  do a text search in it to
> find  particular strings  like  "yes" (unusual  in a  script
> compared, for example, to "if") and "tcldomxml". I find that
> doing this kind of research  can be really useful (and, yes,
> also really hard  if one is not a  little familiar with BASH
> and GNU Autoconf, but this is the occasion to learn a bit).

thats exactly what i did, but i didn't get where my error was...

Quote:
> [My Include Code]
>   In short the following is better:

>     lappend auto_path ../tclxml-2.5
>     package require xml 2

thanks for the hint :)
I have to learn alot - Tcl is alot different from PHP/perl.

Quote:
>   From now on I'm just guessing...
> >$thename == "<name>$name</name>"
> >i'd like to have
> >$thename == $name

> >but i  cannot get the  value of the  element name (-  well i
> >don't know how to do it) i tried [dom::node cget $kundenname
> >-nodeValue] and  some other  stuff, but nothing  worked, can
> >anyone point me in the right direction ?
>   In the "tests/node.test" file of TclDOM, test "node-10.2",
> it seems  correct to use [node cget  ... -nodeValue]; what's
> the return value or the  error? I think that the "serialize"
> is wrong here: from what I see in "tests/serialization.test",
> it's used exactly to get the complete entity tags+data.

well i just get the empty string:

- ---cut Code---
Kundenname:: Itemobject: ::dom::tcl::document2(node7) Itemname: name
Value:
[...]
Kundenname:: Itemobject: ::dom::tcl::document2(node70) Itemname: name
Value:
- ---cut---

after Value: there should be the Value

I'm doing the following:

- ---cut Code---
set kundenliste [dom::DOMImplementation selectNode $doc
adressen/kunde/name]
[...]
foreach kundenname $kundenliste {
    puts "Kundenname:: Itemobject: $kundenname Itemname: [dom::node
cget $kundenname -nodeName] Value: [dom::node cget $kundenname
- -nodeValue]<br>";

Quote:
}

- ---cut---

any Ideas about that ?

Christoph

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

iQA/AwUBPfpP7R/KoXbUeLFCEQJadQCfaHDrLhvYx/KxvRCzLCC6yezwaJ4An2jK
8b7hb4omXbVFzxiG9FWU49w0
=5cRQ
-----END PGP SIGNATURE-----



Wed, 01 Jun 2005 06:24:00 GMT  
 problem installing tclxslt / getting a string out of an xml file with tcldom
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hallo,

Quote:
>   $ ./configure ...  --with-tcldomxml=../tcldom-2.5

well, i solved this now, and i got another Problem
i use the following Configure comaand:

./configure --prefix=/home/chermann/WWW/tclxslt-2.5
- --exec_prefix=/home/chermann/WWW/tclxslt-2.5
- --with-tcldomxml=/home/chermann/WWW/tcldom-2.5
- --with-libxml2-lib=../libxml2-2.4.30/lib/
- --with-libxslt-include=../libxslt-1.0.23/include/
- --with-libxslt-lib=../libxslt-1.0.23/lib/
- --with-libexslt-include=../libxslt-1.0.23/include/
- --with-libexslt-lib=../libxslt-1.0.23/lib

and i get more and more errors, maxbe someone of you can help me with
this:
Configure runs fine, then

- ----cut-----

gcc -pipe -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=1
- -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1
- -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1
- -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1
- -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1
- -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNEED_MATHERR=1
- -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1  -DVERSION=\"2.4\"
- -DTCLXSLT_VERSION=\"2.4\" -DUSE_TCL_STUBS=1 -DUSE_TCLDOMXML_STUBS=1
 -I"/usr/include" -I../libxml2-2.4.30/include/ -I../libxslt-1.0.23/
- -I../libxslt-1.0.23/include/  -DTCLDOMXML_VERSION=\"\"  -O
- -D__NO_STRING_INLINES -D__NO_MATH_INLINES  -fPIC -c `echo tclxslt.c`
- -o tclxslt.o
In file included from tclxslt.c:22:
tclxslt.h:17:28: tcldom-libxml2.h: No such file or directory
In file included from tclxslt.c:22:
tclxslt.h:73: parse error before `TclXSLTCompileStylesheet'
tclxslt.h:73: warning: data definition has no type or storage class
tclxslt.c:44: parse error before `Tcl_Interp'
tclxslt.c:44: warning: no semicolon at end of struct or union
tclxslt.c:48: parse error before `*'
tclxslt.c:48: warning: data definition has no type or storage class
tclxslt.c:49: parse error before `}'
[...]
- ----cut-----

and around 400 more Lines of errors.
if i have a look at tclxslt.h i find

- ----cut-----
14: #ifdef TCLXSLT_BUILD_AS_FRAMEWORK
15: #include <tcldom-libxml2/tcldom-libxml2.h>
16: #else
17: #include "tcldom-libxml2.h"
18: #endif
- ----cut-----

then i tried to copy tcldom-libxml2.h which is in
../tcldom-2.5/src-libxml2/tcldom-libxml2.h
but that doesn't really help i get a lot of other errors not finding
files & stuff.

Has anybody perhaps a hint how to solve all the file-problems ?

Gnome libxml2, Gnome libxslt, TclXML package v2.5, TclDOM package
v2.5
are all installed without problems.

your help is really appreciated :)
Christoph

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

iQA/AwUBPfpy3R/KoXbUeLFCEQJQ3wCg2kPKWuETBtv5gZ7Iv3tWI92WtbYAoIFS
7cBx7MWSw1SL1taVvpIUcwwU
=DsqV
-----END PGP SIGNATURE-----



Wed, 01 Jun 2005 08:53:18 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. ANN: Version 3.0 of TclXML, TclDOM and TclXSLT

2. ANN: Beta 2 of Version 3.0 of TclXML, TclDOM and TclXSLT

3. ANN: TclXML, TclDOM & TclXSLT v2.6

4. ANN: TclDOM, TclXSLT version 2.4

5. TclXML/TclDOM/TclXSLT v2.3 Release Candidate 2

6. ANN: TclDOM v2.2 and TclXSLT v2.2

7. problem getting XML source with file()

8. Help getting tclxslt working on Windows

9. TclDOM and TCL xml parser

10. XML parser (TclDOM) strange behavour

11. Newbie: inserting an XML-file in an XML-file

12. xml install problem - No module named Node

 

 
Powered by phpBB® Forum Software