[xml] entity substitution

Date view Thread view Subject view Author view

From: Joe McAlerney (joey@silicondefense.com)
Date: Fri Sep 22 2000 - 16:56:21 EDT


Hello,

I am having trouble getting the behavior I want. My application is
escaping the 5 default characters with the appropriate entity
references. When I call xmlNodeSetContent I get a segmentation fault.

Here is relevant gdb backtrace information. Note the entity reference
in the content value of the xmlNodeSetContent call.

Program received signal SIGSEGV, Segmentation fault.
0x40045b6f in xmlGetDocEntity (doc=0x0, name=0x83afaa0 "amp") at
entities.c:549
549 if ((doc->intSubset != NULL) && (doc->intSubset->entities !=
NULL)) {
(gdb) bg
Undefined command: "bg". Try "help".
(gdb) bt
#0 0x40045b6f in xmlGetDocEntity (doc=0x0, name=0x83afaa0 "amp")
    at entities.c:549
#1 0x4006a6b5 in xmlStringGetNodeList (doc=0x0,
    value=0x83af7e0 "GET /../../blah....&cats_and_dogs
HTTP/1.0..Connection: Keep-Alive..User-Agent: Mozilla/4.7 [en] (X11; U;
Linux 2.2.12-20 i686)..Host: 10.0.0.7..Accept: image/gif,
image/x-xbitmap, image/jpeg, ima"...)
    at tree.c:723
#2 0x4006c843 in xmlNodeSetContent (cur=0x83af958,
    content=0x83af7e0 "GET /../../blah....&cats_and_dogs
HTTP/1.0..Connection: Keep-Alive..User-Agent: Mozilla/4.7 [en] (X11; U;
Linux 2.2.12-20 i686)..Host: 10.0.0.7..Accept: image/gif,
image/x-xbitmap, image/jpeg, ima"...)
    at tree.c:2894

I have not changed the value for substituting entities, so it's is still
0. I have explicitly called xmlSubstituteEntitiesDefault(0) as a test,
but nothing changed. Additionally, I have not specified entities of any
kind. Why is xmlGetDocEntity being called if we are not supposed to be
substituting entities?

I'm sure the problem exists in my understanding of libxml's entity
substitution behavior, rather than the library itself. If anyone can
enlighten me, it would be most appreciated.

Thank you,

-Joe M.

----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Sep 22 2000 - 17:43:26 EDT