diff --git a/ChangeLog b/ChangeLog index 1e51151e..473ce45c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu May 2 11:08:22 CEST 2002 Daniel Veillard + + * xsltproc/xsltproc.c libxslt/xsltutils.c doc/xsltproc.xml: + fixed some return code problems raised by Thomas Mauch + Tue Apr 30 18:06:14 CEST 2002 Daniel Veillard * libxslt/transform.c: don't allow adding an attribute to diff --git a/doc/xsltproc.xml b/doc/xsltproc.xml index 3106a063..04a6a0f3 100644 --- a/doc/xsltproc.xml +++ b/doc/xsltproc.xml @@ -318,6 +318,7 @@ 7: unsupported xsl:output method 8: string parameter contains both quote and double-quotes 9: internal processing error + 10: processing was stopped by a terminating message diff --git a/libxslt/xsltutils.c b/libxslt/xsltutils.c index a35a2413..0cdabc6c 100644 --- a/libxslt/xsltutils.c +++ b/libxslt/xsltutils.c @@ -161,6 +161,7 @@ xsltMessage(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst) { } else { xsltGenericError(xsltGenericErrorContext, "xsl:message : terminate expecting 'yes' or 'no'\n"); + ctxt->state = XSLT_STATE_ERROR; } xmlFree(prop); } diff --git a/xsltproc/xsltproc.c b/xsltproc/xsltproc.c index af65d486..69a6702a 100644 --- a/xsltproc/xsltproc.c +++ b/xsltproc/xsltproc.c @@ -282,6 +282,8 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur, const char *filename) { } if (ctxt->state == XSLT_STATE_ERROR) errorno = 9; + if (ctxt->state == XSLT_STATE_STOPPED) + errorno = 10; xsltFreeTransformContext(ctxt); if (timing) { if (repeat) @@ -605,6 +607,10 @@ main(int argc, char **argv) } cur = xsltParseStylesheetDoc(style); if (cur != NULL) { + if (cur->errors != 0) { + errorno = 5; + goto done; + } if (cur->indent == 1) xmlIndentTreeOutput = 1; else