diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2007-03-27 14:49:10 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2007-03-27 14:49:10 +0000 |
commit | 3b2a15e6be729de71eb864280666ec4077cfb068 (patch) | |
tree | 8e6486858cf95fcbcef9c881e25bb5a55db4cfbf | |
parent | 18ae451bb0f52b9b2a2e2c4ec77dbe25284c95d5 (diff) | |
download | libxslt-3b2a15e6be729de71eb864280666ec4077cfb068.tar.gz libxslt-3b2a15e6be729de71eb864280666ec4077cfb068.tar.bz2 libxslt-3b2a15e6be729de71eb864280666ec4077cfb068.zip |
apply patch fron Shaun McCance to hook xsl:message construct to the new
* libxslt/xsltutils.c: apply patch fron Shaun McCance to hook
xsl:message construct to the new per-xsltTransformCtxt error
callback if set up.
* Makefile.am: do not package svn files in releases
Daniel
svn path=/trunk/; revision=1424
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | libxslt/xsltutils.c | 14 | ||||
-rw-r--r-- | tests/docbook/Makefile.am | 2 |
4 files changed, 19 insertions, 6 deletions
@@ -1,3 +1,10 @@ +Tue Mar 27 16:50:52 CEST 2007 Daniel Veillard <daniel@veillard.com> + + * libxslt/xsltutils.c: apply patch fron Shaun McCance to hook + xsl:message construct to the new per-xsltTransformCtxt error + callback if set up. + * Makefile.am: do not package svn files in releases + Fri Mar 2 18:45:48 HKT 2007 William Brack <wbrack@mmm.com.hk> * libxslt/xsltconfig.h.in: added setting of TRIO_REPLACE_STDIO diff --git a/Makefile.am b/Makefile.am index a5999904..839d4e5a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,7 +14,7 @@ confexec_DATA = xsltConf.sh bin_SCRIPTS = xslt-config dist-hook: cleanup libxslt.spec - (cd $(srcdir) ; tar -cf - --exclude CVS win32 vms examples) | (cd $(distdir); tar xf -) + (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn win32 vms examples) | (cd $(distdir); tar xf -) CVS_EXTRA_DIST = diff --git a/libxslt/xsltutils.c b/libxslt/xsltutils.c index 375ecfcf..370b22dd 100644 --- a/libxslt/xsltutils.c +++ b/libxslt/xsltutils.c @@ -425,12 +425,19 @@ xsltPointerListClear(xsltPointerListPtr list) */ void xsltMessage(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst) { + xmlGenericErrorFunc error = xsltGenericError; + void *errctx = xsltGenericErrorContext; xmlChar *prop, *message; int terminate = 0; if ((ctxt == NULL) || (inst == NULL)) return; + if (ctxt->error != NULL) { + error = ctxt->error; + errctx = ctxt->errctx; + } + prop = xmlGetNsProp(inst, (const xmlChar *)"terminate", NULL); if (prop != NULL) { if (xmlStrEqual(prop, (const xmlChar *)"yes")) { @@ -438,7 +445,7 @@ xsltMessage(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst) { } else if (xmlStrEqual(prop, (const xmlChar *)"no")) { terminate = 0; } else { - xsltGenericError(xsltGenericErrorContext, + error(errctx, "xsl:message : terminate expecting 'yes' or 'no'\n"); ctxt->state = XSLT_STATE_ERROR; } @@ -448,10 +455,9 @@ xsltMessage(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst) { if (message != NULL) { int len = xmlStrlen(message); - xsltGenericError(xsltGenericErrorContext, "%s", - (const char *)message); + error(errctx, "%s", (const char *)message); if ((len > 0) && (message[len - 1] != '\n')) - xsltGenericError(xsltGenericErrorContext, "\n"); + error(errctx, "\n"); xmlFree(message); } if (terminate) diff --git a/tests/docbook/Makefile.am b/tests/docbook/Makefile.am index b223f4fe..a785a0d7 100644 --- a/tests/docbook/Makefile.am +++ b/tests/docbook/Makefile.am @@ -186,4 +186,4 @@ xhtmltests: $(top_builddir)/xsltproc/xsltproc rm -f $$out ; done ) dist-hook: - @(cd $(srcdir) ; tar -cf - --exclude CVS common html dtd lib xhtml fo doc images template htmlhelp result test) | (cd $(distdir); tar xf -) + @(cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn common html dtd lib xhtml fo doc images template htmlhelp result test) | (cd $(distdir); tar xf -) |