From: Daniel Veillard Date: Fri, 22 Mar 2002 18:28:25 +0000 (+0000) Subject: Fixing bug #75902 error with @foo[..] steps which were not compiled added X-Git-Tag: v1.1.28~976 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a566fee1f363b3d76547adefe019625feff943ab;p=platform%2Fupstream%2Flibxslt.git Fixing bug #75902 error with @foo[..] steps which were not compiled added * libxslt/pattern.c: Fixing bug #75902 error with @foo[..] steps which were not compiled * tests/docs/Makefile.am tests/docs/bug-79.xml tests/general/Makefile.am tests/general/bug-79.*: added a specific example for bug #75902 in the regression tests Daniel --- diff --git a/ChangeLog b/ChangeLog index 65b6fdd..d9238d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Mar 22 19:26:47 CET 2002 Daniel Veillard + + * libxslt/pattern.c: Fixing bug #75902 error with @foo[..] + steps which were not compiled + * tests/docs/Makefile.am tests/docs/bug-79.xml + tests/general/Makefile.am tests/general/bug-79.*: added a + specific example for bug #75902 in the regression tests + Fri Mar 22 16:13:22 CET 2002 Daniel Veillard * libxslt/pattern.c: Fixing bug #75777 error with namespaced diff --git a/libxslt/pattern.c b/libxslt/pattern.c index 4928581..47a86af 100644 --- a/libxslt/pattern.c +++ b/libxslt/pattern.c @@ -1355,7 +1355,7 @@ xsltCompileStepPattern(xsltParserContextPtr ctxt, xmlChar *token) { goto error; } PUSH(XSLT_OP_ATTR, token, URL); - return; + goto parse_predicate; } if (token == NULL) token = xsltScanName(ctxt); @@ -1745,8 +1745,14 @@ xsltCompilePattern(const xmlChar *pattern, xmlDocPtr doc, element->pattern); #endif xsltCompileLocationPathPattern(ctxt); - if (ctxt->error) + if (ctxt->error) { + xsltPrintErrorContext(NULL, style, node); + xsltGenericError(xsltGenericErrorContext, + "xsltCompilePattern : failed to compile '%s'\n", + element->pattern); + style->errors++; goto error; + } /* * Reverse for faster interpretation. @@ -1806,6 +1812,7 @@ xsltCompilePattern(const xmlChar *pattern, xmlDocPtr doc, xsltPrintErrorContext(NULL, NULL, node); /* TODO */ xsltGenericError(xsltGenericErrorContext, "xsltCompilePattern : NULL pattern\n"); + style->errors++; goto error; } diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am index d7cfa7c..7585bf7 100644 --- a/tests/docs/Makefile.am +++ b/tests/docs/Makefile.am @@ -79,6 +79,7 @@ EXTRA_DIST = \ bug-76.xml \ bug-77.xml \ bug-78.xml \ + bug-79.xml \ character.xml \ array.xml \ items.xml diff --git a/tests/docs/bug-79.xml b/tests/docs/bug-79.xml new file mode 100644 index 0000000..a94a515 --- /dev/null +++ b/tests/docs/bug-79.xml @@ -0,0 +1,4 @@ + + + + diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am index 2704a5c..23be6bc 100644 --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -82,6 +82,7 @@ EXTRA_DIST = \ bug-76.out bug-76.xsl \ bug-77.out bug-77.xsl \ bug-78.out bug-78.xsl \ + bug-79.out bug-79.xsl \ character.out character.xsl \ character2.out character2.xsl \ itemschoose.out itemschoose.xsl \ diff --git a/tests/general/bug-79.out b/tests/general/bug-79.out new file mode 100644 index 0000000..0ef4698 --- /dev/null +++ b/tests/general/bug-79.out @@ -0,0 +1,5 @@ + + +SUCCESS + + diff --git a/tests/general/bug-79.xsl b/tests/general/bug-79.xsl new file mode 100644 index 0000000..afef7c5 --- /dev/null +++ b/tests/general/bug-79.xsl @@ -0,0 +1,4 @@ + + +SUCCESS +