bug 84902 further fix
authorWilliam M. Brack <wbrack@src.gnome.org>
Thu, 4 Jul 2002 08:53:42 +0000 (08:53 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Thu, 4 Jul 2002 08:53:42 +0000 (08:53 +0000)
ChangeLog
libxslt/transform.c

index 3ef9a99..aee06bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jul  4 16:53:00 HKT 2002 William Brack <wbrack@mmm.com.hk>
+
+       * transform.c further enhancement for bug 84902 (another
+         path), also cleaned up code slightly
+
 Wed Jul  3 00:50:00 HKT 2002 William Brack <wbrack@mmm.com.hk>
 
        * transform.c: fixed bug 84902 - message with terminate=yes
index acaf6dc..1891f0b 100644 (file)
@@ -1110,6 +1110,7 @@ xsltApplyOneTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node,
     xmlNodePtr oldInst = NULL;
     xmlAttrPtr attrs;
     int oldBase;
+
     int level = 0;
 
 #ifdef WITH_DEBUGGER
@@ -1243,7 +1244,6 @@ xsltApplyOneTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node,
                 ctxt->insert = insert;
                 info->func(ctxt, node, cur, (xsltElemPreCompPtr) info);
                 ctxt->insert = oldInsert;
-               CHECK_STOPPED;
                 goto skip_children;
             }
 
@@ -1270,7 +1270,6 @@ xsltApplyOneTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node,
                                  "xsltApplyOneTemplate: problem with xsl:%s\n",
                                  cur->name);
             }
-            CHECK_STOPPED;
             goto skip_children;
         } else if ((cur->type == XML_TEXT_NODE) ||
                    (cur->type == XML_CDATA_SECTION_NODE)) {
@@ -1413,6 +1412,12 @@ xsltApplyOneTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node,
             }
         }
       skip_children:
+       /*
+       If xslt:message just processed, might have terminate='yes'
+       If so, break out of while to clean up processing.
+       */
+       if (ctxt->state == XSLT_STATE_STOPPED)
+           break;
         if (cur->next != NULL) {
             cur = cur->next;
             continue;