Commit 5816849e authored by Nick Wellnhofer's avatar Nick Wellnhofer

Treat XSLT_STATE_STOPPED same as errors

xsltApplyStylesheetInternal should treat a stopped transform the same
as an error that didn't stop the transform and return NULL.

Changes the output of some tests that cause errors.
parent 91789dba
......@@ -6151,7 +6151,7 @@ xsltApplyStylesheetInternal(xsltStylesheetPtr style, xmlDocPtr doc,
/*
* Be pedantic.
*/
if ((ctxt != NULL) && (ctxt->state == XSLT_STATE_ERROR)) {
if ((ctxt != NULL) && (ctxt->state != XSLT_STATE_OK)) {
xmlFreeDoc(res);
res = NULL;
}
......
A simple message
A fatal message
no result for ./message.xml
......@@ -29,15 +29,11 @@ test tests: $(top_builddir)/xsltproc/xsltproc
mv $$name.bad $(srcdir)/$$name.err ; \
fi ; \
else \
if [ ! -s $$name.res ] ; then \
echo "Fatal error, no $$name.res\n" ; \
else \
diff $(srcdir)/$$name.out $$name.res ; \
if [ -s $(srcdir)/$$name.err ] ; then \
diff $(srcdir)/$$name.err $$name.bad; \
else \
diff /dev/null $$name.bad; \
fi ; \
diff $(srcdir)/$$name.out $$name.res ; \
if [ -s $(srcdir)/$$name.err ] ; then \
diff $(srcdir)/$$name.err $$name.bad; \
else \
diff /dev/null $$name.bad; \
fi ; \
fi; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true`;\
......
......@@ -5,3 +5,4 @@ XPath error : Invalid expression
xmlXPathCompiledEval: evaluation failed
runtime error: file ./eval.2.xsl line 11 element value-of
XPath evaluation returned no result.
no result for ./eval.2.xml
......@@ -4,3 +4,4 @@ XPath error : Invalid expression
xmlXPathCompiledEval: evaluation failed
runtime error: file ./eval.3.xsl line 11 element value-of
XPath evaluation returned no result.
no result for ./eval.3.xml
......@@ -2,3 +2,4 @@ runtime error: file ./bug-165.xsl line 6 element value-of
Variable 'pStyle' has not been declared.
runtime error: file ./bug-165.xsl line 6 element value-of
XPath evaluation returned no result.
no result for ./../docs/bug-165.xml
runtime error: file ./bug-180.xsl line 4 element copy-of
Variable 'xxx' has not been declared.
no result for ./../docs/bug-180.xml
......@@ -3,3 +3,4 @@ Variable 'nonexistent' has not been declared.
xmlXPathCompiledEval: 1 objects left on the stack.
runtime error: file ./bug-184.xsl line 5 element value-of
XPath evaluation returned no result.
no result for ./../docs/bug-184.xml
<?xml version="1.0"?>
<result/>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment