diff --git a/ChangeLog b/ChangeLog index 47861257..da0ea32e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Thu Jan 11 11:08:18 PST 2007 William Brack + + * libxslt/transform.c: enhanced to ignore empty text node + in xsltDefaultProcessOneNode (avoid calling xsltCopyText) + (bug #354900) + * xsltproc/xsltproc.c: added check for output file problem, + yielding new error code 11 (Mike Hommey). + * doc/xsltproc.html, doc/xsltproc.xml: added documentation + for above, regenerated docs (doc/xlstproc.1) + Wed Jan 10 19:13:08 PST 2007 William Brack * libexslt/strings.c: added new function 'replace' from Joel diff --git a/doc/xsltproc.1 b/doc/xsltproc.1 index 2fc14ae0..5b5f1a49 100644 --- a/doc/xsltproc.1 +++ b/doc/xsltproc.1 @@ -247,6 +247,9 @@ Internal processing error .TP 3n \fB10\fR Processing was stopped by a terminating message +.TP 3n +\fB11\fR +Could not write the result to the output file .SH "SEE ALSO" .PP \fBlibxml\fR(3), diff --git a/doc/xsltproc.html b/doc/xsltproc.html index 2aafaec9..8d192236 100644 --- a/doc/xsltproc.html +++ b/doc/xsltproc.html @@ -98,4 +98,4 @@
Do not apply default attributes from the document's DTD.

Return values

xsltproc's return codes provide information - that can be used when calling it from scripts.

0: normal

1: no argument

2: too many parameters

3: unknown option

4: failed to parse the stylesheet

5: error in the stylesheet

6: error in one of the documents

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

More Information

libxml web page: http://www.xmlsoft.org/

W3C XSLT page: http://www.w3.org/TR/xslt

+ that can be used when calling it from scripts.

0: normal

1: no argument

2: too many parameters

3: unknown option

4: failed to parse the stylesheet

5: error in the stylesheet

6: error in one of the documents

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

11: could not write the result to the output file

More Information

libxml web page: http://www.xmlsoft.org/

W3C XSLT page: http://www.w3.org/TR/xslt

diff --git a/doc/xsltproc.xml b/doc/xsltproc.xml index 7e3922cb..69e198a9 100644 --- a/doc/xsltproc.xml +++ b/doc/xsltproc.xml @@ -518,6 +518,13 @@ + + 11 + + Could not write the result to the output file + + + diff --git a/libxslt/transform.c b/libxslt/transform.c index 14ed7728..383c90fe 100644 --- a/libxslt/transform.c +++ b/libxslt/transform.c @@ -1753,6 +1753,7 @@ xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node, if (node->content == NULL) { XSLT_TRACE(ctxt,XSLT_TRACE_PROCESS_NODE,xsltGenericDebug(xsltGenericDebugContext, "xsltDefaultProcessOneNode: copy empty text\n")); + return; } else { XSLT_TRACE(ctxt,XSLT_TRACE_PROCESS_NODE,xsltGenericDebug(xsltGenericDebugContext, "xsltDefaultProcessOneNode: copy text %s\n", diff --git a/xsltproc/xsltproc.c b/xsltproc/xsltproc.c index 7f6eeabe..ddd98b6f 100644 --- a/xsltproc/xsltproc.c +++ b/xsltproc/xsltproc.c @@ -456,18 +456,20 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur, const char *filename) { xmlFreeDoc(res); } else { - + int ret; ctxt = xsltNewTransformContext(cur, doc); if (ctxt == NULL) return; if (profile) { - xsltRunStylesheetUser(cur, doc, params, output, + ret = xsltRunStylesheetUser(cur, doc, params, output, NULL, NULL, stderr, ctxt); } else { - xsltRunStylesheetUser(cur, doc, params, output, + ret = xsltRunStylesheetUser(cur, doc, params, output, NULL, NULL, NULL, ctxt); } - if (ctxt->state == XSLT_STATE_ERROR) + if (ret == -1) + errorno = 11; + else if (ctxt->state == XSLT_STATE_ERROR) errorno = 9; else if (ctxt->state == XSLT_STATE_STOPPED) errorno = 10;