Hi all, I mention that I've been having trouble debgging document entities. There seems to be now way arround it other than get a small amount of code added to libxml2 to allow me to know when enties are refenced, The notification that I get from libxml is via the function xmlAddEntityReference. Which has parameters of 1) Entity declation being refernced 2) The first node in the copy of the entity refenced 3) The last node in the copy of the entity refenced File enties,c Line: 4 - 16 Reason : The functions I hook into, this uses the callback mechanism so conform with other libml code File parser.c Line : 60 - 113 Reason : no matter what I did I could get rid of these misleading diff chunks. To be ignored File: parse.c Line : 114 - 133 Reason : When an entity is first resolved I need to be advised File parse.c Line: 134 - 169 Reason : For each subsiquent reference I need to be advised, At the time xmlAddEntityReference is called the "new" variable will contain the last node copied from entity File : tree.c Line: 177 - 193 Reason : Misleading diff chunk to be ignored File : tree..c Line : 194 - 205 Reason : When copying a entity I need to know the line number that applied to each of the original xml elements. File entites.h Line : 214 - Reason : Declare the extra functions and data type that are needed This has been tested and works on a small scale. The implemation on the xsldbg side is complex . I'm having difficulties dertmining the very bottom node in the entity reference. It translates the entity references (that it was notified of) to an unique line number range within the "master" document . And then determines which "line number offset" applied to what entities as needed. xsldbg is able to debug small included documents but fails on large, complex inclusion. This probably is due to bugs in the xsldbg code. So at this stage I'd rather it not be commited to cvs. I'd like to receive comments on this proposed change. bye, Keith
Attachment:
gnome-xml_ki.diff
Description: patch for debugging include entities