Re: [xslt] Relase of xsldbg-0.7.9, : release of xsldbg-0.8.1
- From: Keith Isdale <k_isdale tpg com au>
- To: xslt <xslt gnome org>
- Cc: xsldbg-announce lists sourceforge net
- Subject: Re: [xslt] Relase of xsldbg-0.7.9, : release of xsldbg-0.8.1
- Date: Tue, 27 Nov 2001 17:37:37 +1000
Hi,
Well what a response to a request for comments. I'm not impressed with the
threat either.
That being said I've made a new release taged rel-0-8-1 in xsldb's cvs .
Which removes these problems. And yes I CAN guarantee that the breakpointAPI
will NOT change.
Attached is a patch to remove the implementation from the xslHandelDebugger
function. Plus a some bug fixes which are
1) Not debugging xsl:attribute and xsl:attribute-set nodes
(attributes.c)
2) Not always debugging the children of a template (transform.c)
The removal of the implementation from xslHandelDebugger means that
xslHandelDebugger is now a blank function.
The previous code that was in breakpointAPI.tar.gz and
libxslt-1.0.7_ki_0.7.9.diff is NOT required. All breakpoint functionality
has now moved to xsldbg. The existing code in libxslt is STILL required for
xsldbg to work
For the files see
http://sourceforge.net/cvs/?group_id=35673
or
http://sourceforge.net/project/showfiles.php?group_id=35673
The sourceforge documentation is out of date and will be fixed later.
Attached is a small diff for libxslt-1.08 to fix the discussed usues.
bye,
Keith
? breakpoint/Makefile
? breakpoint/Makefile.in
? tests/namespaces/err.extra2
? tests/namespaces/err.extra
? tests/namespaces/err.tst2
? tests/namespaces/err.tst3
? tests/namespaces/err.tst4
? tests/namespaces/err.tst
Index: libxslt/attributes.c
===================================================================
RCS file: /cvs/gnome/libxslt/libxslt/attributes.c,v
retrieving revision 1.18
diff -c -r1.18 attributes.c
*** libxslt/attributes.c 2001/10/17 19:21:57 1.18
--- libxslt/attributes.c 2001/11/27 06:52:20
***************
*** 46,51 ****
--- 46,54 ----
#include "imports.h"
#include "transform.h"
+ #ifdef WITH_DEBUGGER
+ #include "../breakpoint/breakpoint.h"
+ #endif
#ifdef WITH_XSLT_DEBUG
#define WITH_XSLT_DEBUG_ATTRIBUTES
#endif
***************
*** 410,415 ****
--- 413,426 ----
"xsl:attribute : node already has children\n");
return;
}
+
+ #ifdef WITH_DEBUGGER
+ /* --- break point code --- */
+ if (xslDebugStatus != DEBUG_NONE) {
+ xslHandleDebugger(inst, node, NULL, ctxt);
+ }
+ #endif
+
if (comp->name == NULL) {
prop = xsltEvalAttrValueTemplate(ctxt, inst, (const xmlChar *)"name",
XSLT_NAMESPACE);
***************
*** 551,556 ****
--- 562,575 ----
}
style = ctxt->style;
+ #ifdef WITH_DEBUGGER
+ /* --- break point code --- */
+ if (style && (xslDebugStatus != DEBUG_NONE)) {
+ values = xmlHashLookup2(style->attributeSets, ncname, prefix);
+ if (values)
+ xslHandleDebugger(values->attr->parent, node, NULL, ctxt);
+ }
+ #endif
while (style != NULL) {
values = xmlHashLookup2(style->attributeSets, ncname, prefix);
while (values != NULL) {
Index: libxslt/transform.c
===================================================================
RCS file: /cvs/gnome/libxslt/libxslt/transform.c,v
retrieving revision 1.155
diff -c -r1.155 transform.c
*** libxslt/transform.c 2001/11/25 14:54:08 1.155
--- libxslt/transform.c 2001/11/27 06:52:27
***************
*** 1015,1024 ****
}
}
- #ifdef WITH_DEBUGGER
-
- /* make it eaier to reuse the code for handling checking of debug
- status and breaking to debugger if needed */
/**
* xslHandleDebugger:
--- 1015,1020 ----
***************
*** 1032,1088 ****
* to the xslDebugBreak function
*/
void
! xslHandleDebugger(xmlNodePtr cur, xmlNodePtr node,
! xsltTemplatePtr templ, xsltTransformContextPtr ctxt)
{
- xslSetActiveBreakPoint(0);
-
- switch (xslDebugStatus) {
-
- /* A temparary stopping point */
- case DEBUG_STOP:
- xslDebugStatus = DEBUG_CONT;
- /* only allow breakpoints at xml elements */
- if (xmlGetLineNo(cur) != -1)
- xslDebugBreak(cur, node, templ, ctxt);
- break;
-
- case DEBUG_STEP:
- /* only allow breakpoints at xml elements */
- if (xmlGetLineNo(cur) != -1)
- xslDebugBreak(cur, node, templ, ctxt);
- break;
-
- case DEBUG_CONT:
- {
- int breakPoint = xslIsBreakPointNode(cur);
-
- if (breakPoint) {
- if (xslIsBreakPointEnabled(breakPoint) == 1) {
- xslSetActiveBreakPoint(breakPoint);
- xslDebugBreak(cur, node, templ, ctxt);
- }
- } else {
- breakPoint = xslIsBreakPointNode(node);
- if (xslIsBreakPointEnabled(breakPoint) == 1) {
- xslSetActiveBreakPoint(breakPoint);
- xslDebugBreak(cur, node, templ, ctxt);
- }
- }
- }
- break;
- }
- }
- #else
- void
- xslHandleDebugger(xmlNodePtr cur, xmlNodePtr node,
- xsltTemplatePtr templ, xsltTransformContextPtr ctxt)
- {
}
- #endif
-
/**
* xsltApplyOneTemplate:
* @ctxt: a XSLT process context
--- 1028,1039 ----
* to the xslDebugBreak function
*/
void
! xslHandleDebugger(xmlNodePtr cur ATTRIBUTE_UNUSED, xmlNodePtr node ATTRIBUTE_UNUSED,
! xsltTemplatePtr templ ATTRIBUTE_UNUSED, xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED)
{
}
/**
* xsltApplyOneTemplate:
* @ctxt: a XSLT process context
***************
*** 1132,1140 ****
if (templ)
xslHandleDebugger(templ->elem, node, templ, ctxt);
! else
! xslHandleDebugger(list, node, templ, ctxt);
!
}
/* -- end --- */
#endif
--- 1083,1092 ----
if (templ)
xslHandleDebugger(templ->elem, node, templ, ctxt);
! else if (list)
! xslHandleDebugger(list, node, templ, ctxt);
! else if (ctxt->inst)
! xslHandleDebugger(ctxt->inst, node, templ, ctxt);
}
/* -- end --- */
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]