Hi al, I had success with the method of debugging entites discussed. The XML book I use did not discuss xml:base which was what had be puzzled in my previous email. The xsldbg implementation is still being tested, so far it works well on a small and large scale (fully able to debug docbook.xsl and a complex document I made) . Below I discuss the changes I've made but here I'd like to give an overview of what problems I can accross. I ended up using functions that emulated xml:base so that I did not need to rely on the xmlNodeGetBase nor xmlNodeSetBase (for the reasons explained below). There seems to be little speed penalty for xsldbg using this method. So there is no need at this time to waste memory with the "xsldbg:uri" attribute set on all child nodes of the xml external entity Problems: ------- 1) xmlNodeGetBase uses attribute "base" name space "xml" but xmlNodeSet base use attribute "xml:base" with no namespace 2) When doing a static copy of a node with a property namespace I get a seg fault. Because the xmlSearchNs functions is used when the target node for the copy has no document 3) I'm still getting strange diff chunk that won't go away until I do a full checkout of libxml . I suggest that the diff be merged by hand if possible Hopefully this is my last email to this thread. Please note line numbers quoted below refer to the line numbers in the diff file attatched. It would be appreciated if I could be advised when the relavant changes have been made to libxml so I can check that the xsldbg implementation still works. I normaly need to allow for at least a 24 hour delay for libxml changes to visable from my ISP. File: config.h.in Line : 13 - 15 Reason: To be ignored File: entiies.c Line : 41 - 80 Reason: Implementation of the entity reference calllback API File: parser.c Line : 86 - 124 Reason: To be ignored File: parser.c Line : 125 - 145 Reason: Handle the reference to an external entitty after it was first resolved File: parser.c Line : 146 - 182 Reason: Handle the reference to an external entitty for a additional reference File: tree.c Line : 188 - 215 Reason: Handle the sitatiion where a property has a namespace and the target has no document. I'm not sure about this, seems to work ok. At least there should be a check for target->doc == NULL to avoid a seg fault when xmlSearchNs is called File: tree.c Line : 216 - 225 Reason: Copy the line number as well. This does not handle the possiblity that the content node in the future many be used differently. File: entites.h Line : 232 - Reason: Declare the entity reference callback API Keith -- Keith Isdale k_isdale tpg com au | xsldbg stylesheet debugger http://xsldbg.sourceforge.net
Attachment:
gnome-xml_ki.diff
Description: diff for fix of debugging xml entities