You are viewing a plain text version of this content. The canonical link for it is here.
Posted to p-dev@xerces.apache.org by Juan Leon <jl...@carnegietech.org> on 2001/03/09 04:15:21 UTC

Namespaces

 Bear with me, please, a little more hand-holding and I may be
able to start contributing rather than draining.

 I have some DTDs that use Xlinks, even though the xlink specification
is still coming and no XSLT supports it without help.  The existance
of DOMParser::setDoNamespaces in Xerces C++ made me hopeful that 
markup with names like xxx:foo would work in Xerces Perl.  But when
I include xlinks in my DTD, Xerces-perl seems to be dumping core
(unless I am doing something wrong, which is quite likely).  

 I attach minimal dtd and xml files that cause the core dump
(at least in my configuration) with the perl (also included) 
that I am using to parse it.  Should I give up on xlinks or
am I making a mistake?

 Thank you for your patience, and thank you.

Juan

Fixed! (was Re: Namespaces)

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Jason E. Stewart" <ja...@openinformatics.com> writes:

> "Juan Leon" <jl...@cs.cmu.edu> writes:
> 
> >  Thanks for your reply.  I will try to replicate the core
> > dump problem in xerces-c 1.4 and go to those guys with the
> > story if I succeed.  If, whenever you have a chance, you can
> > confirm that the problem as it appears in xerces-p is not due
> > to something local to me, I would be indebted.  But no rush.
> > Thanks for all your work.
> 
> Hey Juan,
> 
> After tracking down the awful error handler bug I finally got some
> cycles to test your code again. This is what I get from
> XML-Xerces-1.3.3: 
> 

I'm not sure why I thought I should turn on namespaces...

~/work/xml-xerces/perl $ perl ./samples/DOMCount.pl -v ./test.xml
./test.xml: (1 elems)

So whatever problem there was seems to have been fixed.

jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org


Re: Namespaces

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Juan Leon" <jl...@cs.cmu.edu> writes:

>  Thanks for your reply.  I will try to replicate the core
> dump problem in xerces-c 1.4 and go to those guys with the
> story if I succeed.  If, whenever you have a chance, you can
> confirm that the problem as it appears in xerces-p is not due
> to something local to me, I would be indebted.  But no rush.
> Thanks for all your work.

Hey Juan,

After tracking down the awful error handler bug I finally got some
cycles to test your code again. This is what I get from
XML-Xerces-1.3.3: 

~/work/xml-xerces/perl $ perl samples/DOMCount.pl -v -n ./test.xml 
FATAL ERROR:
LINE:    10
COLUMN:  2
MESSAGE: An exception occured! Type:IllegalArgumentException, Message:String pool id was not legal


I added the -n (namespace) flag to DOMCount.pl hoping it would help,
and we get a little further, but I'm not sure what the string pool ID
problem is coming from.

jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org


Re: Namespaces

Posted by Juan Leon <jl...@cs.cmu.edu>.
 Thanks for your reply.  I will try to replicate the core
dump problem in xerces-c 1.4 and go to those guys with the
story if I succeed.  If, whenever you have a chance, you can
confirm that the problem as it appears in xerces-p is not due
to something local to me, I would be indebted.  But no rush.
Thanks for all your work.

Juan


--On Sunday, March 11, 2001 10:08 AM -0700 "Jason E. Stewart" 
<ja...@openinformatics.com> wrote:

> OK. That's a good point. I'm using a dynamic lib of xerces-c1_3 that I
> compliled off the CVS tree a while back, and I haven't tried compiling
> off the xerces-c1_4.
>
> I should download the Xerces-C-1.3 official tarball and compile
> against that before we make an 'official' release of Xerces.pm
>
[Deleted content]
>
> Let me work on merging the SWIG 1.3 and HEAD branches, and then I'll
> compile it on my x86 box, and let you know what I find. Sorry I can't
> be more helpful at this point. Stay patient and we'll solve it soon.
>
> jas.
>



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org


Re: Namespaces

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Juan Leon" <jl...@cs.cmu.edu> writes:

>  I have now tried xerces-c1.4 and xerces-c1.3, Harmon's tarball as
> well as the cvs main line (swig 1.1) as of 9 March 11:00 EST.  The 
> following compile but dump core on the file with namespaces:
>     
>    xerces-c1.4 w/ Harmon's tarball
>    xerces-c1.4 w/ cvs xerces-p

>  The following causes a run-time error because, apparantly, xerces-c1_3
> does not define BinInputStream (needed by xerces-p) so the DynLoader
> fails to load Xerces.so:
> 
>    xerces-c1.3 w/ cvs xerces-p

OK. That's a good point. I'm using a dynamic lib of xerces-c1_3 that I
compliled off the CVS tree a while back, and I haven't tried compiling
off the xerces-c1_4.

I should download the Xerces-C-1.3 official tarball and compile
against that before we make an 'official' release of Xerces.pm

>  My perl and your perl are similar.   I think the problem must be in the
> way I have compiled xerces-c.  I have tried compiling it with 
> 
>     ./runConfigure -plinux -cgcc -xg++ -minmem -tnative -nsocket
> 
>   as well as with
>   
>     ./runConfigure -plinux -cgcc -xg++ -minmem -tnative -nfileonly

I have only used the latter. I actually don't know much about what all
the different options will buy me :-( 

But still nothing looks problematic so far.

>   Does this look like a problem to you all?
> 
>   (I include my perl -V output as requested)

This all looks fine, except that you are running on x86 and I'm
running on PPC. I believe Harmon has x86 at his place, so this
shouldn't be an issue. What distribution are you running (I'm running
debian). 

Let me work on merging the SWIG 1.3 and HEAD branches, and then I'll
compile it on my x86 box, and let you know what I find. Sorry I can't
be more helpful at this point. Stay patient and we'll solve it soon.

jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org


Re: Namespaces

Posted by Juan Leon <jl...@cs.cmu.edu>.

"Jason E. Stewart" wrote:
> 
> Hey Juan,
> 
> I don't see this at all. This is what I get:
> 
> ~/work/xml-xerces/perl $ perl -Mblib ./parsexml.pl
> Using /home/jasons/work/xml-xerces/perl/blib
> FATAL ERROR:
> LINE:    10
> COLUMN:  2
> MESSAGE: An exception occured! Type:IllegalArgumentException, Message:String pool id was not legal
> 
> Looking at your code, it seems your using Harmon's tarball and not the
> CVS code. I would update to the code I checked in to CVS, or at least
> grab the latest tarball I put up an hour ago.
> 
> If you still have trouble, write again and include the output of perl -V, and
> I'll see what's up.
> 

 Thanks again Jason,

 I have now tried xerces-c1.4 and xerces-c1.3, Harmon's tarball as
well as the cvs main line (swig 1.1) as of 9 March 11:00 EST.  The 
following compile but dump core on the file with namespaces:
    
   xerces-c1.4 w/ Harmon's tarball
   xerces-c1.4 w/ cvs xerces-p
   
 The following causes a run-time error because, apparantly, xerces-c1_3
does not define BinInputStream (needed by xerces-p) so the DynLoader
fails to load Xerces.so:

   xerces-c1.3 w/ cvs xerces-p

 I haven't tried:

   xerces-c1.3 w/ Harmon's tarball

 My perl and your perl are similar.   I think the problem must be in the
way I have compiled xerces-c.  I have tried compiling it with 

    ./runConfigure -plinux -cgcc -xg++ -minmem -tnative -nsocket

  as well as with
  
    ./runConfigure -plinux -cgcc -xg++ -minmem -tnative -nfileonly

  Does this look like a problem to you all?

  (I include my perl -V output as requested)

Many thanks, again.

Juan

----------------------------------------
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.2.5-22smp, archname=i386-linux
    uname='linux porky.devel.redhat.com 2.2.5-22smp #1 smp wed jun 2 09:11:51 edt 1999 i686 unknown '
    config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dcc=gcc -Dcccdlflags=-fPIC -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dd_dosuid -Dd_semctl_semun -Di_db -Di_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Uuselargefiles'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=undef 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='gcc', optimize='-O2 -march=i386 -mcpu=i686', gccversion=2.96 20000731 (experimental)
    cppflags='-fno-strict-aliasing'
    ccflags ='-fno-strict-aliasing'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldl -lm -lc -lcrypt
    libc=/lib/libc-2.1.92.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options:
  Built under linux
  Compiled at Aug  7 2000 10:59:51
  @INC:
    /usr/lib/perl5/5.6.0/i386-linux
    /usr/lib/perl5/5.6.0
    /usr/lib/perl5/site_perl/5.6.0/i386-linux
    /usr/lib/perl5/site_perl/5.6.0
    /usr/lib/perl5/site_perl
    .




"Jason E. Stewart" wrote:
> 
> Hey Juan,
> 
> I don't see this at all. This is what I get:
> 
> ~/work/xml-xerces/perl $ perl -Mblib ./parsexml.pl
> Using /home/jasons/work/xml-xerces/perl/blib
> FATAL ERROR:
> LINE:    10
> COLUMN:  2
> MESSAGE: An exception occured! Type:IllegalArgumentException, Message:String pool id was not legal
> 
> Looking at your code, it seems your using Harmon's tarball and not the
> CVS code. I would update to the code I checked in to CVS, or at least
> grab the latest tarball I put up an hour ago.
> 
> If you still have trouble, write again and include the output of perl -V, and
> I'll see what's up.
> 
> I've included the output of my 'perl -V' below.
> 
> jas.
> 
> --
> /tmp/xml-xerces/perl $ perl -V
> Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
>   Platform:
>     osname=linux, osvers=2.2.17, archname=ppc-linux
>     uname='linux amadeus 2.2.17 #1 tue jul 18 17:51:27 pdt 2000 ppc unknown '
>     config_args=''
>     hint=recommended, useposix=true, d_sigaction=define
>     usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
>     useperlio=undef d_sfio=undef uselargefiles=define
>     use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
>   Compiler:
>     cc='cc', optimize='-O2', gccversion=2.95.2 20000220 (Debian GNU/Linux)
>     cppflags='-fno-strict-aliasing -I/usr/local/include'
>     ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
>     stdchar='char', d_stdstdio=define, usevfork=false
>     intsize=4, longsize=4, ptrsize=4, doublesize=8
>     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
>     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
>     alignbytes=8, usemymalloc=n, prototype=define
>   Linker and Libraries:
>     ld='cc', ldflags =' -L/usr/local/lib'
>     libpth=/usr/local/lib /lib /usr/lib
>     libs=-lnsl -lndbm -ldb -ldl -lm -lc -lposix -lcrypt
>     libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a
>   Dynamic Linking:
>     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
>     cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
> 
> Characteristics of this binary (from libperl):
>   Compile-time options: USE_LARGE_FILES
>   Built under linux
>   Compiled at Aug 15 2000 19:18:19
>   @INC:
>     /usr/local/lib/perl5/5.6.0/ppc-linux
>     /usr/local/lib/perl5/5.6.0
>     /usr/local/lib/perl5/site_perl/5.6.0/ppc-linux
>     /usr/local/lib/perl5/site_perl/5.6.0
>     /usr/local/lib/perl5/site_perl
>     .
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-p-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org


Re: Namespaces

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
Hey Juan,

I don't see this at all. This is what I get:

~/work/xml-xerces/perl $ perl -Mblib ./parsexml.pl
Using /home/jasons/work/xml-xerces/perl/blib
FATAL ERROR:
LINE:    10
COLUMN:  2
MESSAGE: An exception occured! Type:IllegalArgumentException, Message:String pool id was not legal

Looking at your code, it seems your using Harmon's tarball and not the
CVS code. I would update to the code I checked in to CVS, or at least
grab the latest tarball I put up an hour ago.

If you still have trouble, write again and include the output of perl -V, and 
I'll see what's up.

I've included the output of my 'perl -V' below. 

jas.

--
/tmp/xml-xerces/perl $ perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.2.17, archname=ppc-linux
    uname='linux amadeus 2.2.17 #1 tue jul 18 17:51:27 pdt 2000 ppc unknown '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=2.95.2 20000220 (Debian GNU/Linux)
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under linux
  Compiled at Aug 15 2000 19:18:19
  @INC:
    /usr/local/lib/perl5/5.6.0/ppc-linux
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/ppc-linux
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl
    .

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org