+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
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 =
*/
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")) {
} 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;
}
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)