After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 301712 - SaxParserCallback::characters() calls wrong callback
SaxParserCallback::characters() calls wrong callback
Status: RESOLVED FIXED
Product: libxml++
Classification: Bindings
Component: SAX Parser
2.10.x
Other Linux
: Normal normal
: ---
Assigned To: Christophe de Vienne
Christophe de Vienne
Depends on:
Blocks:
 
 
Reported: 2005-04-23 14:50 UTC by Aaron Walker
Modified: 2005-04-24 15:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix_on_chars.diff (750 bytes, patch)
2005-04-23 14:51 UTC, Aaron Walker
none Details | Review

Description Aaron Walker 2005-04-23 14:50:31 UTC
Distribution/Version: Gentoo Base System version 1.6.11

$ tar xvzpf libxml++-2.10.0.tar.gz
$ cd libxml++2.10.0
$ ./configure
$ make CXXFLAGS='-ggdb3'
$ cd examples/sax_parser
$ ./example | grep on_characters
(returns 1)
$ gdb .libs/example
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library
"/lib/libthread_db.so.1".

(gdb) b MySaxParser::on_characters
Breakpoint 1 at 0x804a251: file myparser.cc, line 64.
(gdb) r
Starting program:
/home/ka0ttic/code/libxml++-2.10.0/examples/sax_parser/.libs/example 
[Thread debugging using libthread_db enabled]
[New Thread -1213028160 (LWP 18634)]
<snip output>

Program exited normally.
--

Looking at libxml++/parsers/saxparser.cc shows that
SaxParserCallback::characters() calls SaxParser::on_cdata_block() rather than
SaxParser::on_characters().  Once replaced, the example displays the text as
expected.
Comment 1 Aaron Walker 2005-04-23 14:51:14 UTC
Created attachment 45587 [details] [review]
fix_on_chars.diff
Comment 2 Murray Cumming 2005-04-24 15:06:15 UTC
Committed to HEAD. Thanks. Please remember to create a cvs patch, and patch the
ChangeLog, in future.