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 John Utz <ut...@singingfish.com> on 2002/02/21 00:11:21 UTC

XML::Xerces-1.6 error

I am attempting to 'port' SEnumVal.cpp to XML::Xerces.

this is a far as i have gotten, and i am getting a error already.

#!/usr/bin/perl -w

use strict;
use XML::Xerces;
use Getopt::Long;
use vars qw($opt_v $opt_n);

my $USAGE = <<EOU;
USAGE: $0 xmlfilename
    
EOU

die $USAGE unless scalar @ARGV;

my $xmlfile = $ARGV[0];
-f $xmlfile  or die "File '$xmlfile' doesnt exist!\n";

my $sax = XML::Xerces::SAXParser->new();
my $handler = XML::Xerces::PerlErrorHandler->new();

$sax->setValidationSchema($XML::Xerces::SAX2XMLReader::Val_Always);


here's the error:

bash-2.04$ ./SEnumval.pl
../../Compile/XML-Xerces-1.6.0_0/samples/personal-schema.xml
Can't locate auto/XML/Xerces/SAXParser/setValidati.al in @INC (@INC
contains: /usr/local/lib/perl5/5.6.1/i686-linux /usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux
/usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .) at
./SEnumval.pl line 21
bash-2.04$ 

any suggestions?

tnx!

johnu


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


Re: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:

> i used 1.3.9.  and i hacked in the mysteriously nonexistent char
> *file = (char *) __FILE__;

That's very suspicious. I've never had to do that with SWIG. It seems
like something in postSource.pl has gone wrong. You should just run
the swig command by hand and compare the output of that file with the
Xerces.C file you got after postSource.pl operated.

> now i get this, which is something that i recognize, so maybe it means
> that i need to add some more headers:
> 
> Xerces.C:68799: no matching function for call to 

yes, it seems so.

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: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by John Utz <ut...@singingfish.com>.
On 22 Feb 2002, (Jason E. Stewart) wrote:

> "John Utz" <ut...@singingfish.com> writes:
> 
> > On 22 Feb 2002, (Jason E. Stewart) wrote:
> > 
> > > "John Utz" <ut...@singingfish.com> writes:
> > > 
> > > > was i supposed to get about 80-bajillion warnings?
> > > 
> > > Yeah, that's swig, sorry.
> > > 
> > > > it might be good to have you try this with the 1.3.11 version at
> > > > this point and then i'll just recreate my work from there.
> > > 
> > > I warn you, I'm pretty sure anything later than 1.3.9 will give you
> > > trouble - your call
> > 
> > ohh, you mean i want to get an *older* version, not a newer version. i
> > misunderstood.
> > 
> > > > oh shit. the build just died:
> > > > 
> > > > /usr/local/include/xerces/validators/schema/SchemaGrammar.hpp:338:                 
> > > > RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
> > > > (const 
> > > > RefHash3KeysIdPoolEnumerator<SchemaElementDecl> &)
> > > > Xerces.C: In function `void boot_XML__Xerces (CV *)':
> > > > Xerces.C:72926: `file' undeclared (first use this function)
> > > 
> > > Hmmm... You should have something that looks like:
> > > 
> > > XS(SWIG_init) {
> > >     dXSARGS;
> > >     int i;
> > >     char *file = (char *) __FILE__;
> > > 
> > > What do you have?
> > 
> > where should this be? i cant find it in Xerces.C
> 
> At the line of the error, 72926. You probably want to grab 1.3.9

i used 1.3.9.
 and i hacked in the mysteriously nonexistent char *file = (char *) __FILE__;

now i get this, which is something that i recognize, so maybe it means
that i need to add some more headers:

Xerces.C:68799: no matching function for call to 
`NameIdPoolEnumerator<DTDElementDecl>::NameIdPoolEnumerator ()'
/usr/local/include/xerces/util/NameIdPool.c:342: candidates are: 
NameIdPoolEnumerator<TElem>::NameIdPoolEnumerator (NameIdPool<TElem>
*) [with TE
lem = DTDElementDecl]
/usr/local/include/xerces/util/NameIdPool.c:358:                 
NameIdPoolEnumerator<TElem>::NameIdPoolEnumerator (const
NameIdPoolEnumerator<TE
lem> &) [with TElem = 
DTDElementDecl]
Xerces.C: In function `void _wrap_DTDGrammar_getNotationEnumerator (CV 
*)':
Xerces.C:68847: no matching function for call to 
`NameIdPoolEnumerator<XMLNotationDecl>::NameIdPoolEnumerator ()'
/usr/local/include/xerces/util/NameIdPool.c:342: candidates are: 
NameIdPoolEnumerator<TElem>::NameIdPoolEnumerator (NameIdPool<TElem>
*) [with TE
lem = XMLNotationDecl]
/usr/local/include/xerces/util/NameIdPool.c:358:                 
NameIdPoolEnumerator<TElem>::NameIdPoolEnumerator (const
NameIdPoolEnumerator<TE
lem> &) [with TElem = 
XMLNotationDecl]
Xerces.C: In function `void _wrap_SchemaGrammar_getElemEnumerator (CV 
*)':
Xerces.C:70049: no matching function for call to 
`RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
()'
/usr/local/include/xerces/util/RefHash3KeysIdPool.c:393: candidates are: 
RefHash3KeysIdPoolEnumerator<TVal>::RefHash3KeysIdPoolEnumerator
(RefHash3KeysId
Pool<TVal> *, bool = 
false) [with TVal = SchemaElementDecl]
/usr/local/include/xerces/validators/schema/SchemaGrammar.hpp:338:              
   
RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
(c
onst 
RefHash3KeysIdPoolEnumerator<SchemaElementDecl> &)
Xerces.C: In function `void boot_XML__Xerces (CV *)':
Xerces.C:72896: warning: unused variable `I32 items'
/usr/local/include/xerces/util/RefHash3KeysIdPool.c: At top level:
Xerces.C:137: warning: `swig_type_info *SWIG_TypeQuery (const char *)' 
defined but not used
Xerces.C:664: warning: `int swig_magic_readonly (SV *, MAGIC *)' 
defined but not used
make: *** [Xerces.o] Error 1


> jas.
> 
> ---------------------------------------------------------------------
> 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: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by John Utz <ut...@singingfish.com>.

On 22 Feb 2002, (Jason E. Stewart) wrote:

> "John Utz" <ut...@singingfish.com> writes:
> 
> > On 22 Feb 2002, (Jason E. Stewart) wrote:
> > 
> > > "John Utz" <ut...@singingfish.com> writes:
> > > 
> > > > was i supposed to get about 80-bajillion warnings?
> > > 
> > > Yeah, that's swig, sorry.
> > > 
> > > > it might be good to have you try this with the 1.3.11 version at
> > > > this point and then i'll just recreate my work from there.
> > > 
> > > I warn you, I'm pretty sure anything later than 1.3.9 will give you
> > > trouble - your call
> > 
> > ohh, you mean i want to get an *older* version, not a newer version. i
> > misunderstood.
> > 
> > > > oh shit. the build just died:
> > > > 
> > > > /usr/local/include/xerces/validators/schema/SchemaGrammar.hpp:338:                 
> > > > RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
> > > > (const 
> > > > RefHash3KeysIdPoolEnumerator<SchemaElementDecl> &)
> > > > Xerces.C: In function `void boot_XML__Xerces (CV *)':
> > > > Xerces.C:72926: `file' undeclared (first use this function)
> > > 
> > > Hmmm... You should have something that looks like:
> > > 
> > > XS(SWIG_init) {
> > >     dXSARGS;
> > >     int i;
> > >     char *file = (char *) __FILE__;
> > > 
> > > What do you have?
> > 
> > where should this be? i cant find it in Xerces.C
> 
> At the line of the error, 72926. You probably want to grab 1.3.9

i already did, and i get the same error.

i just found the spot where it's missing. i am hacking it in now

> jas.
> 
> ---------------------------------------------------------------------
> 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: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:

> On 22 Feb 2002, (Jason E. Stewart) wrote:
> 
> > "John Utz" <ut...@singingfish.com> writes:
> > 
> > > was i supposed to get about 80-bajillion warnings?
> > 
> > Yeah, that's swig, sorry.
> > 
> > > it might be good to have you try this with the 1.3.11 version at
> > > this point and then i'll just recreate my work from there.
> > 
> > I warn you, I'm pretty sure anything later than 1.3.9 will give you
> > trouble - your call
> 
> ohh, you mean i want to get an *older* version, not a newer version. i
> misunderstood.
> 
> > > oh shit. the build just died:
> > > 
> > > /usr/local/include/xerces/validators/schema/SchemaGrammar.hpp:338:                 
> > > RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
> > > (const 
> > > RefHash3KeysIdPoolEnumerator<SchemaElementDecl> &)
> > > Xerces.C: In function `void boot_XML__Xerces (CV *)':
> > > Xerces.C:72926: `file' undeclared (first use this function)
> > 
> > Hmmm... You should have something that looks like:
> > 
> > XS(SWIG_init) {
> >     dXSARGS;
> >     int i;
> >     char *file = (char *) __FILE__;
> > 
> > What do you have?
> 
> where should this be? i cant find it in Xerces.C

At the line of the error, 72926. You probably want to grab 1.3.9

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: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by John Utz <ut...@singingfish.com>.

On 22 Feb 2002, (Jason E. Stewart) wrote:

> "John Utz" <ut...@singingfish.com> writes:
> 
> > was i supposed to get about 80-bajillion warnings?
> 
> Yeah, that's swig, sorry.
> 
> > it might be good to have you try this with the 1.3.11 version at
> > this point and then i'll just recreate my work from there.
> 
> I warn you, I'm pretty sure anything later than 1.3.9 will give you
> trouble - your call

ohh, you mean i want to get an *older* version, not a newer version. i
misunderstood.

> > oh shit. the build just died:
> > 
> > /usr/local/include/xerces/validators/schema/SchemaGrammar.hpp:338:                 
> > RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
> > (const 
> > RefHash3KeysIdPoolEnumerator<SchemaElementDecl> &)
> > Xerces.C: In function `void boot_XML__Xerces (CV *)':
> > Xerces.C:72926: `file' undeclared (first use this function)
> 
> Hmmm... You should have something that looks like:
> 
> XS(SWIG_init) {
>     dXSARGS;
>     int i;
>     char *file = (char *) __FILE__;
> 
> What do you have?

where should this be? i cant find it in Xerces.C

> jas.
> 
> ---------------------------------------------------------------------
> 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: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:

> was i supposed to get about 80-bajillion warnings?

Yeah, that's swig, sorry.

> it might be good to have you try this with the 1.3.11 version at
> this point and then i'll just recreate my work from there.

I warn you, I'm pretty sure anything later than 1.3.9 will give you
trouble - your call

> oh shit. the build just died:
> 
> /usr/local/include/xerces/validators/schema/SchemaGrammar.hpp:338:                 
> RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
> (const 
> RefHash3KeysIdPoolEnumerator<SchemaElementDecl> &)
> Xerces.C: In function `void boot_XML__Xerces (CV *)':
> Xerces.C:72926: `file' undeclared (first use this function)

Hmmm... You should have something that looks like:

XS(SWIG_init) {
    dXSARGS;
    int i;
    char *file = (char *) __FILE__;

What do you have?

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: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by John Utz <ut...@singingfish.com>.
was i supposed to get about 80-bajillion warnings?

it might be good to have you try this with the 1.3.11 version at this
point and then i'll just recreate my work from there.

oh shit. the build just died:

/usr/local/include/xerces/validators/schema/SchemaGrammar.hpp:338:                 
RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
(const 
RefHash3KeysIdPoolEnumerator<SchemaElementDecl> &)
Xerces.C: In function `void boot_XML__Xerces (CV *)':
Xerces.C:72926: `file' undeclared (first use this function)
Xerces.C:72926: (Each undeclared identifier is reported only once for 
each function it appears in.)
Xerces.C:72896: warning: unused variable `I32 items'
/usr/local/include/xerces/util/RefHash3KeysIdPool.c: At top level:
Xerces.C:137: warning: `swig_type_info *SWIG_TypeQuery (const char *)' 
defined but not used
Xerces.C:664: warning: `int swig_magic_readonly (SV *, MAGIC *)' 
defined but not used
make: *** [Xerces.o] Error 1
bash-2.04$ 


On 22 Feb 2002, (Jason E. Stewart) wrote:

> "John Utz" <ut...@singingfish.com> writes:
> 
> > > You're inadvertantly using Xerces-C from CVS which has the new
> > > directory structure, i.e there is now a xerces/ directory before
> > > the src/ directory. That is for Xerces-C-1.7 which I haven't
> > > *even* begun to look at yet. You'll have to use the 1.6 source
> > > tarball for now unless you want to patch preSWIG.pl up to use the
> > > new directory hierarchy on your own.
> > 
> > thats what i am doing. but i am not using the cvs xerces-c, it's just that
> > i put the xerces includes in /usr/include/xerces by hand.
> 
> Ah, Ok.
> 
> > now i have a new error that i think relates to your confusion about me
> > being able to get a swig from CPAN.
> 
> I looked and the version in CPAN is 1.1p5 which is three years
> old. You definately want a newer one. Try 1.3.10, and if that gives
> you trouble let me know, and I'll upgrade the Xerces.i file to the
> latest version.
> 
> jas.
> 
> ---------------------------------------------------------------------
> 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: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by John Utz <ut...@singingfish.com>.
On 22 Feb 2002, (Jason E. Stewart) wrote:

> "John Utz" <ut...@singingfish.com> writes:
> 
> > > You're inadvertantly using Xerces-C from CVS which has the new
> > > directory structure, i.e there is now a xerces/ directory before
> > > the src/ directory. That is for Xerces-C-1.7 which I haven't
> > > *even* begun to look at yet. You'll have to use the 1.6 source
> > > tarball for now unless you want to patch preSWIG.pl up to use the
> > > new directory hierarchy on your own.
> > 
> > thats what i am doing. but i am not using the cvs xerces-c, it's just that
> > i put the xerces includes in /usr/include/xerces by hand.
> 
> Ah, Ok.
> 
> > now i have a new error that i think relates to your confusion about me
> > being able to get a swig from CPAN.
> 
> I looked and the version in CPAN is 1.1p5 which is three years
> old. You definately want a newer one. Try 1.3.10, and if that gives
> you trouble let me know, and I'll upgrade the Xerces.i file to the
> latest version.

they just released a 1.3.11 so i am trying that now....

> jas.
> 
> ---------------------------------------------------------------------
> 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: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:

> > You're inadvertantly using Xerces-C from CVS which has the new
> > directory structure, i.e there is now a xerces/ directory before
> > the src/ directory. That is for Xerces-C-1.7 which I haven't
> > *even* begun to look at yet. You'll have to use the 1.6 source
> > tarball for now unless you want to patch preSWIG.pl up to use the
> > new directory hierarchy on your own.
> 
> thats what i am doing. but i am not using the cvs xerces-c, it's just that
> i put the xerces includes in /usr/include/xerces by hand.

Ah, Ok.

> now i have a new error that i think relates to your confusion about me
> being able to get a swig from CPAN.

I looked and the version in CPAN is 1.1p5 which is three years
old. You definately want a newer one. Try 1.3.10, and if that gives
you trouble let me know, and I'll upgrade the Xerces.i file to the
latest version.

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: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by John Utz <ut...@singingfish.com>.

On 22 Feb 2002, (Jason E. Stewart) wrote:

> "John Utz" <ut...@singingfish.com> writes:
> 
> > i added the prints for debugging because i am too lame to use the
> > debugger:
> > 
> > my $path;
> > ($file,$path) = fileparse($file);
> > 
> > print "PATH:$path\n";
> > 
> > $path =~ s|^.*/include/||;
> > 
> > print "PATH:$path\n";
> > 
> > 
> > bash-2.04$ make
> > ./preSwig.pl --directory ./Xerces_headers
> > /usr/local/include/xerces/framework/StdInInputSource.hpp
> > PATH:/usr/local/include/xerces/framework/
> > PATH:xerces/framework/
> > Couldn't open ./Xerces_headers/xerces/framework//StdInInputSource.hpp for
> > writing at ./preSwig.pl line 44.
> > 
> > 
> > needs another s// step to get rid of the last slash methinks...
> 
> Actually the // isn't the problem. The problem is the 'xerces' in the
> path.

:-)

yah, as soon as i did the prints i figured that out.

> You're inadvertantly using Xerces-C from CVS which has the new
> directory structure, i.e there is now a xerces/ directory before the
> src/ directory. That is for Xerces-C-1.7 which I haven't *even* begun
> to look at yet. You'll have to use the 1.6 source tarball for now
> unless you want to patch preSWIG.pl up to use the new directory
> hierarchy on your own.

thats what i am doing. but i am not using the cvs xerces-c, it's just that
i put the xerces includes in /usr/include/xerces by hand.

now i have a new error that i think relates to your confusion about me
being able to get a swig from CPAN.

bash-2.04$ make
swig -DVERSION="1.6.0_0" -I. -IHandler -I/usr/local/include/xerces
-package XML::Xerces -perl5 -c++ -shadow -o Xerces.C Xerces.i
/bin/sh: swig: command not found
make: *** [Xerces.C] Error 127

so, now i am gonna go get the 'right' swig dist and take a peek and figure
out what happens.

 
> jas.
> 
> ---------------------------------------------------------------------
> 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: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:

> i added the prints for debugging because i am too lame to use the
> debugger:
> 
> my $path;
> ($file,$path) = fileparse($file);
> 
> print "PATH:$path\n";
> 
> $path =~ s|^.*/include/||;
> 
> print "PATH:$path\n";
> 
> 
> bash-2.04$ make
> ./preSwig.pl --directory ./Xerces_headers
> /usr/local/include/xerces/framework/StdInInputSource.hpp
> PATH:/usr/local/include/xerces/framework/
> PATH:xerces/framework/
> Couldn't open ./Xerces_headers/xerces/framework//StdInInputSource.hpp for
> writing at ./preSwig.pl line 44.
> 
> 
> needs another s// step to get rid of the last slash methinks...

Actually the // isn't the problem. The problem is the 'xerces' in the
path. You're inadvertantly using Xerces-C from CVS which has the new
directory structure, i.e there is now a xerces/ directory before the
src/ directory. That is for Xerces-C-1.7 which I haven't *even* begun
to look at yet. You'll have to use the 1.6 source tarball for now
unless you want to patch preSWIG.pl up to use the new directory
hierarchy on your own.

jas.

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


this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by John Utz <ut...@singingfish.com>.
i added the prints for debugging because i am too lame to use the
debugger:

my $path;
($file,$path) = fileparse($file);

print "PATH:$path\n";

$path =~ s|^.*/include/||;

print "PATH:$path\n";


bash-2.04$ make
./preSwig.pl --directory ./Xerces_headers
/usr/local/include/xerces/framework/StdInInputSource.hpp
PATH:/usr/local/include/xerces/framework/
PATH:xerces/framework/
Couldn't open ./Xerces_headers/xerces/framework//StdInInputSource.hpp for
writing at ./preSwig.pl line 44.


needs another s// step to get rid of the last slash methinks...

On Fri, 22 Feb 2002, John Utz wrote:

> Hi all;
> 
> On 22 Feb 2002, (Jason E. Stewart) wrote:
> 
> > "John Utz" <ut...@singingfish.com> writes:
> > 
> > > so, i went to work flexing my SWIG muscles. I grepped for the
> > > implementation of getElemEnumerator and found 2 of them, one for
> > > Schema and one for DTD's. So i included them both at the top and the
> > > bottom:
> > > 
> > > #include "validators/DTD/DTDGrammar.hpp"
> > > #include "validators/schema/SchemaGrammar.hpp"
> > > 
> > > <....>
> > > 
> > > // support schema content model parsing
> > > %include "validators/DTD/DTDGrammar.hpp"
> > > %include "validators/schema/SchemaGrammar.hpp"
> > 
> > That looks good.
> > 
> > > and then i installed the latest version of swig via perl -e -MCPAN
> > 
> > ???
> > 
> > SWIG is not available via CPAN to my knowledge. You'll have to get it
> > at www.swig.org, or install a package from redhat or debian (if you're
> > using either of those linux distro's).
> 
> nope. 'tis. it's listed as swig, not SWIG. i didnt find it until i tried
> it that way.
> 
> > WORD OF WARNING: There was someone who posted to the list a bit
> > earlier that my Xerces.i interface file isn't working with the latest
> > version of SWIG. I'm using a version checked out from CVS that claims
> > to be 1.3.10
> > 
> > > and i set XERCES_DEVEL in my environment;
> > > 
> > > but i can build anything because it now wants preSwig.pl
> > > 
> > > bash-2.04$ make
> > > preSwig.pl --directory ./Xerces_headers
> > > /usr/local/include/xerces/framework/StdInInputSource.hpp
> > > make: preSwig.pl: Command not found
> > > make: *** [Xerces_headers/framework/StdInInputSource.hpp] Error 127
> > > 
> > > so, whither preSwig.pl?
> > 
> > right where you think it is, along side Xerces.pm, Xerces.C and
> > Xerces.pm. The problem is, I've hard coded /usr/local/bin/perl, and
> > you probably want to change that to be /usr/bin/perl or somesuch.
> 
> doh! why didnt i look? what a git.
> 
> but, the error still occured until i went into the generated makefile and 
> 
> fixed the call to be ./preSwig.pl instead of preswig.pl
> 
> so, now preSwig.pl is barfing because it's magically managed to add an
> extra PATHSEP '/' to the file invocation. 
> 
> bash-2.04$ make
> ./preSwig.pl --directory ./Xerces_headers
> /usr/local/include/xerces/framework/StdInInputSource.hpp
> Couldn't open ./Xerces_headers/xerces/framework//StdInInputSource.hpp for
> writing at ./preSwig.pl line 39.
> make: *** [Xerces_headers/framework/StdInInputSource.hpp] Error 2
> bash-2.04$ 
> 
> 
> this is so weird, because this *usually* occurs because somebody did
> something like this
> 
> export FOO=/bar/baz/
> 
> export FULLPATH=$FOO/path
> 
> which would evaluate to
> 
> /bar/baz//path.
> 
> but i cant seem to find an instance of this occuring....
> 
> > jas.
> > 
> > ---------------------------------------------------------------------
> > 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
> 
> 


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


more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by John Utz <ut...@singingfish.com>.
Hi all;

On 22 Feb 2002, (Jason E. Stewart) wrote:

> "John Utz" <ut...@singingfish.com> writes:
> 
> > so, i went to work flexing my SWIG muscles. I grepped for the
> > implementation of getElemEnumerator and found 2 of them, one for
> > Schema and one for DTD's. So i included them both at the top and the
> > bottom:
> > 
> > #include "validators/DTD/DTDGrammar.hpp"
> > #include "validators/schema/SchemaGrammar.hpp"
> > 
> > <....>
> > 
> > // support schema content model parsing
> > %include "validators/DTD/DTDGrammar.hpp"
> > %include "validators/schema/SchemaGrammar.hpp"
> 
> That looks good.
> 
> > and then i installed the latest version of swig via perl -e -MCPAN
> 
> ???
> 
> SWIG is not available via CPAN to my knowledge. You'll have to get it
> at www.swig.org, or install a package from redhat or debian (if you're
> using either of those linux distro's).

nope. 'tis. it's listed as swig, not SWIG. i didnt find it until i tried
it that way.

> WORD OF WARNING: There was someone who posted to the list a bit
> earlier that my Xerces.i interface file isn't working with the latest
> version of SWIG. I'm using a version checked out from CVS that claims
> to be 1.3.10
> 
> > and i set XERCES_DEVEL in my environment;
> > 
> > but i can build anything because it now wants preSwig.pl
> > 
> > bash-2.04$ make
> > preSwig.pl --directory ./Xerces_headers
> > /usr/local/include/xerces/framework/StdInInputSource.hpp
> > make: preSwig.pl: Command not found
> > make: *** [Xerces_headers/framework/StdInInputSource.hpp] Error 127
> > 
> > so, whither preSwig.pl?
> 
> right where you think it is, along side Xerces.pm, Xerces.C and
> Xerces.pm. The problem is, I've hard coded /usr/local/bin/perl, and
> you probably want to change that to be /usr/bin/perl or somesuch.

doh! why didnt i look? what a git.

but, the error still occured until i went into the generated makefile and 

fixed the call to be ./preSwig.pl instead of preswig.pl

so, now preSwig.pl is barfing because it's magically managed to add an
extra PATHSEP '/' to the file invocation. 

bash-2.04$ make
./preSwig.pl --directory ./Xerces_headers
/usr/local/include/xerces/framework/StdInInputSource.hpp
Couldn't open ./Xerces_headers/xerces/framework//StdInInputSource.hpp for
writing at ./preSwig.pl line 39.
make: *** [Xerces_headers/framework/StdInInputSource.hpp] Error 2
bash-2.04$ 


this is so weird, because this *usually* occurs because somebody did
something like this

export FOO=/bar/baz/

export FULLPATH=$FOO/path

which would evaluate to

/bar/baz//path.

but i cant seem to find an instance of this occuring....

> jas.
> 
> ---------------------------------------------------------------------
> 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: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:

> so, i went to work flexing my SWIG muscles. I grepped for the
> implementation of getElemEnumerator and found 2 of them, one for
> Schema and one for DTD's. So i included them both at the top and the
> bottom:
> 
> #include "validators/DTD/DTDGrammar.hpp"
> #include "validators/schema/SchemaGrammar.hpp"
> 
> <....>
> 
> // support schema content model parsing
> %include "validators/DTD/DTDGrammar.hpp"
> %include "validators/schema/SchemaGrammar.hpp"

That looks good.

> and then i installed the latest version of swig via perl -e -MCPAN

???

SWIG is not available via CPAN to my knowledge. You'll have to get it
at www.swig.org, or install a package from redhat or debian (if you're
using either of those linux distro's).

WORD OF WARNING: There was someone who posted to the list a bit
earlier that my Xerces.i interface file isn't working with the latest
version of SWIG. I'm using a version checked out from CVS that claims
to be 1.3.10

> and i set XERCES_DEVEL in my environment;
> 
> but i can build anything because it now wants preSwig.pl
> 
> bash-2.04$ make
> preSwig.pl --directory ./Xerces_headers
> /usr/local/include/xerces/framework/StdInInputSource.hpp
> make: preSwig.pl: Command not found
> make: *** [Xerces_headers/framework/StdInInputSource.hpp] Error 127
> 
> so, whither preSwig.pl?

right where you think it is, along side Xerces.pm, Xerces.C and
Xerces.pm. The problem is, I've hard coded /usr/local/bin/perl, and
you probably want to change that to be /usr/bin/perl or somesuch.

jas.

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


Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by John Utz <ut...@singingfish.com>.
Ok,

so using the new stuff that is in CVS and that got me to my next bug, of
course!

here is the updated version:

#!/usr/bin/perl -w

use strict;
use XML::Xerces;
use Getopt::Long;
use vars qw($opt_v $opt_n);

my $USAGE = <<EOU;
USAGE: $0 xmlfilename
    
EOU

my $VERSION = q[$Id: SEnumVal.pl,v 1.1 2002/02/16 12:12:12 johnu Exp $ ];

die $USAGE unless scalar @ARGV;

my $xmlfile = $ARGV[0];
-f $xmlfile  or die "File '$xmlfile' doesnt exist!\n";

my $saxParser = XML::Xerces::SAXParser->new();
my $handler = XML::Xerces::PerlErrorHandler->new();

$saxParser->setValidationScheme($XML::Xerces::SAXParser::Val_Always);
$saxParser->setDoSchema(1);
$saxParser->setDoNamespaces(1);
$saxParser->setErrorHandler($handler);

$saxParser->parse(XML::Xerces::LocalFileInputSource->new($xmlfile));

die "Errors Occurred\n" if($saxParser->getErrorCount());
 
die "Non schema Doc, no output available\n" 
    if(!$saxParser->getValidator()->handlesSchema());

die "Non schema grammar, no output available\n"
    if( $saxParser->getValidator()->getGrammar()->getGrammarType() != 
	$XML::Xerces::Grammar::SchemaGrammarType );


my $grammar  = $saxParser->getValidator()->getGrammar();
print "GRAMMAR: $grammar\n";

my $elemEnum  = $grammar->getElemEnumerator();

here is the error:

bash-2.04$ ./SEnumval.pl
../../Compile/XML-Xerces-1.6.0_0/samples/personal-schema.xml
GRAMMAR: XML::Xerces::Grammar=HASH(0x8103790)
Can't locate auto/XML/Xerces/Grammar/getElemEnum.al in @INC (@INC
contains: /usr/local/lib/perl5/5.6.1/i686-linux /usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux
/usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .) at
./SEnumval.pl line 43


so, i went to work flexing my SWIG muscles. I grepped for the
implementation of getElemEnumerator and found 2 of them, one for Schema
and one for DTD's. So i included them both at the top and the bottom:

#include "validators/DTD/DTDGrammar.hpp"
#include "validators/schema/SchemaGrammar.hpp"

<....>

// support schema content model parsing
%include "validators/DTD/DTDGrammar.hpp"
%include "validators/schema/SchemaGrammar.hpp"

and then i installed the latest version of swig via perl -e -MCPAN

and i set XERCES_DEVEL in my environment;

but i can build anything because it now wants preSwig.pl

bash-2.04$ make
preSwig.pl --directory ./Xerces_headers
/usr/local/include/xerces/framework/StdInInputSource.hpp
make: preSwig.pl: Command not found
make: *** [Xerces_headers/framework/StdInInputSource.hpp] Error 127

so, whither preSwig.pl?


On 21 Feb 2002, (Jason E. Stewart) wrote:

> "John Utz" <ut...@singingfish.com> writes:
> 
> > i think that the deal is that the first one will be hard and you'll
> > need to talk me thru it, but after that it should make sense.
> > 
> > i noted with interest the speed in which you fixed the issue when i raised
> > it yesterday....
> 
> I'll be happy to do that. Plus if we have the conversation on the
> list, it's archived and other folks can do it as well...
> 
> > ps: now, what's *really* gonna suck is getting this ported to win32. 
> > 
> > that is where i have to ultimately run this thing. i am pretty concerned
> > about that because i cant get any answer from the guy that was allegedly
> > porting xerces-c to cygwin.
> 
> Ilya Sterin has been working on a straight win32 port using VC++. He's
> the one to bug.
> 
> jas.
> 
> ---------------------------------------------------------------------
> 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: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:

> i think that the deal is that the first one will be hard and you'll
> need to talk me thru it, but after that it should make sense.
> 
> i noted with interest the speed in which you fixed the issue when i raised
> it yesterday....

I'll be happy to do that. Plus if we have the conversation on the
list, it's archived and other folks can do it as well...

> ps: now, what's *really* gonna suck is getting this ported to win32. 
> 
> that is where i have to ultimately run this thing. i am pretty concerned
> about that because i cant get any answer from the guy that was allegedly
> porting xerces-c to cygwin.

Ilya Sterin has been working on a straight win32 port using VC++. He's
the one to bug.

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: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by John Utz <ut...@singingfish.com>.
hi jas and all.

On 21 Feb 2002, (Jason E. Stewart) wrote:

> "John Utz" <ut...@singingfish.com> writes:
> 
> > did you check *all* of your work into cvs? i tried to build out of
> > cvs today at about 2pm Pacific Standard Time and CVS was still
> > looking mighty 1.5.2-ish, so it wont do me any good to not have all
> > of it there....
> 
> Yeah, it was the first commit of the 1.6 stuff, so it has
> everything. I hadn't realized that anyone had actually ever checked
> out the code from CVS...

it's a funny thing.

because on some projects, i am deep in the tree, others, i just refuse to
have anything to do with unreleased code!

for instance, i have been running FreeBSD since before 1.0 (and that's
going to be 9 years in october! wow! ) and i have *never* run
freebsd-current.

but the xerces stuff has been non-stop CVS because XMLSchema support is
very new for everybody, and the XMLSchema that i am working with
(MPEG7) is huge and it makes very aggressive use of the features therein.

> > >   http://xml.apache.org/dist/xerces-p/experimental/
> > > 
> > > I haven't bumped the version number since last time, but it is new.
> > 
> > that's ok, the tarball will be my fallback if i cant build the cvs stuff.
> > 
> > generally, i've been working out of the xml-xerces tree since december for
> > both java and c++ because i've been pushing the envelope pretty hard with
> > both flavors.
> 
> That's excellent. It's very useful to have people actually developing
> code, I hope you'll be able to add your example to the list of sample
> apps. 

that is my intent. 

> There are almost guaranteed to be features still missing. I am willing
> to add things as you need them, but you can do it as well. The trick
> is to look into the Xerces.i file (the SWIG interface module) and see
> what header files I list after a %include directive. Those are the
> files that SWIG is wrapping, if you need a class that is defined in a
> header file that I don't currently include, you can just add another
> %include (and an #include at the top - those show up in the Xerces.C
> %file). Then re-run make, and SWIG should kick in to re-create
> Xerces.pm and Xerces.C for you. In order for that to work, however,
> you must have run 'perl Makefile.PL' with the XERCES_DEVEL environment
> variable set.

this is great. now that i have this 1 paragraph tutorial ( where they all
that simple :-) ) i will actually try and roll my own instead of being
passive and i'll send you the diffs.

> If this is too daunting, I can help.

i think that the deal is that the first one will be hard and you'll need
to talk me thru it, but after that it should make sense.

i noted with interest the speed in which you fixed the issue when i raised
it yesterday....

> Cheers,
> jas.

ps: now, what's *really* gonna suck is getting this ported to win32. 

that is where i have to ultimately run this thing. i am pretty concerned
about that because i cant get any answer from the guy that was allegedly
porting xerces-c to cygwin.


> ---------------------------------------------------------------------
> 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: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:

> did you check *all* of your work into cvs? i tried to build out of
> cvs today at about 2pm Pacific Standard Time and CVS was still
> looking mighty 1.5.2-ish, so it wont do me any good to not have all
> of it there....

Yeah, it was the first commit of the 1.6 stuff, so it has
everything. I hadn't realized that anyone had actually ever checked
out the code from CVS...

> >   http://xml.apache.org/dist/xerces-p/experimental/
> > 
> > I haven't bumped the version number since last time, but it is new.
> 
> that's ok, the tarball will be my fallback if i cant build the cvs stuff.
> 
> generally, i've been working out of the xml-xerces tree since december for
> both java and c++ because i've been pushing the envelope pretty hard with
> both flavors.

That's excellent. It's very useful to have people actually developing
code, I hope you'll be able to add your example to the list of sample
apps. 

There are almost guaranteed to be features still missing. I am willing
to add things as you need them, but you can do it as well. The trick
is to look into the Xerces.i file (the SWIG interface module) and see
what header files I list after a %include directive. Those are the
files that SWIG is wrapping, if you need a class that is defined in a
header file that I don't currently include, you can just add another
%include (and an #include at the top - those show up in the Xerces.C
%file). Then re-run make, and SWIG should kick in to re-create
Xerces.pm and Xerces.C for you. In order for that to work, however,
you must have run 'perl Makefile.PL' with the XERCES_DEVEL environment
variable set.

If this is too daunting, I can help.

Cheers,
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: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by John Utz <ut...@singingfish.com>.
excellent!

On 20 Feb 2002, (Jason E. Stewart) wrote:

> jason@openinformatics.com (Jason E. Stewart) writes:
> 
> > I'll check it all in to CVS tonight, give me an hour.
> 
> OK. It's in CVS, you can check it out if you wish, or you can grab the
> tarball from:

i'll get it from cvs. i expect that i'll be tormenting this further as i
make more progress.

did you check *all* of your work into cvs? i tried to build out of cvs
today at about 2pm Pacific Standard Time and CVS was still looking mighty
1.5.2-ish, so it wont do me any good to not have all of it there....

>   http://xml.apache.org/dist/xerces-p/experimental/
> 
> I haven't bumped the version number since last time, but it is new.

that's ok, the tarball will be my fallback if i cant build the cvs stuff.

generally, i've been working out of the xml-xerces tree since december for
both java and c++ because i've been pushing the envelope pretty hard with
both flavors.

> jas.
> 
> ---------------------------------------------------------------------
> 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: porting SEnumVal.cpp to XML::Xerces 1.6

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

> I'll check it all in to CVS tonight, give me an hour.

OK. It's in CVS, you can check it out if you wish, or you can grab the
tarball from:

  http://xml.apache.org/dist/xerces-p/experimental/

I haven't bumped the version number since last time, but it is new.

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: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by John Utz <ut...@singingfish.com>.
i knew sending the errors off before i took off from the ol' office would
reap great results....


On 20 Feb 2002, (Jason E. Stewart) wrote:

> "John Utz" <ut...@singingfish.com> writes:
> 
> > Ok;
> > 
> > i am making good progress now. but i just got smacked:
> > 
> > here is the code from SEnumVal.cpp
> > 
> >     if ( parser.getValidator().getGrammar()->getGrammarType() !=
> > 	 Grammar::SchemaGrammarType)
> >     {
> >         cout << "\n Non schema grammar, no output available\n" << endl;
> > 	return;
> >     }
> > 
> > here is my implementation in perl:
> > 
> > die "Non schema grammar, no output available\n"
> >     if( $saxParser->getValidator()->getGrammar()->getGrammarType() != 
> > 	$Grammar::SchemaGrammarType );
> > 
> > here is the error:
> > 
> > bash-2.04$ ./SEnumval.pl
> > ../../Compile/XML-Xerces-1.6.0_0/samples/personal-schema.xml
> > Name "Grammar::SchemaGrammarType" used only once: possible typo at
> > ./SEnumval.pl line 37.
> > Can't locate object method "TIEHASH" via package "XML::Xerces::Grammar" at
> > /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/XML/Xerces.pm line 782.
> > 
> > 
> > so, i'll admit that i faked up $Grammar::SchemaGrammarType because it
> > seemed reasonable. is this missing functionality? i grepped for Grammar
> > in the .pm's and didnt find it.
> 
> Ah... God bless SWIG. Five minutes later and we have:
> 
>   DB<2> use XML::Xerces
> 
>   DB<3> $d = XML::Xerces::DOMParser->new
> 
>   DB<4> x $d->getValidator
> 0  XML::Xerces::XMLValidator=HASH(0x10755f48)
>      empty hash
>   DB<5> x $d->getValidator->getGrammar
> 0  undef
>   DB<6> $d->parse('samples/personal.xml')
> 
>   DB<7> x $d->getValidator->getGrammar
> 0  XML::Xerces::Grammar=HASH(0x10393b40)
>      empty hash
>   DB<8> x $d->getValidator->getGrammar->getGrammarType
> 0  0
>   DB<9> p $d->getValidator->getGrammar->getGrammarType == $XML::Xerces::Grammar::DTDGrammarType
> 1
> 
> So it works ;-)
> 
> You'll notice that it's  $XML::Xerces::Grammar::DTDGrammarType and not
> just  $Grammar::DTDGrammarType.

Dude! u rock my world! :-)

> I'll check it all in to CVS tonight, give me an hour.

so this checkin get's *both* grammar types, right? cause i need the
XMLSchema grammar, not the DTD one.....

ohhhh, this is going to be soooo cool.....

> jas.
>
> ---------------------------------------------------------------------
> 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: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:

> Ok;
> 
> i am making good progress now. but i just got smacked:
> 
> here is the code from SEnumVal.cpp
> 
>     if ( parser.getValidator().getGrammar()->getGrammarType() !=
> 	 Grammar::SchemaGrammarType)
>     {
>         cout << "\n Non schema grammar, no output available\n" << endl;
> 	return;
>     }
> 
> here is my implementation in perl:
> 
> die "Non schema grammar, no output available\n"
>     if( $saxParser->getValidator()->getGrammar()->getGrammarType() != 
> 	$Grammar::SchemaGrammarType );
> 
> here is the error:
> 
> bash-2.04$ ./SEnumval.pl
> ../../Compile/XML-Xerces-1.6.0_0/samples/personal-schema.xml
> Name "Grammar::SchemaGrammarType" used only once: possible typo at
> ./SEnumval.pl line 37.
> Can't locate object method "TIEHASH" via package "XML::Xerces::Grammar" at
> /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/XML/Xerces.pm line 782.
> 
> 
> so, i'll admit that i faked up $Grammar::SchemaGrammarType because it
> seemed reasonable. is this missing functionality? i grepped for Grammar
> in the .pm's and didnt find it.

Ah... God bless SWIG. Five minutes later and we have:

  DB<2> use XML::Xerces

  DB<3> $d = XML::Xerces::DOMParser->new

  DB<4> x $d->getValidator
0  XML::Xerces::XMLValidator=HASH(0x10755f48)
     empty hash
  DB<5> x $d->getValidator->getGrammar
0  undef
  DB<6> $d->parse('samples/personal.xml')

  DB<7> x $d->getValidator->getGrammar
0  XML::Xerces::Grammar=HASH(0x10393b40)
     empty hash
  DB<8> x $d->getValidator->getGrammar->getGrammarType
0  0
  DB<9> p $d->getValidator->getGrammar->getGrammarType == $XML::Xerces::Grammar::DTDGrammarType
1

So it works ;-)

You'll notice that it's  $XML::Xerces::Grammar::DTDGrammarType and not
just  $Grammar::DTDGrammarType.

I'll check it all in to CVS tonight, give me an hour.
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: porting SEnumVal.cpp to XML::Xerces 1.6

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:

> bash-2.04$ ./SEnumval.pl
> ../../Compile/XML-Xerces-1.6.0_0/samples/personal-schema.xml
> Name "Grammar::SchemaGrammarType" used only once: possible typo at
> ./SEnumval.pl line 37.
> Can't locate object method "TIEHASH" via package "XML::Xerces::Grammar" at
> /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/XML/Xerces.pm line 782.
> 
> 
> so, i'll admit that i faked up $Grammar::SchemaGrammarType because it
> seemed reasonable. is this missing functionality? i grepped for Grammar
> in the .pm's and didnt find it.

Hey John,

Good Work!

Yes, this functionality does not yet exist in XML::Xerces, I would
need to add the files into the set that SWIG looks at. I'll take a
look at it and check the changes into CVS. You'll have to check them
out of CVS, for details see:

  http://xml.apache.org/cvs.html

The module name is 'xml-xerces/perl'

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: SWIG 1.3.11

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:

> oh yippee!
> 
> your timing is perfect! i've been *deep* into a paper that has to be
> submitted to MPEG by 4pm today and i gotta do real work after i get done
> with that :-)
> 
> and another guy and myself are tackling xerces-c and cygwin. so's things
> is lookin' up!

I'll be soooooo happy when I hear that you get that to work. That
should mean getting XML::Xerces to work under cygwin is trivial.

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: SWIG 1.3.11

Posted by John Utz <ut...@singingfish.com>.
oh yippee!

your timing is perfect! i've been *deep* into a paper that has to be
submitted to MPEG by 4pm today and i gotta do real work after i get done
with that :-)

and another guy and myself are tackling xerces-c and cygwin. so's things
is lookin' up!

On 5 Mar 2002, (Jason E. Stewart) wrote:

> Hey John,
> 
> I've just checked in the changes to:
> 
> * postSource.pl
> * typemaps.i
> 
> that you'll need to work with the latest version of SWIG.
> 
> I've also checked in new versions of:
> 
> * Xerces.C
> * Xerces.pm
> 
> but you won't need those.
> jas.
> 
> 
> ---------------------------------------------------------------------
> 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


SWIG 1.3.11

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

I've just checked in the changes to:

* postSource.pl
* typemaps.i

that you'll need to work with the latest version of SWIG.

I've also checked in new versions of:

* Xerces.C
* Xerces.pm

but you won't need those.
jas.


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


porting SEnumVal.cpp to XML::Xerces 1.6

Posted by John Utz <ut...@singingfish.com>.
Ok;

i am making good progress now. but i just got smacked:

here is the code from SEnumVal.cpp

    if ( parser.getValidator().getGrammar()->getGrammarType() !=
	 Grammar::SchemaGrammarType)
    {
        cout << "\n Non schema grammar, no output available\n" << endl;
	return;
    }

here is my implementation in perl:

die "Non schema grammar, no output available\n"
    if( $saxParser->getValidator()->getGrammar()->getGrammarType() != 
	$Grammar::SchemaGrammarType );

here is the error:

bash-2.04$ ./SEnumval.pl
../../Compile/XML-Xerces-1.6.0_0/samples/personal-schema.xml
Name "Grammar::SchemaGrammarType" used only once: possible typo at
./SEnumval.pl line 37.
Can't locate object method "TIEHASH" via package "XML::Xerces::Grammar" at
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/XML/Xerces.pm line 782.


so, i'll admit that i faked up $Grammar::SchemaGrammarType because it
seemed reasonable. is this missing functionality? i grepped for Grammar
in the .pm's and didnt find it.

help appreciated!

johnu




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


Re: sometimes i am a moron. Re: XML::Xerces-1.6 error

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:

> the reason that my code is in error is because i wrote
> 
> 	$sax->setValidationSchema(
> 
> when i was supposed to write
> 
> 	$sax->setValidationScheme(
> 
> but i'd still like to know why the error message was so seemed so
> irrelevant

You get used to it. That's one of the drawbacks of Perl's Object
Oriented programming. It resolves methods dynamically at run-time. It
tried to find a method and couldn't, so it tried to do autoloading,
and couldn't. So the final error message was what the autoloader gave:
i.e. couldn't locate auto/foo/bar/baz.al

Whenever you see that you know that:

1) You forgot to include the correct 'use Module' statement in your
   program

or

2) You mistyped the method name

In your case it was 2)

jas.

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


sometimes i am a moron. Re: XML::Xerces-1.6 error

Posted by John Utz <ut...@singingfish.com>.
the reason that my code is in error is because i wrote

	$sax->setValidationSchema(

when i was supposed to write

	$sax->setValidationScheme(

but i'd still like to know why the error message was so seemed so
irrelevant

On Wed, 20 Feb 2002, John Utz wrote:

> I am attempting to 'port' SEnumVal.cpp to XML::Xerces.
> 
> this is a far as i have gotten, and i am getting a error already.
> 
> #!/usr/bin/perl -w
> 
> use strict;
> use XML::Xerces;
> use Getopt::Long;
> use vars qw($opt_v $opt_n);
> 
> my $USAGE = <<EOU;
> USAGE: $0 xmlfilename
>     
> EOU
> 
> die $USAGE unless scalar @ARGV;
> 
> my $xmlfile = $ARGV[0];
> -f $xmlfile  or die "File '$xmlfile' doesnt exist!\n";
> 
> my $sax = XML::Xerces::SAXParser->new();
> my $handler = XML::Xerces::PerlErrorHandler->new();
> 
> $sax->setValidationSchema($XML::Xerces::SAX2XMLReader::Val_Always);
> 
> 
> here's the error:
> 
> bash-2.04$ ./SEnumval.pl
> ../../Compile/XML-Xerces-1.6.0_0/samples/personal-schema.xml
> Can't locate auto/XML/Xerces/SAXParser/setValidati.al in @INC (@INC
> contains: /usr/local/lib/perl5/5.6.1/i686-linux /usr/local/lib/perl5/5.6.1
> /usr/local/lib/perl5/site_perl/5.6.1/i686-linux
> /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .) at
> ./SEnumval.pl line 21
> bash-2.04$ 
> 
> any suggestions?
> 
> tnx!
> 
> johnu
> 
> 
> ---------------------------------------------------------------------
> 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